It is currently March 28th, 2024, 11:28 pm

[Suggestion] Increase/decrease size of skins through Rainmeter

Report bugs with the Rainmeter application and suggest features.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by fonpaolo »

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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by jsmorley »

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.
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.

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.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by fonpaolo »

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. :lol:

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...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by jsmorley »

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. :lol:

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...
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.

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.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by fonpaolo »

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! :rolmfao:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by jsmorley »

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! :rolmfao:
TransformationMatrix won't work right on Bar or Button, but it should work fine on Rotator.

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 very functionality of Bar and Button depend on the original size of the image. They use the size of the image in formulas that produce the functionality. Those just can't be scaled.

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.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by fonpaolo »

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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by jsmorley »

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.
My concern about scaling up images is that they quickly look like shit...

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.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by fonpaolo »

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... ( O.O )

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. :sly: ;-) :D
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Increase/decrease size of skins through Rainmeter

Post by jsmorley »

Yes, raster images scale down much better than they scale up, to a point.