Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 791

Bugs & Feature Suggestions • [NOT A BUG] The meter bounding box and drawn visuals of a String meter differ, resulting in unexpected behaivour

$
0
0
It's just the order in which I laid out the meter names, I expected the 3rd meter to respect the visual content, but it's not, that was my report :P
Oh, ok - thanks for clarifying. :thumbup:
it will take the meter's bounding box, not the drawn content.
Based on your nice drawing, a simple sample skin illustrating the StringAlign behavior:

Code:

[Variables]Index=0[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1---Measures---[StringAlign]Measure=StringString=LeftTop,CenterTop,RightTop,LeftCenter,CenterCenter,RightCenter,LeftBottom,CenterBottom,RightBottom,RegExpSubstitute=1Substitute="(?U)^(?:.*,){#Index#}(.*),.*$":"\1"DynamicVariables=1---Meters---[Back]Meter=ImageW=700H=200SolidColor=255,255,255,255MouseScrollUpAction=[!SetVariable Index (Clamp(#Index#-1,0,8))][!UpdateMeasure *][!UpdateMeter *][!Redraw]MouseScrollDownAction=[!SetVariable Index (Clamp(#Index#+1,0,8))][!UpdateMeasure *][!UpdateMeter *][!Redraw]DynamicVariables=1[Rect]Meter=ShapeX=350Y=100Shape=Rectangle 0,0,[Text:W],[Text:H] | Fill Color 255,0,0,128 | Stroke Color 255,0,0,255 | StrokeWidth 1Shape2=Ellipse 0,0,7,7 | Fill Color 0,255,0,255 | Stroke Color 0,0,0,128 | StrokeWidth 1DynamicVariables=1[Text]Meter=StringX=0rY=0rW=300H=50FontFace=TahomaFontSize=16FontWeight=700StringEffect=ShadowStringAlign=[StringAlign]SolidColor=0,0,255,128FontColor=0,0,0,255FontEffectColor=255,255,255,128AntiAlias=1Text=StringAlign = [StringAlign]DynamicVariables=1
StringAlign.jpg
Scroll to change the string alignment and show the possible positions of meter area (red), content area (blue) and anchor point (green).
Well, actually only the possible positions of the content area, since the other two are static in this code...
Also, discovered a nice effect of "sinking" the text via inverting the text color and the shadow effect.

Statistics: Posted by Yincognito — Yesterday, 5:07 pm — Replies 6 — Views 298



Viewing all articles
Browse latest Browse all 791

Trending Articles