Given the nature of how the geometry of shapes work, it does take a little thought when you are designing your skin, but I really do think it can make sense once you wrap you head around it.
Let's look at how to consider all this:
Rule 1 : A meter can and will expand as needed to the right and down to hold the entire shape, including any stroke. A meter can NEVER expand to the top and left. X and Y define the "top left" corner of both skins and meters. Skins and meters are always drawn from there down and right. That's just a fact of life. That can't possibly be changed.
First let's draw a 200 X 200 Ellipse:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackGroundMode=2
SolidColor=255,0,0,90
[MeterEllipse]
Meter=Shape
Shape=Ellipse 0,0,100 | Extend Attrib
Attrib=StrokeWidth 1 | Fill Color 255,255,255,255
1.png
Whoa... That doesn't look right does it. Ah, see an Ellipse is drawn from the "center out" in all directions. So the top and left are being drawn "outside the skin" and thus truncated.
Let's fix that. We can set the X and Y of the meter to 100 and we are good, right?
Code: Select all
[MeterEllipse]
Meter=Shape
X=100
Y=100
Shape=Ellipse 0,0,100 | Extend Attrib
Attrib=StrokeWidth 1 | Fill Color 255,255,255,255
2.png
Well, yes and no. The size of the "shape" is 200 x 200, That's what we want, and that's what we get. However any "stroke" on the shape is not part of that size. You want a 200 x 200 circle, you got it. The size of the "pen tip" you use to draw the circle has nothing to do with it. A stroke is NOT, NOT a "border". So although it may be hard to see, the 1/2 of the stroke that is "outside" the defined size of the shape is truncated. Just on the top and left.
Anyway, we can fix that too:
Code: Select all
[MeterEllipse]
Meter=Shape
X=101
Y=101
Shape=Ellipse 0,0,100 | Extend Attrib
Attrib=StrokeWidth 1 | Fill Color 255,255,255,255
3.png
So we added 1/2 the StokeWidth (rounded up to an integer) to the X and Y, and we get exactly what we expect.
We can do the same thing by setting the "starting point" of the shape as well, while leaving the X and the Y of the meter as "0":
Code: Select all
[MeterEllipse]
Meter=Shape
X=0
Y=0
Shape=Ellipse 101,101,100 | Extend Attrib
Attrib=StrokeWidth 1 | Fill Color 255,255,255,255
3.png
Exactly the same result.
So what if we increase the StrokeWidth:
Code: Select all
[MeterEllipse]
Meter=Shape
X=0
Y=0
Shape=Ellipse 101,101,100 | Extend Attrib
Attrib=StrokeWidth 6 | Fill Color 255,255,255,255
4.png
Not good. We need to account for 1/2 the StrokeWidth, rounded up to an integer.
So we can:
Code: Select all
[MeterEllipse]
Meter=Shape
X=0
Y=0
Shape=Ellipse 103,103,100 | Extend Attrib
Attrib=StrokeWidth 6 | Fill Color 255,255,255,255
5.png
Or:
Code: Select all
[MeterEllipse]
Meter=Shape
X=103
Y=103
Shape=Ellipse 0,0,100 | Extend Attrib
Attrib=StrokeWidth 6 | Fill Color 255,255,255,255
5.png
Same thing..
So it seems to me that as long as you consider the geometry of your shape, and any impact Rotate, Scale, Skew has on them, and factor in 1/2 the StrokeWidth rounded up to an integer, you can end up being able to set other meters relative to this one just fine. It's not as straightforward as a String meter perhaps, but this is nothing like a String meter. A String meter can never be drawn from the "staring point" either up or left. A shape in a shape meter can, and very often will. Ellipses, Arcs, Curves, and Paths, as well as Rotate, Scale and Skew, can all cause that.