It is currently October 21st, 2021, 5:13 am

Thread for help with the Shape meter

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

CodeCode wrote: June 12th, 2021, 7:40 pm Nope. They're images.

I was seriously going to try TransformationMatrix, on the font size. But then I realised that the slight Yaw of bar panes, it would all be waaay to complex, if not improbable without Yincognito or death.crafter level maths.

I'm very happy, and would like to again thank you guys for helping me across this geometry bridge/s. :great:
I see. Well, they look great anyway, so no problem. As for the math needed for a TM on the text, you give me too much credit, really. I doubt that kind of effect would have been possible since a TM can skew (like that: / / or \ \), but can't to my knowledge, well, "squeeze" / "narrow" / "widen" (I don't know if it's the right word for doing things like that: / \ or \ /), like already stated by balala here.

From my part, you should thank death.crafter more than me - all I did was try to make some skins to test and build any such " perspective trapezoid" as easily as possible. Too bad they came too late for your case, I should have thought about that from the beginning.
User avatar
balala
Rainmeter Sage
Posts: 13333
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

Now my turn to ask something related to the shape meters (yes, again!).
I have the following extremely simple skin, with the following Shape meter:

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=250,250,250,180
SkinWidth=240
SkinHeight=80

[MeterCharging]
Meter=Shape
X=100
Y=5
Shape=Path MyPath | Extend CableModifiers
Shape2=Rectangle 48,15,64,30 | StrokeWidth 0 | Stroke Color 0,0,0,0
MyPath=100,60 | ArcTo 120,50,20,10,0,1,0 | ArcTo 0,20,120,30,0,1,0 | ClosePath 0
CableModifiers=StrokeWidth 4 | Stroke Color 0,0,0,150
This gives me the following:
Shape.png
My intent is to wipe out the central part of the path, which correspond to Shape2, something like this (edited image):
Shape3.png
No problem, I thought, have to add a simple combining option (Shape3 in the following code):

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=250,250,250,180
SkinWidth=240
SkinHeight=80

[MeterCharging]
Meter=Shape
X=100
Y=5
Shape=Path MyPath | Extend CableModifiers
Shape2=Rectangle 48,15,64,30 | StrokeWidth 0 | Stroke Color 0,0,0,0
Shape3=Combine Shape | Exclude Shape2
MyPath=100,60 | ArcTo 120,50,20,10,0,1,0 | ArcTo 0,20,120,30,0,1,0 | ClosePath 0
CableModifiers=StrokeWidth 4 | Stroke Color 0,0,0,150
But the surprise came out immediately. Instead of wiping out the appropriate portion, this is what I got:
Shape2.png
Does anyone know a way to achieve what I want?
Thanks anyone who has an idea.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

balala wrote: June 12th, 2021, 8:11 pmDoes anyone know a way to achieve what I want?
Thanks anyone who has an idea.
This happens because of the following notes in the manual:
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.
[...]
A Combined shape is always closed. Any open shapes or paths used as a parent or child will automatically be closed before they are combined.
This means two things:
- the rectangle will inherit the stroke of its parent in the combined shape, thus the lines around it
- the arc will be automatically closed in the combined shape, thus the diagonal line

That being said, let me think of something here. Generally, the diagonal line would be the easier to solve, just draw a reverse arc in the 1st Shape and close the path. The stroke inheritance though would be trickier to solve...
User avatar
balala
Rainmeter Sage
Posts: 13333
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

Yincognito wrote: June 12th, 2021, 8:31 pm This happens because of the following notes in the manual:
Alright, I see. Seems I missed this detail...
Yincognito wrote: June 12th, 2021, 8:31 pm That being said, let me think of something here. Generally, the diagonal line would be the easier to solve, just draw a reverse arc in the 1st Shape and close the path. The stroke inheritance though would be trickier to solve...
Ok. If you find something interesting, please let me know. As usually, thank you anticipately.
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

balala wrote: June 12th, 2021, 8:39 pmOk. If you find something interesting, please let me know. As usually, thank you anticipately.
You could, in theory, use a container's transparent pixels to "erase" the rectangle, like:

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=250,250,250,180
SkinWidth=240
SkinHeight=80

[MeterContainer]
Meter=Shape
X=100
Y=5
Shape=Rectangle 0,0,122,62 | StrokeWidth 0 | Stroke Color 0,0,0,0 | Fill Color 0,0,0,255
Shape2=Rectangle 48,15,64,30
Shape3=Combine Shape | Exclude Shape2

[MeterCharging]
Container=MeterContainer
Meter=Shape
Shape=Path MyPath | Extend CableModifiers
MyPath=100,60 | ArcTo 120,50,20,10,0,1,0 | ArcTo 0,20,120,30,0,1,0 | ClosePath 0
CableModifiers=StrokeWidth 4 | Stroke Color 0,0,0,150
Solution 01.jpg
This can obviously create all sorts of "complications" in a more extensive environment, where, for example, you want to draw something in place of that excluded rectangle later on, so it's just a temporary workaround. Bottom line, it would be better if this was solved exclusively using the shape parameters (like forget about excluding the rectangle and just draw separate arc groups instead of just one arc group). Still thinking... :???:
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on June 12th, 2021, 9:02 pm, edited 1 time in total.
User avatar
death.crafter
Posts: 1055
Joined: April 24th, 2021, 8:13 pm

Re: Thread for help with the Shape meter

Post by death.crafter »

balala wrote: June 12th, 2021, 8:11 pm Does anyone know a way to achieve what I want?
Thanks anyone who has an idea.

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=250,250,250,180
SkinWidth=240
SkinHeight=80

[MeterContainer]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,240,80  | StrokeWidth 0
Shape2=Rectangle 148,20,64,30 | StrokeWidth 0
Shape3=Combine Shape | Exclude Shape2

[MeterCharging]
Meter=Shape
X=100
Y=5
Shape=Path MyPath | Extend CableModifiers
MyPath=100,60 | ArcTo 120,50,20,10,0,1,0 | ArcTo 0,20,120,30,0,1,0 | ClosePath 0
CableModifiers=StrokeWidth 4 | Stroke Color 0,0,0,150
Container=MeterContainer
Screenshot 2021-06-13 022717.png
I am using a container which may not suite your purpose if you already got one, but it's a way. 😋
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
My Current Desktop
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

death.crafter wrote: June 12th, 2021, 9:02 pmI am using a container which may not suite your purpose if you already got one, but it's a way. 😋
LOL - got you first...
User avatar
balala
Rainmeter Sage
Posts: 13333
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

Yincognito wrote: June 12th, 2021, 9:00 pm You could, in theory, use a container's transparent pixels to "erase" the rectangle, like:
OMG!!! I should have been think to this, but didn't: :handtohead: This will be the solution, I think. Tomorrow will try this out, however this is the solution. I feel this.
Thank you for the idea.
User avatar
balala
Rainmeter Sage
Posts: 13333
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

death.crafter wrote: June 12th, 2021, 9:02 pm I am using a container which may not suite your purpose if you already got one, but it's a way. 😋
It definitely is (I hope) and it suites my purpose. As replied above to Yincognito, this is the solution. Will have to work tomorrow with it a little bit, but i hope this will be the solution.
Thank you for the idea.
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

balala wrote: June 12th, 2021, 9:09 pm It definitely is (I hope) and it suites my purpose. As replied above to Yincognito, this is the solution. Will have to work tomorrow with it a little bit, but i hope this will be the solution.
Thank you for the idea.
I got a better solution, will post it in a couple of moments.