Re: Thread for help with the new Shape meter
Posted: May 10th, 2017, 8:02 pm
Yep...
Code: Select all
[MeterShapeResistor]
Meter=Shape
X=1
Y=1
Shape=Line 0,200,700,200 | StrokeWidth 20 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape2=Rectangle 100,100,500,200 | Fill Color 255,255,255 | StrokeWidth 20 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape3=Line 180,370,500,50 | StrokeWidth 15 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape4=Path Pfeil | Fill Color 90,90,90 | StrokeWidth 20 | Stroke Color 90,90,90 | Rotate 135,525,25 | Scale 0.5,0.5
Pfeil=585,0 | LineTo 525,25 | LineTo 585,50 | LineTo 585,0 | ClosePath 1
Shape5=Combine Shape3 | Union Shape4
Code: Select all
[MeterShapeResistor]
Meter=Shape
X=1
Y=1
Shape=Line 0,200,700,200 | StrokeWidth 20 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape2=Rectangle 100,100,500,200 | Fill Color 255,255,255 | StrokeWidth 20 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape3=Line 180,370,500,50 | StrokeWidth 15 | Stroke Color 0,0,0 | Scale 0.5,0.5
Shape4=Path Pfeil | Fill Color 90,90,90 | StrokeWidth 20 | Stroke Color 90,90,90 | Scale 0.5,0.5 | Rotate 135 | Offset -110,84
Pfeil=585,0 | LineTo 525,25 | LineTo 585,50 | LineTo 585,0 | ClosePath 1
Shape5=Combine Shape3 | Union Shape4
Shape attributes in combined shapes are inherited from the first shape (parent), so to fill the combined 'arrow' shape (child) move Fill Color 0,0,0 to Shape3, instead of having it in Shape4.Peremptor wrote:@eclectic-tech
Thanks for your help, I removed the scaling and instead made it a bit smaller.
The only remaining problem is that the arrow should be filled with black color instead of white. But it doesn't want to.
Do you know how to fill a combined shape? I couldn't find anything in the docs and as always, Google isn't any help.
The only other issue I overlooked before is in the 'arrow' Shape4 triangle; you drew all 3 lines then told it 'ClosePath 1'...Shape Meter in RM Manual wrote:Notes on Combine:
When shapes are combined, the parent shape's Attribute Modifiers, e.g. Fill and StrokeWidth, are automatically inherited by the new combined shape. Any Attribute modifiers on child shapes or the new combined shape are ignored.
Code: Select all
[Rainmeter]
Update=#UpdateFreq#
AccurateText=1
Group=#ROOTCONFIG#
MouseActionCursor=0
DynamicWindowSize=1
DefaultUpdateDivider=(floor(1000/#UpdateFreq#))
[Variables]
UpdateFreq=1000
Layout_Padding=4
Layout_Panel_BaseSize=200
Layout_ShadowSize=4
Layout_Factor_W=1
Layout_Factor_H=0.5
Alpha_PanelBG_Init=210
Alpha_PanelShadow_Init=255
Alpha_PanelBG=#Alpha_PanelBG_Init#
Alpha_PanelShadow=#Alpha_PanelShadow_Init#
Layout_AdjFactor=1
Layout_Panel_W_Temp=(#Layout_Panel_BaseSize#*#Layout_AdjFactor#*(ceil(#Layout_Factor_W#*4)/4))
Layout_Panel_H_Temp=(#Layout_Panel_BaseSize#*#Layout_AdjFactor#*(ceil(#Layout_Factor_H#*4)/4))
Layout_Panel_W=(((#Layout_Panel_W_Temp#-floor(#Layout_Panel_W_Temp#/2)*2)>1?ceil(#Layout_Panel_W_Temp#/2)*2:floor(#Layout_Panel_W_Temp#/2)*2)-2*#Layout_ShadowSize#)
Layout_Panel_H=(((#Layout_Panel_H_Temp#-floor(#Layout_Panel_H_Temp#/2)*2)>1?ceil(#Layout_Panel_H_Temp#/2)*2:floor(#Layout_Panel_H_Temp#/2)*2)-2*#Layout_ShadowSize#)
Layout_HeaderTextHeight=0
Layout_ShowBorder=1
Colors_Black1=0,0,0
Colors_Black2=19,19,19
Colors_Back1=#Colors_Black2#
Colors_Back2=#Colors_Black1#
Colors_Border=255,255,255
[BackgroundTest]
Meter=Shape
Shape=Rectangle 0, 0, (#Layout_Panel_W#+2*#Layout_ShadowSize#), (#Layout_Panel_H#+2*#Layout_ShadowSize#) | Fill Color 0,0,0,1 | StrokeWidth 0
DynamicVariables=1
UpdateDivider=-1
[BackgroundCircle]
Meter=Shape
Shape=Ellipse (#Layout_Panel_W#/2+#Layout_ShadowSize#), (#Layout_Panel_H#/2+#Layout_ShadowSize#), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2) | Fill LinearGradient LinearGrad | StrokeWidth 0
Shape2=Ellipse (#Layout_Panel_W#/2+#Layout_ShadowSize#), (#Layout_Panel_H#/2+#Layout_ShadowSize#), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2+#Layout_ShadowSize#), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2+#Layout_ShadowSize#) | Fill RadialGradient ShadowGrad | StrokeWidth 0
Shape3=Ellipse (#Layout_Panel_W#/2+#Layout_ShadowSize#), (#Layout_Panel_H#/2+#Layout_ShadowSize#), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2)
Shape4=Combine Shape2 | Exclude Shape3
LinearGrad=0 | 255,0,0,128 ; 0 | 0,255,0,128 ; 1
ShadowGrad=0, 0, *, *, (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2+#Layout_ShadowSize#), (Min(#Layout_Panel_W#,#Layout_Panel_H#)/2+#Layout_ShadowSize#) | 255,0,0 ; ((Min(#Layout_Panel_W#,#Layout_Panel_H#)/2)/(#Layout_ShadowSize#+Min(#Layout_Panel_W#,#Layout_Panel_H#)/2)+0.05) | 0,0,0 ; ((Min(#Layout_Panel_W#,#Layout_Panel_H#)/2)/(#Layout_ShadowSize#+Min(#Layout_Panel_W#,#Layout_Panel_H#)/2)+0.05)
DynamicVariables=1
UpdateDivider=-1
Group=PanelBG
Code: Select all
[MeterEllipse]
Meter=Shape
Shape=Ellipse 100,100,50 | Fill RadialGradient MyGradient | StrokeWidth 10 | Stroke RadialGradient MyGradient2
MyGradient=0,0 | 155,200,232,255 ; 0.0 | 6,46,75,255 ; 1.0
MyGradient2=0,0 | 138,183,214,255 ; 0.8 | 47,89,119,255 ; 1.0
Code: Select all
[Rainmeter]
Update=#UpdateFreq#
AccurateText=1
Group=#ROOTCONFIG#
MouseActionCursor=0
DynamicWindowSize=1
DefaultUpdateDivider=(floor(1000/#UpdateFreq#))
[Variables]
UpdateFreq=1000
[BackgroundTest]
Meter=Shape
Shape=Rectangle 0, 0, 200, 100 | Fill Color 0,0,0,64 | StrokeWidth 0
DynamicVariables=1
UpdateDivider=-1
[BackgroundCircle]
Meter=Shape
Shape=Ellipse 100, 50, 46, 46 | Fill LinearGradient LinearGrad | StrokeWidth 0
Shape2=Ellipse 100, 50, 50, 50 | Fill RadialGradient ShadowGrad | StrokeWidth 0
Shape3=Ellipse 100, 50, 46, 46
Shape4=Combine Shape2 | Exclude Shape3
LinearGrad=0 | 255,0,0,128 ; 0 | 0,255,0,128 ; 1
ShadowGrad=0, 0 | 0,0,0,0 ; 0.92 | 255,0,0,255 ; 0.92 | 0,0,0,255 ; 1.0
DynamicVariables=1
UpdateDivider=-1
Group=PanelBG
What Rainmeter version are you using? Because the earlier versions (up to r2793, released on May 10, 2017) didn't support the radial gradient on combined shapes (https://www.rainmeter.net/beta-4-1). But this issue was fixed, maybe a upgrade of Rainmeter could help, if you're using an older version.prince1142003 wrote:To create the ring, I'm creating a slightly large circle, filling it with a radial gradient, then excluding another shape the same size as the central circle. I'm unable to get the radial gradient to work properly.
Should've posted that. I'm using 4.1.0 beta r2824 64-bit (Jul 7 2017).balala wrote:What Rainmeter version are you using? Because the earlier versions (up to r2793, released on May 10, 2017) didn't support the radial gradient on combined shapes (https://www.rainmeter.net/beta-4-1). But this issue was fixed, maybe a upgrade of Rainmeter could help, if you're using an older version.