It is currently March 28th, 2024, 8:54 am

Thread for help with the Shape meter

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

eclectic-tech wrote:It is easy to understand how this could be overlooked... the Shape meter is, by far, the most complicated and powerful meter in Rainmeter.

I am still discovering new possibilities a year after it's introduction. :D

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[RainmeterIcon]
Meter=Shape
X=0
Y=0
Shape = Path Path1 | fill color 0,0,0,0 | stroke color 42, 109, 155 | StrokeWidth 4
Shape2 = Path Path2 | fill color 224, 144, 40 | StrokeWidth 0
Shape3 = Path Path3 | fill color 42, 109, 155 | StrokeWidth 0
Path1 = 35, 39.4 | CurveTo 19, 54.3, 35, 47.6, 27.8, 54.3 | CurveTo 3, 39.4, 10.2, 54.3, 3, 47.6 | CurveTo 19, 6.3, 3, 31.2, 19, 6.3 | CurveTo 35, 39.4, 19, 6.3, 35, 31.2 | ClosePath 1
Path2 = 18.9, 37.7 | CurveTo 7.2, 37.7, 10.2, 31.5, 7.2, 37.7 | CurveTo 7, 39, 7, 38.1, 7, 38.6 | CurveTo 19, 50.2, 7, 45.2, 12.4, 50.2 | CurveTo 31, 39, 25.6, 50.2, 31, 45.2 | CurveTo 30.9, 37.7, 31, 38.6, 30.9, 38.2 | CurveTo 18.9, 37.7, 30.9, 37.7, 27.5, 43.9 | ClosePath 1
Path3 = 99.1, 64 | CurveTo 98.7, 64, 99, 64, 98.8, 64 | CurveTo 98.3, 64, 98.6, 64, 98.4, 64 | CurveTo 97.9, 64, 98.2, 64, 98.1, 64 | CurveTo 97.5, 64, 97.7, 64, 97.6, 64
1.png
:-)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the new Shape meter

Post by balala »

eclectic-tech wrote:I am still discovering new possibilities a year after it's introduction. :D
As all of us, I think.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the new Shape meter

Post by balala »

jsmorley wrote:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[RainmeterIcon]
Meter=Shape
X=0
Y=0
Shape = Path Path1 | fill color 0,0,0,0 | stroke color 42, 109, 155 | StrokeWidth 4
Shape2 = Path Path2 | fill color 224, 144, 40 | StrokeWidth 0
Shape3 = Path Path3 | fill color 42, 109, 155 | StrokeWidth 0
Path1 = 35, 39.4 | CurveTo 19, 54.3, 35, 47.6, 27.8, 54.3 | CurveTo 3, 39.4, 10.2, 54.3, 3, 47.6 | CurveTo 19, 6.3, 3, 31.2, 19, 6.3 | CurveTo 35, 39.4, 19, 6.3, 35, 31.2 | ClosePath 1
Path2 = 18.9, 37.7 | CurveTo 7.2, 37.7, 10.2, 31.5, 7.2, 37.7 | CurveTo 7, 39, 7, 38.1, 7, 38.6 | CurveTo 19, 50.2, 7, 45.2, 12.4, 50.2 | CurveTo 31, 39, 25.6, 50.2, 31, 45.2 | CurveTo 30.9, 37.7, 31, 38.6, 30.9, 38.2 | CurveTo 18.9, 37.7, 30.9, 37.7, 27.5, 43.9 | ClosePath 1
Path3 = 99.1, 64 | CurveTo 98.7, 64, 99, 64, 98.8, 64 | CurveTo 98.3, 64, 98.6, 64, 98.4, 64 | CurveTo 97.9, 64, 98.2, 64, 98.1, 64 | CurveTo 97.5, 64, 97.7, 64, 97.6, 64
Interesting code... :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Thread for help with the new Shape meter

Post by eclectic-tech »

@jsmorley
Yes! Very powerful!
ss2.gif
[/url]Only 4 Shape Meters = More than 50 dynamic strokes! :D

Code: Select all

; ========= Variables ==========
[Variables]
; Color for sound squares. The default color is white or black and is set by the style setting actions from the context menu 
SquareColor=255,255,255
; Transparency of squares
SquareAlpha=180

; Color for outer frame. The default color is white or black and is set by the style setting actions from the context menu 
FrameColor=255,255,255
; Transparency of outer frame
FrameAlpha=255

; Color for diagonal lines. The default color is white or black and is set by the style setting actions from the context menu 
LineColor=255,255,255
; Transparency of diagonal lines
LineAlpha=210

; Fill color of squares and outer frame
FillColor=40,45,235
;144,94,44
; MyBlue: 40,45,235
; Transparency of fill. Setting this to a low value will create a gradient effect on squares; darkest at the center.
FillAlpha=1

; Angle of display. Will NOT WORK for variations that tilt based on sound
TiltAngle=45
; SpinRate sets the max speed of rotation. Sound amplitude drives the overall rotation
SpinRate=10
SpinRate2=(-#SpinRate#)
NoRotate=0

; Size of the visualizer. Due to the differences in how ellipses and rectangles are drawn, this value should be 1/2 the size to match square visualizers.
Size=135
; Default size used to reset dimensions to default
DefaultSize=100

; MaxLineWidth should any number less than the 'Size' above divided by 22, to prevent overlapping squares at maximum sound levels
MaxLineWidth=4

; Set inner frequency
; 0 = Inner Low / Outer High) ||  1 = Inner High / Outer Low
InnerFreq=1

; Miscellaneous variables set by context menu actions
HideFrame=1
HideCxLines=1
HideChLines=1

[Rainmeter]
Update=16
AccurateText=1
DynamicWindowSize=1
Group=[#RootConfig]

ContextTitle=Light Style
ContextAction=[!SetVariable SquareColor "255,255,255"][!SetVariable LineColor "255,255,255"][!SetVariable FrameColor "255,255,255"][!UpdateMeter *][!Redraw][!WriteKeyValue Variables SquareColor "255,255,255"][!WriteKeyValue Variables LineColor "255,255,255"][!WriteKeyValue Variables FrameColor "255,255,255"]

ContextTitle2=Dark Style
ContextAction2=[!SetVariable SquareColor "0,0,0"][!SetVariable LineColor "0,0,0"][!SetVariable FrameColor "0,0,0"][!UpdateMeter *][!Redraw][!WriteKeyValue Variables SquareColor "0,0,0"][!WriteKeyValue Variables LineColor "0,0,0"][!WriteKeyValue Variables FrameColor "0,0,0"]

ContextTitle3="---"

ContextTitle4=Light Frame
ContextAction4=[!WriteKeyValue Variables HideFrame "0"][!SetVariable HideFrame "0"][!WriteKeyValue Variables FrameColor "255,255,255"][!SetVariable FrameColor "255,255,255"][!UpdateMeter *][!Redraw]

ContextTitle5=Dark Frame
ContextAction5=[!WriteKeyValue Variables HideFrame "0"][!SetVariable HideFrame "0"][!WriteKeyValue Variables FrameColor "0,0,0"][!SetVariable FrameColor "0,0,0"][!UpdateMeter *][!Redraw]

ContextTitle6="---"

ContextTitle7=Light Lines
ContextAction7=[!WriteKeyValue Variables LineColor "255,255,255"][!SetVariable LineColor "255,255,255"][!UpdateMeter *][!Redraw]

ContextTitle8=Dark Lines
ContextAction8=[!WriteKeyValue Variables LineColor "0,0,0"][!SetVariable LineColor "0,0,0"][!UpdateMeter *][!Redraw]

ContextTitle9="---"

ContextTitle10=Toggle Frame
ContextAction10=[!WriteKeyValue Variables HideFrame "(1-[#HideFrame])"][!SetVariable HideFrame "(1-[#HideFrame])"][!UpdateMeter *][!Redraw]

ContextTitle11=Toggle Cross-X Lines
ContextAction11=[!WriteKeyValue Variables HideCxLines "(1-[#HideCxLines])"][!SetVariable HideCxLines "(1-[#HideCxLines])"][!UpdateMeter *][!Redraw]

ContextTitle12=Toggle Cross-hair Lines
ContextAction12=[!WriteKeyValue Variables HideChLines "(1-[#HideChLines])"][!SetVariable HideChLines "(1-[#HideChLines])"][!UpdateMeter *][!Redraw]

ContextTitle13=Toggle 45° Tilt
ContextAction13=[!WriteKeyValue Variables  TiltAngle "(Abs([#TiltAngle]-45))"][!SetVariable TiltAngle "(Abs([#TiltAngle]-45))"][!UpdateMeter *][!Redraw]

ContextTitle14=Toggle Spin
ContextAction14=[!WriteKeyValue Variables NoRotate "(1-[#NoRotate])"][!SetVariable NoRotate "(1-[#NoRotate])"][!UpdateMeter *][!Redraw]

ContextTitle15="---"

ContextTitle16=Reverse Freq Display
ContextAction16=[!WriteKeyValue Variables InnerFreq "(1-[#InnerFreq])"][!Refresh]

ContextTitle17="---"

ContextTitle18=Edit Variables
ContextAction18=["[#CurrentPath][#CurrentFile]"]

; ========= Metadata ==========
[Metadata]
Name=Sound Square ~ EllipseXYunion
Author=Eclectic Tech
Information=Variations on a square visualizer. Squares represent the intensity and frequency of the sound; lower frequency is inner most square, highest frequency is outer square. Edit SIZE variable to change over all scale (to match other Square Sound variations, set this to 1/2 their size). Optional Diagonal and/or Cross-hair lines. Optional frame. Rotate to any angle 0~90 degrees. Preset 45 degree tilt in context menu.
License=Creative Commons Share-Alike NC 4
Version=1.2017.12.08

; ========= Measures ==========
[MeasureAudioLevel]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FreqMin=100
FreqMax=15000
FFTSize=2048
FFTOverlap=256
FFTAttack=10
FFTDecay=100
Bands=11
; Smooth disc attack/decay 
RMSAttack=50
RMSDecay=50
RMSGain=1
; Peak disc attack/decay
PeakAttack=20
PeakDecay=20
PeakGain=1
Sensitivity=30

[measureAudioOut_RMS_SUM]
Measure=Plugin
Plugin=AudioLevel
Parent=measureAudioLevel
Channel=Sum
Type=RMS

[measureAudioOut_RMS_Peak]
Measure=Plugin
Plugin=AudioLevel
Parent=measureAudioLevel
Channel=Sum
Type=Peak

[mRotator]
Measure=Calc
Formula=mRotator%360+(#SpinRate#*MeasureAudioOut_RMS_SUM)
DynamicVariables=1
Disabled=#NoRotate#

[mRotator2]
Measure=Calc
Formula=mRotator2%360+(#SpinRate2#*MeasureAudioOut_RMS_SUM)
DynamicVariables=1
Disabled=#NoRotate#

@include="#@#Includes\Inner[#InnerFreq].inc"

[mSpacing]
Measure=Calc
Formula=#Size#/22
DynamicVariables=1

; ========= Meter Styles ==========



; ========= Meters ==========

[MeterShapeFrame]
Meter=Shape
X=([#Size]/2)
Y=([#Size]/2)
DynamicVariables=1
Hidden=([#HideFrame]+([MeasureAudioLevel]<0.0000001)?)

MyRotate=Rotate ([#TiltAngle]+[mRotator])

;Shape=Rectangle X,Y,W,H,{Rx},{Ry} | StrokeWidth 2 | StrokeColor 0,0,0,255 | Fill Color 255,255,255,255

Shape=Rectangle [#MaxLineWidth],[#MaxLineWidth],([#Size]*2-[#MaxLineWidth]*2),([#Size]*2-[#MaxLineWidth]*2) | StrokeWidth ([#MaxLineWidth]) | StrokeColor [#FrameColor],[#FrameAlpha] | Fill Color [#FillColor],[#FillAlpha] | Extend MyRotate

[MeterShapeSquares]
Meter=Shape
X=([#Size])
Y=([#Size])
DynamicVariables=1
Hidden=([MeasureAudioLevel]<0.0000001)?

MyRotate=StrokeColor [#SquareColor],[#SquareAlpha] | Fill Color [#FillColor],[#FillAlpha] | Rotate ([#TiltAngle]+[mRotator])

Shape=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild10]-[#MaxLineWidth]*2)-[mSpacing]*2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*2) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild10]) | Extend MyRotate

Shape2=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*2),(([#Size]*[MeasureAudioLevelChild10]-[#MaxLineWidth]*2)-[mSpacing]*2) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild10]) | Extend MyRotate

Shape3=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild9]-[#MaxLineWidth]*2)-[mSpacing]*4),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*4) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild9]) | Extend MyRotate

Shape4=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*4),(([#Size]*[MeasureAudioLevelChild9]-[#MaxLineWidth]*2)-[mSpacing]*4) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild9]) | Extend MyRotate

Shape5=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild8]-[#MaxLineWidth]*2)-[mSpacing]*6),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*6) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild8]) | Extend MyRotate

Shape6=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*6),(([#Size]*[MeasureAudioLevelChild8]-[#MaxLineWidth]*2)-[mSpacing]*6) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild8]) | Extend MyRotate

Shape7=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild7]-[#MaxLineWidth]*2)-[mSpacing]*8),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*8) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild7]) | Extend MyRotate

Shape8=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*8),(([#Size]*[MeasureAudioLevelChild7]-[#MaxLineWidth]*2)-[mSpacing]*8) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild7]) | Extend MyRotate

Shape9=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild6]-[#MaxLineWidth]*2)-[mSpacing]*10),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*10) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild6]) | Extend MyRotate

Shape10=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*10),(([#Size]*[MeasureAudioLevelChild6]-[#MaxLineWidth]*2)-[mSpacing]*10) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild6]) | Extend MyRotate

Shape11=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild5]-[#MaxLineWidth]*2)-[mSpacing]*12),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*12) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild5]) | Extend MyRotate

Shape12=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*12),(([#Size]*[MeasureAudioLevelChild5]-[#MaxLineWidth]*2)-[mSpacing]*12) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild5]) | Extend MyRotate

Shape13=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild4]-[#MaxLineWidth]*2)-[mSpacing]*14),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*14) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild4]) | Extend MyRotate

Shape14=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*14),(([#Size]*[MeasureAudioLevelChild4]-[#MaxLineWidth]*2)-[mSpacing]*14) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild4]) | Extend MyRotate

Shape15=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild3]-[#MaxLineWidth]*2)-[mSpacing]*16),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*16) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild3]) | Extend MyRotate

Shape16=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*16),(([#Size]*[MeasureAudioLevelChild3]-[#MaxLineWidth]*2)-[mSpacing]*16) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild3]) | Extend MyRotate

Shape17=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild2]-[#MaxLineWidth]*2)-[mSpacing]*18),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*18) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild2]) | Extend MyRotate

Shape18=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*18),(([#Size]*[MeasureAudioLevelChild2]-[#MaxLineWidth]*2)-[mSpacing]*18) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild2]) | Extend MyRotate

Shape19=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild1]-[#MaxLineWidth]*2)-[mSpacing]*20),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*20) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild1]) | Extend MyRotate

Shape20=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*20),(([#Size]*[MeasureAudioLevelChild1]-[#MaxLineWidth]*2)-[mSpacing]*20) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild1]) | Extend MyRotate

Shape21=Combine Shape | Union Shape2

Shape22=Combine Shape3 | Union Shape4

Shape23=Combine Shape5 | Union Shape6

Shape24=Combine Shape7 | Union Shape8

Shape25=Combine Shape9 | Union Shape10

Shape26=Combine Shape11 | Union Shape12

Shape27=Combine Shape13 | Union Shape14

Shape28=Combine Shape15 | Union Shape16

Shape29=Combine Shape17 | Union Shape18

Shape30=Combine Shape19 | Union Shape20

[MeterShapeSquares2]
Meter=Shape
X=([#Size])
Y=([#Size])
DynamicVariables=1
Hidden=([MeasureAudioLevel]<0.0000001)?
MouseScrollUpAction=[!SetVariable Size (Clamp(#Size#+5,65,500))][!UpdateMeter *][!Redraw][!WriteKeyValue Variables Size (Clamp(#Size#+5,65,500))]
MouseScrollDownAction=[!SetVariable Size (Clamp(#Size#-5,65,500))][!UpdateMeter *][!Redraw][!WriteKeyValue Variables Size (Clamp(#Size#-5,65,500))]
MiddleMouseUpAction=[!SetVariable Size [#DefaultSize]][!UpdateMeter *][!Redraw][!WriteKeyValue Variables Size [#DefaultSize]]

MyRotate=StrokeColor [#SquareColor],[#SquareAlpha] | Fill Color [#FillColor],[#FillAlpha] | Rotate ([mRotator2]+[#TiltAngle])

Shape=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild10]-[#MaxLineWidth]*2)-[mSpacing]*2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*2) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild10]) | Extend MyRotate

Shape2=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*2),(([#Size]*[MeasureAudioLevelChild10]-[#MaxLineWidth]*2)-[mSpacing]*2) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild10]) | Extend MyRotate

Shape3=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild9]-[#MaxLineWidth]*2)-[mSpacing]*4),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*4) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild9]) | Extend MyRotate

Shape4=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*4),(([#Size]*[MeasureAudioLevelChild9]-[#MaxLineWidth]*2)-[mSpacing]*4) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild9]) | Extend MyRotate

Shape5=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild8]-[#MaxLineWidth]*2)-[mSpacing]*6),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*6) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild8]) | Extend MyRotate

Shape6=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*6),(([#Size]*[MeasureAudioLevelChild8]-[#MaxLineWidth]*2)-[mSpacing]*6) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild8]) | Extend MyRotate

Shape7=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild7]-[#MaxLineWidth]*2)-[mSpacing]*8),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*8) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild7]) | Extend MyRotate

Shape8=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*8),(([#Size]*[MeasureAudioLevelChild7]-[#MaxLineWidth]*2)-[mSpacing]*8) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild7]) | Extend MyRotate

Shape9=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild6]-[#MaxLineWidth]*2)-[mSpacing]*10),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*10) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild6]) | Extend MyRotate

Shape10=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*10),(([#Size]*[MeasureAudioLevelChild6]-[#MaxLineWidth]*2)-[mSpacing]*10) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild6]) | Extend MyRotate

Shape11=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild5]-[#MaxLineWidth]*2)-[mSpacing]*12),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*12) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild5]) | Extend MyRotate

Shape12=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*12),(([#Size]*[MeasureAudioLevelChild5]-[#MaxLineWidth]*2)-[mSpacing]*12) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild5]) | Extend MyRotate

Shape13=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild4]-[#MaxLineWidth]*2)-[mSpacing]*14),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*14) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild4]) | Extend MyRotate

Shape14=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*14),(([#Size]*[MeasureAudioLevelChild4]-[#MaxLineWidth]*2)-[mSpacing]*14) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild4]) | Extend MyRotate

Shape15=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild3]-[#MaxLineWidth]*2)-[mSpacing]*16),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*16) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild3]) | Extend MyRotate

Shape16=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*16),(([#Size]*[MeasureAudioLevelChild3]-[#MaxLineWidth]*2)-[mSpacing]*16) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild3]) | Extend MyRotate

Shape17=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild2]-[#MaxLineWidth]*2)-[mSpacing]*18),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*18) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild2]) | Extend MyRotate

Shape18=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*18),(([#Size]*[MeasureAudioLevelChild2]-[#MaxLineWidth]*2)-[mSpacing]*18) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild2]) | Extend MyRotate

Shape19=Ellipse ([#Size]/2),([#Size]/2),(([#Size]*[MeasureAudioLevelChild1]-[#MaxLineWidth]*2)-[mSpacing]*20),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*20) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild1]) | Extend MyRotate

Shape20=Ellipse ([#Size]/2),([#Size]/2),(([#Size]-[#MaxLineWidth]*2)-[mSpacing]*20),(([#Size]*[MeasureAudioLevelChild1]-[#MaxLineWidth]*2)-[mSpacing]*20) | StrokeWidth ([#MaxLineWidth]*[MeasureAudioLevelChild1]) | Extend MyRotate

[MeterShapeCxLines]
Meter=Shape
X=([#Size]/2)
Y=([#Size]/2)
DynamicVariables=1
Hidden=([#HideCxLines]+([MeasureAudioLevel]<0.0000001)?)

MyRotate=Rotate ([#TiltAngle]+[mRotator])

Shape=Line [#MaxLineWidth],[#MaxLineWidth],([#Size]*2-[#MaxLineWidth]),([#Size]*2-[#MaxLineWidth]) | StrokeWidth 2 | StrokeColor [#LineColor],[#LineAlpha] | Extend MyRotate

Shape2=Line ([#Size]*2-[#MaxLineWidth]),[#MaxLineWidth],[#MaxLineWidth],([#Size]*2-[#MaxLineWidth]) | StrokeWidth 2 | StrokeColor [#LineColor],[#LineAlpha] | Extend MyRotate

[MeterShapeChLines]
Meter=Shape
X=([#Size]/2)
Y=([#Size]/2)
DynamicVariables=1
Hidden=([#HideChLines]+([MeasureAudioLevel]<0.0000001)?)

MyRotate=Rotate ([#TiltAngle]+[mRotator])

Shape=Line ([#Size]),[#MaxLineWidth],([#Size]),([#Size]*2-[#MaxLineWidth]) | StrokeWidth 2 | StrokeColor [#LineColor],[#LineAlpha] | Extend MyRotate

Shape2=Line [#MaxLineWidth],([#Size]),([#Size]*2-[#MaxLineWidth]),([#Size]) | StrokeWidth 2 | StrokeColor [#LineColor],[#LineAlpha] | Extend MyRotate
HudTweaker13
Posts: 6
Joined: February 1st, 2017, 1:11 am

Re: Thread for help with the new Shape meter

Post by HudTweaker13 »

I have a shape in my hud which describes a frame around the outside. I've been trying without success to put a stroke around the inside of the frame, but not the outside. Does anyone have any ideas on how I can do this?

Here's my shape code:

[MeterFrame]
Meter=Shape
x=0
y=2
Shape=Rectangle 0,0,#ScreenAreaWidth#,#ScreenAreaHeight# | Fill Color 0,0,0,0
Shape2=Rectangle 0,0,(#ScreenAreaWidth#),(#ScreenAreaHeight#) | Extend MyModifiers1
MyModifiers1=#DefaultModifiers#
MyGradient1=#DefaultGradient#
Shape3=Rectangle 140,20,(#ScreenAreaWidth#-280),(#ScreenAreaHeight#-40),40 | Extend MyModifiers2
MyModifiers2=#DefaultModifiers#
MyGradient2=#DefaultGradient#
Shape4=Rectangle ((#ScreenAreaWidth#-400)/2),0,400,40,20 | Extend MyModifiers3
MyModifiers3=#DefaultModifiers#
MyGradient3=#DefaultGradient#
Shape5=Rectangle ((#ScreenAreaWidth#-400)/2),(#ScreenAreaHeight#-40),400,40,20 | Extend MyModifiers4
MyModifiers4=#DefaultModifiers#
MyGradient4=#DefaultGradient#
Shape6=Combine Shape2 | Exclude Shape3 | Union Shape4 | Union Shape5
Shape7=Rectangle 5,((#ScreenAreaHeight#/2)-225),130,443,20 | Strokewidth 0 | Fill Color 0,0,0,255
Shape8=Rectangle (#ScreenAreaWidth#-135),((#ScreenAreaHeight#/2)-225),130,443,20 | Strokewidth 0 | Fill Color 0,0,0,255


Thanx!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

No, the stroke is going to be all the way around your shapes, and even with the skin jammed up against the edges of the screen, 1/2 of the stroke is going to be "inside" the shape, and at least that much of it will display. You could truncate the skin by setting SkinWdith / SkinHeight in the [Rainmeter] section to exclude the entire outside stroke, but that would take some thought to not end up with a "gap" around the skin.

While it could probably be done if you define the entire thing using Path shapes, which has the ability to turn on and off strokes as you go, That would be pretty complex, and I'm not even 100% sure you could get there even that way.

https://docs.rainmeter.net/manual/meters/shape/#Path
HudTweaker13
Posts: 6
Joined: February 1st, 2017, 1:11 am

Re: Thread for help with the new Shape meter

Post by HudTweaker13 »

Is there a way to take a shape like that and define the inverse via code, then stroke that?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

HudTweaker13 wrote:Is there a way to take a shape like that and define the inverse via code, then stroke that?
No, nothing automatic like "inverse" for a selection in Photoshop. You would have to manually define the shape(s).
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

Seem to me that with your skin, you might want to try making the overall size of the outer shape, the one that you want to have the inside border, be slightly larger than the overall screen. Something like the size of the StrokeWidth / 4 larger all the way around. Then use the !KeepOnScreen bang in an OnRefreshAction in [Rainmeter] to allow the skin to extend off the screen. You might need to use a !Move bang to set the position to a negative X and Y in the same OnRefreshAction. I haven't tested, but you might also want a !SnapEdges bang to keep it from snapping to the edge of the screen.

In theory, that would have the outside stroke be off the screen and thus not displayed.

My only concern with this is if you have a second monitor. It is possible that the skin could bleed over onto the second monitor at the common edge that defines the overall virtual screen.

Another idea is to define the dimensions of the skin with SkinWidth / SkinHeight in the [Rainmeter] section, making it the size of the StrokeWidth * 2 smaller in width and height. Then have the Y and X on the meter(s) set with a negative number so it starts drawing the top and left "outside" the skin, and with a height and width that ends up drawing the bottom and right "off" the skin as well. The SkinWdith / SkinHeight options would be required to contain the meters to the skin, as otherwise, the skin would just grow to the bottom and right to accommodate the meters. This will in effect crop off the outside border. You would have to consider this in every single X and Y value you set in the skin though, so things are positioned as you want relative to the "hud".

The only other approach that makes sense to me is to not stroke the current combined shape that you have, and the create new shape(s) that define the inside of the design, give that / them a stroke, and fill with 0,0,0,0. I'd be inclined this way, rather than a kinda "hackish" effort to crop off the outer stroke and have to deal with complicated positioning everywhere. This is in effect your "inverse" idea, and although that can't be done with a simple option, it's still probably the best way forward.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

So like this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeterShape]
Meter=Shape
Shape=Rectangle 0,0,400,300 | StrokeWidth 0 | Fill Color 178,201,209,255
Shape2=Rectangle 30,30,340,240,12
Shape3=Combine Shape | Exclude Shape2
Shape4=Rectangle 30,30,340,240,12 | StrokeWidth 6 | Stroke Color 116,116,108,255 | Fill Color 0,0,0,0
1.png
Post Reply