Thanks for generalizing the method for round corner path shapes; I was going to look into that, but it was almost 3 am and I needed sleep!
Thanks for the tip on SetNoStroke 1/0
I have never used that in a shape meter, but definitely see the value it provides when creating adjacent shapes!
I see that stroke effect when combining shapes... but I think Pul53dr1v3r is attempting to replicate the illustro background using a Shape meter that can be scaled and have a varying number of information lines. If that is the case, then I see no need to "Combine" the shapes and a strokewidth of zero would be used since no border is desired.
Using your generalized approach, here is a scalable sample skin that mimics the illustro background in size and color with a header and variable body height.
The number of lines of information in any skin can be controlled by the #LineItems# variable; this can be set by a measure or a static value depending on the skin. The scaling is done in the [Variables] section to the defined line height, corner radius, width, top height, and strokewidth. Then the shape meters uses it's scale function; this eliminates the need to define Skinwidth/Skinheight in the [Rainmeter] section which are required when using TransformationMatrix.
Code: Select all
; Scalable illustro style background using shape meter with paths
; Expandable info body using LineItems variable
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
Scale=1
; The number of displayed info lines (Cores, Memory, etc.)
LineItems=1
; The height of an info line
LineHeight=(14*#Scale#)
CornerRadius=(3*#Scale#)
Width=(196*#Scale#)
TopHeight=(27*#Scale#)
BodyHeight=(#TopHeight#+(#LineHeight#*#LineItems#))
StrokeWidth=(0*#Scale#)
Start=(#StrokeWidth#/2)
[MeterShape]
Meter=Shape
DynamicVariables=1
; Top Shape
Shape=Path ShapePath | StrokeWidth #StrokeWidth# | Stroke Color 160,160,160,255 | Fill Color 0,0,0,175 | #Scale#,#Scale#
ShapePath=#Start#,#TopHeight# | LineTo #Start#,(#Start#+(#CornerRadius#*2)) | CurveTo (#Start#+(#CornerRadius#*2)),#Start#,#Start#,#Start# | LineTo (#Width#-(#CornerRadius#*2)),#Start# | CurveTo #Width#,(#Start#+(#CornerRadius#*2)),#Width#,#Start# | LineTo #Width#,#TopHeight# | SetNoStroke 1 | LineTo #Start#,#TopHeight# | ClosePath 1
; Body Shape
Shape2=Path PathBody | StrokeWidth #StrokeWidth# | Stroke Color 160,160,160,255 | Fill Color 0,0,0,140 | #Scale#,#Scale#
PathBody=#Start#,#TopHeight# | SetNoStroke 1 | LineTo #Width#,#TopHeight# | SetNoStroke 0 | LineTo #Width#,((#BodyHeight#+(#LineHeight#*#LineItems#))-(#CornerRadius#*2)) | CurveTo (#Width#-(#CornerRadius#*2)),(#BodyHeight#+(#LineHeight#*#LineItems#)),#Width#,(#BodyHeight#+(#LineHeight#*#LineItems#)) | LineTo (#Start#+(#CornerRadius#*2)),(#BodyHeight#+(#LineHeight#*#LineItems#)) | CurveTo #Start#,((#BodyHeight#+(#LineHeight#*#LineItems#))-(#CornerRadius#*2)),#Start#,(#BodyHeight#+(#LineHeight#*#LineItems#))| LineTo #Start#,#TopHeight# | ClosePath 1
This code can be used to create any width and height shape, with colors for the header and body, having round-corners, variable header height, and a variable body height.
@Pul53dr1v3r ... Hope this helps