It is currently March 28th, 2024, 9:24 am

New Skin Position Bangs

Changes made during the Rainmeter 4.4 beta cycle.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Contact:

Re: New Skin Position Bangs

Post by Active Colors »

Thank you! Works like a charm. Indeed had before a skin whose center point was:

Code: Select all

X=((#WORKAREAWIDTH#/2)-([FormulaWidth]/2))
I haven't used AnchorX/Y before and can't really understand what is use of it, since the formulas can be used with WindowX/Y? I might be wrong with my question.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Skin Position Bangs

Post by Yincognito »

Active Colors wrote: June 25th, 2020, 11:04 am Thank you! Works like a charm. Indeed had before a skin whose center point was:

Code: Select all

X=((#WORKAREAWIDTH#/2)-([FormulaWidth]/2))
I haven't used AnchorX/Y before and can't really understand what is use of it, since the formulas can be used with WindowX/Y? I might be wrong with my question.
AnchorX/Y allows you to change the "reference point" on which the skin is positioned. By default, this is the top left corner of the skin, but if you set the anchor position, for example, at 50% 50% that means the middle point of the skin. It's pretty much the same as when dealing with the StringAlign in the string meters: if the alignment is Left, the anchor point is the left side of the meter "frame"; if the alignment if Right, it is the right side of the meter frame, and if it's Center it's the horizontal middle of the meter frame. In basic terms, these alignments change the "anchor point" on which the the string meter position is based on. Same for skins.

WindowX/Y, on the other hand, refer to the "window" / "screen" coordinates of the anchor point, again the same as for string meters, where the X and Y mean the point where the anchor (and not necessarily the top left corner of the meter) is positioned. As you probably can imagine, the overall position of a skin in terms of its top left corner is a value that takes into account both the anchor position and the window position.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Contact:

Re: New Skin Position Bangs

Post by Active Colors »

Yincognito wrote: June 25th, 2020, 11:28 am AnchorX/Y allows you to change the "reference point" on which the skin is positioned. By default, this is the top left corner of the skin, but if you set the anchor position, for example, at 50% 50% that means the middle point of the skin. It's pretty much the same as when dealing with the StringAlign in the string meters: if the alignment is Left, the anchor point is the left side of the meter "frame"; if the alignment if Right, it is the right side of the meter frame, and if it's Center it's the horizontal middle of the meter frame. In basic terms, these alignments change the "anchor point" on which the the string meter position is based on. Same for skins.

WindowX/Y, on the other hand, refer to the "window" / "screen" coordinates of the anchor point, again the same as for string meters, where the X and Y mean the point where the anchor (and not necessarily the top left corner of the meter) is positioned. As you probably can imagine, the overall position of a skin in terms of its top left corner is a value that takes into account both the anchor position and the window position.
Ah, gotcha. I misunderstood the meaning of "anchor". I had to try it out before asking questions. Thank you!
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Skin Position Bangs

Post by Yincognito »

Active Colors wrote: June 25th, 2020, 5:04 pm Ah, gotcha. I misunderstood the meaning of "anchor". I had to try it out before asking questions. Thank you!
No problem. ;-)
Post Reply