It is currently April 16th, 2024, 8:18 pm

How to change size of rotator images?

Get help with creating, editing & fixing problems with skins
pbutler6
Posts: 100
Joined: April 27th, 2020, 8:10 pm

Re: How to change size of rotator images?

Post by pbutler6 »

I commented out the TransformationMatrix with the formulas - (#ContainerX#*(1-#JPGAdj#)) = 160 and (#ContainerY#*(1-#JPGAdj#)) = 40. It works with the numbers, but not with the formulas. (I've also tried (200-40) and (50-10), but they don't work either.)

I'm sure I'm just missing something, but I've looked at it several times and just don't see my error.
User avatar
Yincognito
Rainmeter Sage
Posts: 7119
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to change size of rotator images?

Post by Yincognito »

pbutler6 wrote: September 13th, 2020, 8:23 pm I commented out the TransformationMatrix with the formulas - (#ContainerX#*(1-#JPGAdj#)) = 160 and (#ContainerY#*(1-#JPGAdj#)) = 40. It works with the numbers, but not with the formulas. (I've also tried (200-40) and (50-10), but they don't work either.)

I'm sure I'm just missing something, but I've looked at it several times and just don't see my error.
Yes, you're missing something indeed - something that I always do: get rid of the spaces in the TransformationMatrix option (or any option, for that matter, from my point of view, don't mind that it'll be less pretty to the eye, it's the functionality that matters). In other words, this will work in both the container and the Rotator:

Code: Select all

TransformationMatrix=#JPGAdj#;0;0;#JPGAdj#;(#ContainerX#*(1-#JPGAdj#));(#ContainerY#*(1-#JPGAdj#))
but this won't:

Code: Select all

TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#; (#ContainerX#*(1-#JPGAdj#)); (#ContainerY#*(1-#JPGAdj#))
Considering that #JPGAdj# works, I suppose it's a formula parser thingy.

P.S. The funny thing is that it took just a couple of second to identify the culprit for me after I saw this thread and downloaded the skin, and that's just because I just don't like spaces in formulas or options and the first thing I do before working with codes is format them the way I like - in this case, it curiously proved to be the solution. :lol:
And then I remember the quotes and I start making connections in my head... :Whistle
EDIT: If you really really want those spaces to better understand the formulas, this will also work, albeit it looks a bit strange:

Code: Select all

TransformationMatrix=#JPGAdj#; 0; 0; #JPGAdj#;( #ContainerX#*( 1-#JPGAdj# ) );( #ContainerY#*( 1-#JPGAdj# ) )
Key is, put the spaces inside the bracket enclosed parts, not outside them, i.e. (space#X#space) not space(#X#)space.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
pbutler6
Posts: 100
Joined: April 27th, 2020, 8:10 pm

Re: How to change size of rotator images?

Post by pbutler6 »

Thanks :thumbup: .

I often don't use spaces. I guess I did this time only because I was following the note on using TransformationMatrix at https://docs.rainmeter.net/manual/meters/general-options/#TransformationMatrix (All the examples have spaces after the semicolons.):



Defines a 3x2 matrix which can be used to transform the meter. Transformations include: scaling, skewing, and translating (ie. moving). There must be exactly 6 values separated by semicolons ;.

TransformationMatrix={scale x};{skew y};{skew x};{scale y};{move x};{move y}

Combining these can have drastic effects on the meter it is applied to.

See also: Transformation Matrix

Examples:

TransformationMatrix=-1; 0; 0; 1; 40; 0: This will flip X along the line X=20.
TransformationMatrix=1; 0; 0; -1; 0; 100: This will flip Y along the line Y=50.
TransformationMatrix=0.5; 0; 0; 1; 25; 0: This will scale X by 0.5 at X=50.
User avatar
Yincognito
Rainmeter Sage
Posts: 7119
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to change size of rotator images?

Post by Yincognito »

pbutler6 wrote: September 13th, 2020, 11:33 pm Thanks :thumbup: .

I often don't use spaces. I guess I did this time only because I was following the note on using TransformationMatrix at https://docs.rainmeter.net/manual/meters/general-options/#TransformationMatrix (All the examples have spaces after the semicolons).
Ah, I see. Well, they don't cause issues for hardcoded numbers, that's for sure, and they help on visibility, especially in a manual, which is probably why they were present there. :???:

It's probably a minor thing in TransformationMatrix' Rainmeter code that taking a leading space into account was forgotten when it comes to formulas. This particularity doesn't seem to be present in other options, as far I could test.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth