Olympus112 wrote: ↑October 24th, 2023, 9:55 am
So now have begin to try this "Rectengular Shape" modding session, but didn't get it to work the way I wanted.
With the code like this:
Code: Select all
[Rainmeter]
Update=50
MouseOverAction=[!ShowMeter Menu][!ShowMeter Close][!ShowMeter MoveBack][!ShowMeter MoveUp][!Redraw]
MouseLeaveAction=[!HideMeter Menu][!HideMeter Close][!ShowMeter MoveBack][!ShowMeter MoveUp][!Redraw]
OnRefreshAction=[!ShowMeter StopWatchDigits][!ShowMeter MeterTimerStart][!HideMeter MeterTimerStop][!ShowMeter MeterTimerReset][!ZPos "2"]
[Metadata]
Author=Original Skin: vlesun (vlesun@newmail.ru) & balala / Modern Stopwatch Modded Skin: Olympus112 (with the help of: eclectic-tech & balala & ikarus1969: THX!)
[MeterContainer]
Meter=Shape
Shape=Rectangle -3,-3,298,156,20 | Fill Color 215,18,18,100 | StrokeWidth 14
[MeterBackground]
Meter=Image
ImageName=#@#bg_night - Lighter06 - Blocky Edge - Try 3.png
Container=MeterContainer
UpdateDivider=-1
AntiAlias=1
I have got this result, what is surely not how I want it to look:
No matter how I have tried placing the code bits it's still not what I was wishing for.
So to be clear again: I only want the rounded edges of the rectangular shape to be shown as a "frame" on the background image. But this way it's surely not what happens.
So can you be more clear pleaqe and help me adjusting it to be fine?
Thank you!
Apart from the possible improvements that ZXCVBOT mentioned, I thought you wanted the interior of your background image corresponding to the rounded Rectangle to be visible (i.e. where the fill would be applied), hence my previous advice regarding using containers.
If you just want a rounded frame aka a border overlaid on top of your background Image, then you don't need containers at all. Just place your background meter first, and the rounded Rectangle second, using a transparent fill, something like this:
Code: Select all
[MeterBackground]
Meter=Image
ImageName=#@#bg_night - Lighter06 - Blocky Edge - Try 3.png
UpdateDivider=-1
[MeterBorder]
Meter=Shape
Shape=Rectangle ([MeterBackground:X]+14/2),([MeterBackground:Y]+14/2),([MeterBackground:W]-14),([MeterBackground:H]-14),20 | Fill Color 0,0,0,0 | Stroke Color 215,18,18,100 | StrokeWidth 14
UpdateDivider=-1
DynamicVariables=1
This uses the positional section variable parameters for meters:
https://docs.rainmeter.net/manual/variables/section-variables/
to draw the border precisely on the supposed edges of the background meter, while taking the stroke width and the fact that the stroke is drawn from the center:
https://docs.rainmeter.net/manual/meters/shape/#StrokeWidth
into account, but you can of course revert to using hardcoded values there if you feel more comfortable with them. The advantage of this approach is that it will automatically adjust the border coordinates and extent based on the similar properties of the background meter. This might be useful if one day you'd like to implement scaling on your background/ skin. Obviously you can still adjust positioning and extent to your liking in both approaches.
Hopefully you accurately described what you wanted this time and I correctly understood your description - let us know how it goes.