I'm trying out creating a skin that overlays certain images on top of a specific desktop wallpaper. How do I automatically resize the overlay images to fit all zoom levels?
I've tried using the SysInfo plugin but the overlays don't appear when I define the W and H values with section variables or MeasureName. (Maybe more information on how W and H works with the image scale mode?)
Also, I'll want to scale the hitbox shapes for mouse actions. I can let people resize the images themselves but the hitboxes will remain...
It is currently April 26th, 2024, 3:28 am
How to auto-resize images to screen?
-
- Posts: 10
- Joined: June 12th, 2018, 7:18 am
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to auto-resize images to screen?
I do not know of any way to determine which zoom the end user selects for his wallpaper. Besides knowing if it is Fit, Fill, Stretch, Span, Tile, or Center, you will also need to know the initial resolution then try to come up with a formula to match each of the 6 zoom! I feel this will be a fruitless exercise that will never match the way it should. The resizing action is probably also going to "bring Rainmeter to it's knees", killing the functioning of all skins.hpgbproductions wrote:I'm trying out creating a skin that overlays certain images on top of a specific desktop wallpaper. How do I automatically resize the overlay images to fit all zoom levels?
I've tried using the SysInfo plugin but the overlays don't appear when I define the W and H values with section variables or MeasureName. (Maybe more information on how W and H works with the image scale mode?)
Really need more information of this... what are your "hitboxes"? Perhaps some code would help explain this for us...hpgbproductions wrote:Also, I'll want to scale the hitbox shapes for mouse actions. I can let people resize the images themselves but the hitboxes will remain...
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 10
- Joined: June 12th, 2018, 7:18 am
Re: How to auto-resize images to screen?
I guess the main problem I have is that my SysInfo SCREEN_WIDTH and SCREEN_HEIGHT readings aren't accepted as W and H values.eclectic-tech wrote:I do not know of any way to determine which zoom the end user selects for his wallpaper. Besides knowing if it is Fit, Fill, Stretch, Span, Tile, or Center, you will also need to know the initial resolution then try to come up with a formula to match each of the 6 zoom! I feel this will be a fruitless exercise that will never match the way it should. The resizing action is probably also going to "bring Rainmeter to it's knees", killing the functioning of all skins.
Hitboxes are the sections of the image you can click on to run certain bangs, which will show/hide the overlay images. Typically shape meters with mouse actions. The hitbox only aligns with the wallpaper at 1280x720 screen size; it will be off if the screen size is different.eclectic-tech wrote:Really need more information of this... what are your "hitboxes"? Perhaps some code would help explain this for us...
The 1280x720 size is only because I'm running it on my screen, plus the wallpaper image and my overlays are conveniently the same size so I can take pixel readings from GIMP
-
- Rainmeter Sage
- Posts: 16172
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to auto-resize images to screen?
To be honest I still don't entirely understand the essence of your request, however I'd say that maybe you don't even need to use the SysInfo plugin. I mean that maybe you could use the #SCREENAREAWIDTH# and #SCREENAREAHEIGHT# built-in variables. These variables are returning the accordingly the width and the height of the screen.hpgbproductions wrote:I guess the main problem I have is that my SysInfo SCREEN_WIDTH and SCREEN_HEIGHT readings aren't accepted as W and H values.