https://www.rainmeter.net
First, we have added the new Path shape type to the meter.
https://docs.rainmeter.net/manual-beta/meters/shape/
https://docs.rainmeter.net/manual-beta/meters/shape/#Path
This is really the Big Kahuna of "drawing", and is how you will create most shapes that are not simple rectangles, ellipses or curves. The documentation explains in detail of course, but the long and the short of it is that you simply define a "starting point", and then a series of one or more "segments" that can be LineTo, ArcTo, or CurveTo. Each segment will automatically start where the previous one ended.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeterShape]
Meter=Shape
Shape=Path MyPath | StrokeSize 2 | Fill Color 106,227,95,255
MyPath=2,100 | LineTo 50,2 | LineTo 100,100 | LineTo 2,100 | ClosePath 1
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeterShape]
Meter=Shape
Shape=Path MyPath | StrokeWidth 2 | Stroke Color 41,4,2,255 | Fill LinearGradient MyGradient
MyPath=20,2 | LineTo 150,2 | LineTo 170,20 | LineTo 170,60 | LineTo 150,80 | LineTo 20,80 | LineTo 2,60 | LineTo 2,20 | LineTo 20,2 | ClosePath 1
MyGradient=180 | 161,49,43 ; 0.0 | 230,99,92 ; 1.0
Code: Select all
[MeterRingo]
Meter=Shape
X=50
Y=50
Shape=Path MyPath | StrokeWidth 50 | Stroke Color 41,4,2,255 | Fill Color 255,205,148,255 | StrokeLineJoin Round
MyPath=20,0 | LineTo 150,0 | LineTo 170,20 | LineTo 170,60 | SetNoStroke 1 | LineTo 150,80 | LineTo 20,80 | LineTo 0,60 | SetNoStroke 0 | LineTo 0,20 | ClosePath 1
Second, We have made all measurements in pixels that you use in the definitions for your shape use Device Independent Pixels (we call them "pixies"). This means that all these values can be fractional. (i.e. 10.75 or 0.254) This will improve "precision" quite a bit when you are creating complicated shapes. Be aware, this does not change the behavior of underlying integer pixel measurements for "meter" options like W/H/X/Y, but does for all pixel values used in your shapes.
Third, We have changed the default "anchors" for the Scale and Skew transform modifiers to use the center of the shape instead of the top-left. We found that it could be difficult on a complicated shape to manually figure out the center, while top-left and bottom-right are more obvious. So we want Rainmeter to do the hard work...