I'm not here to dispute anything, only asking if what I thought was correct, in some ways.
So, at least, I'm happy I've not wasted time doing something wrong adding Round to the calculations, since I always tend to avoid unwanted and useless operations.
It is currently April 19th, 2024, 11:22 am
[Suggestion] Increase/decrease size of skins through Rainmeter
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Yes, you are doing the right thing. It's particularly tricky to scale strings based on some mathematical formula since the relationship to the "pixel-based" elements like W / H / X / Y that change 1 pixel at a time are not the same as the "point-based" FontSize.fonpaolo wrote:I'm not here to dispute anything, only asking if what I thought was correct, in some ways.
So, at least, I'm happy I've not wasted time doing something wrong adding Round to the calculations, since I always tend to avoid unwanted and useless operations.
I'm hoping our gradual change to all D2D, away from GDI+, will allow us to take a different approach to scaling in the future.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
That's the reason why, with my experiments, I ended up with Round, since I was thinking of scaling pixels and I don't think there's something able to handle "half" pixels or less.
Going back to the other half part of the question, I'm doing something wrong, or as Buttons, also Rotator isn't scalable.
Using X, Y, W, H, OffSetX and OffSetY, all with integer numbers (using Round), applying a scale factor, it doesn't seems to resize properly or at all...
Going back to the other half part of the question, I'm doing something wrong, or as Buttons, also Rotator isn't scalable.
Using X, Y, W, H, OffSetX and OffSetY, all with integer numbers (using Round), applying a scale factor, it doesn't seems to resize properly or at all...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Bar and Button always use the original size of the image and cannot be scaled with W and H. I wold think Rotator is fine, it can be sized with W and H.fonpaolo wrote:That's the reason why, with my experiments, I ended up with Round, since I was thinking of scaling pixels and I don't think there's something able to handle "half" pixels or less.
Going back to the other half part of the question, I'm doing something wrong, or as Buttons, also Rotator isn't scalable.
Using X, Y, W, H, OffSetX and OffSetY, all with integer numbers (using Round), applying a scale factor, it doesn't seems to resize properly or at all...
Edit: Hmm. No. Looks like Rotator can't be dynamically scaled. The meter W and H can be changed, but that doesn't resize the image used.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Thanks, at least now I understand why I had a lot of troubles trying to scale it.
Maybe, balala can jump in and use his beloved TransformationMatrix.
...and since we're closer (at least in the same continent), he could hear my brain explode!
Maybe, balala can jump in and use his beloved TransformationMatrix.
...and since we're closer (at least in the same continent), he could hear my brain explode!
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
TransformationMatrix won't work right on Bar or Button, but it should work fine on Rotator.fonpaolo wrote:Thanks, at least now I understand why I had a lot of troubles trying to scale it.
Maybe, balala can jump in and use his beloved TransformationMatrix.
...and since we're closer (at least in the same continent), he could hear my brain explode!
Code: Select all
[MeterHoursHand]
Meter=ROTATOR
MeasureName=MeasureTime
X=0
Y=0
W=110
H=116
ImageName=#@#Images\Hours.png
OffsetX=3
OffsetY=3
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
The reason that Rotator can't be scaled by simply changing W and H is that the way the meter is designed is that the "image" rotates around inside the "meter". So the W and H are used to define the meter, and the original size of the image is used for that. W and H can't do both, they are independent sizes.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Thanks, honestly I can handle math more complicated than TransformationMatrix, I'll give a try... and since it's only for aesthetic purposes, there's always the option to simply not to use it.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
My concern about scaling up images is that they quickly look like shit...fonpaolo wrote:Thanks, honestly I can handle math more complicated than TransformationMatrix, I'll give a try... and since it's only for aesthetic purposes, there's always the option to simply not to use it.
Folks are welcome to agree to disagree, but my take on it is that the only things today that should dynamically scale in Rainmeter are String and Shape meters. That is the point of how fonts work and what "vector" is all about. Scaling anything using raster images is always going to be "brute force". You can't just make 1 pixel of the image use 4 pixels instead and then antialias the result. That quickly just gets fuzzy and out of focus.
I say "today" because once we are entirely D2D for our graphics engine, there may be things we can do with DPI (dots instead of pixels) that can improve this situation. We are probably a long way from that, but it's on the radar.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
I can agree with you, even if only in part.
Since I frequently use image processing, the biggest problem with scaling, it's to make them larger than their original dimensions.
Once you start with this in mind, the opposite, scaling down, in most cases will give you better results, so, start with the larger dimension you need and then scale it down, even without Antialias=1, in most cases is good enough.
My next step will be using Shape instead of images, but this, in my to do list, is still almost at the end... ( )
Oh, as a side node, TransformationMatrix did the trick!
So, balala, be aware: I'm starting to love TransformationMatrix, I hope you're not too jealous.
Since I frequently use image processing, the biggest problem with scaling, it's to make them larger than their original dimensions.
Once you start with this in mind, the opposite, scaling down, in most cases will give you better results, so, start with the larger dimension you need and then scale it down, even without Antialias=1, in most cases is good enough.
My next step will be using Shape instead of images, but this, in my to do list, is still almost at the end... ( )
Oh, as a side node, TransformationMatrix did the trick!
So, balala, be aware: I'm starting to love TransformationMatrix, I hope you're not too jealous.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Yes, raster images scale down much better than they scale up, to a point.