It is currently December 5th, 2021, 4:26 pm

Thread for help with the Shape meter

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

Re: Thread for help with the Shape meter

Post by Yincognito »

balala wrote: June 13th, 2021, 3:32 pm Your and death.crafter's previous idea about the container was good enough, but this is indeed even better. So now I'm saying this is what am I gonna use. So thank you both again, immediately I'm gonna start working in implementing this. :great:
Feel free to use whatever solution better suits your scenario, but bear in mind that for both solutions, if you want to use the shape in subsequent combining scenarios, the FULL shape will be used (unlike the hypothetical situation where the "proper" exclusion would have worked as expected). Sure, the desired part will still be "erased" in both cases, but just in case you thought about combining further.
User avatar
balala
Rainmeter Sage
Posts: 13522
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

Yincognito wrote: June 13th, 2021, 4:18 pm Feel free to use whatever solution better suits your scenario, but bear in mind that for both solutions, if you want to use the shape in subsequent combining scenarios, the FULL shape will be used (unlike the hypothetical situation where the "proper" exclusion would have worked as expected). Sure, the desired part will still be "erased" in both cases, but just in case you thought about combining further.
Yes, right, but I succeeded managing it (removed the combining). Thanks once again for the idea, did its job.
User avatar
Yincognito
Rainmeter Sage
Posts: 4108
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

balala wrote: June 13th, 2021, 6:34 pm Yes, right, but I succeeded managing it (removed the combining). Thanks once again for the idea, did its job.
Ah, ok then. Glad it helped. Credit to death.crafter too, he had the same initial idea with the container at about the same time I did. Fortunately it was possible to come up with a shorter and equally flexible solution (i.e. this one), eventually. One last note: this will work easier with highly irregular shape paths too, where designing a container to cover up all the arbitrary positions in the path would be a challenge.
User avatar
balala
Rainmeter Sage
Posts: 13522
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the Shape meter

Post by balala »

Yincognito wrote: June 13th, 2021, 7:11 pm Credit to death.crafter too, he had the same initial idea with the container at about the same time I did.
For sure. Thank goes to him as well.
Yincognito wrote: June 13th, 2021, 7:11 pm One last note: this will work easier with highly irregular shape paths too, where designing a container to cover up all the arbitrary positions in the path would be a challenge.
Fortunately it's not the case this time.
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

death.crafter... I need some help. I am doing my NeoGothica skin some more.
I am making the left side like the right side and using the reverse trapezoid thing to make the sides the same when changing color (primarily, I also want to understand this math better).
The reverse trapezoid and forward trapezoid are moving together but I am missing how the additions or subtractions work when determining how the trapezoids travel along their paths. This is just off some how.
Please help.

Code: Select all

[MeasureCPUTemp]
Measure=Loop
StartValue=0
EndValue=100
Increment=4

[MeasureCPUTemp2]
Measure=Loop
StartValue=0
EndValue=100
Increment=4
InvertMeasure=1

[ProgBarLTTA]
Meter=Shape
X=110
Y=215
Shape=Path TopBarT | StrokeWidth 2 | StrokeColor #Main#,200 | Fill Color #Main#,90
TopBarT=275, 125 | LineTo (275-265*[MeasureCPUTemp2]/100),(125-45*[MeasureCPUTemp2]/100) | LineTo (275-275*[MeasureCPUTemp2]/100),(120+5*[MeasureCPUTemp2]/100) | LineTo 270, 148 | ClosePath 1
DynamicVariables=1

[ProgBarLTTB]
Meter=Shape
X=110
Y=215
Shape=Path TopFrameT | Strokewidth 2 | Stroke Color #Main#,200 | Fill Color #Goth2#,120
TopFrameT=10, 80 | LineTo (275*[MeasureCPUTemp]/100),(112+13*[MeasureCPUTemp]/100) | LineTo (0+270*[MeasureCPUTemp]/100),(125+25*[MeasureCPUTemp]/100) | LineTo 0, 125 | ClosePath 1
DynamicVariables=1

[dummy] original polygon:
Shape=Path TopFrameT | StrokeWidth 2 | StrokeColor #Main#
TopFrameT=10, 80 | LineTo 275,125 | LineTo 270,148 | LineTo 0, 125 | ClosePath 1
Thanks.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1205
Joined: April 24th, 2021, 8:13 pm

Re: Thread for help with the Shape meter

Post by death.crafter »

CodeCode wrote: June 20th, 2021, 11:31 am death.crafter... I need some help. I am doing my NeoGothica skin some more.

Thanks.

Code: Select all

[Rainmeter]
Update=500
SkinWidth=300
SkinHeight=180

[MeasureCPUTemp]
Measure=Loop
StartValue=0
EndValue=100
Increment=8

[ProgBarLTTA]
Meter=Shape
X=5
Y=0
Shape=Path TopBarT | StrokeWidth 2 | StrokeColor #Main#,200 | Fill Color #Main#,90
TopBarT=(10+265*[MeasureCPUTemp]/100),(80+45*[MeasureCPUTemp]/100) | LineTo 275,125 | LineTo 270,148 | LineTo (270*[MeasureCPUTemp]/100),(125+25*[MeasureCPUTemp]/100) | ClosePath 1
DynamicVariables=1

[ProgBarLTTB]
Meter=Shape
X=5
Y=0
Shape=Path TopFrameT | Strokewidth 2 | Stroke Color #Main#,200 | Fill Color #Goth2#,120
TopFrameT=10, 80 | LineTo (10+265*[MeasureCPUTemp]/100),(80+45*[MeasureCPUTemp]/100) | LineTo (270*[MeasureCPUTemp]/100),(125+25*[MeasureCPUTemp]/100) | LineTo 0, 125 | ClosePath 1
DynamicVariables=1
This is probably what you wanted. And when working with percentages that are complement of each other you don't need separate measures with InvertMeasure=1.

And you have to change the X and Y coordinates. I changed them for my convenience.

P.S.: Don't specify a certain person when asking for help. They may not be around, and others may not feel obligated to reply.😄
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1205
Joined: April 24th, 2021, 8:13 pm

Re: Thread for help with the Shape meter

Post by death.crafter »

CodeCode wrote: June 20th, 2021, 11:31 am (primarily, I also want to understand this math better).
About the Maths. What I am doing is subtracting the higher co-ordinte from the lower and multiplying with measure's per(unial?)ranges from 0-1 instead of 0-100 value to get the correct co-ordinate.

Let's take the points (x1,y1), (x2,y2), (x3,y3), (x4,y4), starting from top left in clockwise direction.

For X co-ordinate:

Top: (x1 + ((x2-x1)*[Measure]{0-1}))

Bottom: (x3 + ((x4-x3)*[Measure]{0-1}))

For Y co-ordinate:

Top: (y1 + ((y2 -y1)*[Measure]{0-1}))

Bottom: (y3 + ((y4 -y3)*[Measure]{0-1}))

*Note: The {0-1} just denote the range of the measure. They don't have actual use and should be ignored.

With these brackets in position, you don't worry about addition or subtraction. These will just work by default.
from the Realm of Death
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

death.crafter wrote: June 20th, 2021, 11:51 am

Code: Select all

[Rainmeter]
Update=500
SkinWidth=300
SkinHeight=180

[MeasureCPUTemp]
Measure=Loop
StartValue=0
EndValue=100
Increment=8

[ProgBarLTTA]
Meter=Shape
X=5
Y=0
Shape=Path TopBarT | StrokeWidth 2 | StrokeColor #Main#,200 | Fill Color #Main#,90
TopBarT=(10+265*[MeasureCPUTemp]/100),(80+45*[MeasureCPUTemp]/100) | LineTo 275,125 | LineTo 270,148 | LineTo (270*[MeasureCPUTemp]/100),(125+25*[MeasureCPUTemp]/100) | ClosePath 1
DynamicVariables=1

[ProgBarLTTB]
Meter=Shape
X=5
Y=0
Shape=Path TopFrameT | Strokewidth 2 | Stroke Color #Main#,200 | Fill Color #Goth2#,120
TopFrameT=10, 80 | LineTo (10+265*[MeasureCPUTemp]/100),(80+45*[MeasureCPUTemp]/100) | LineTo (270*[MeasureCPUTemp]/100),(125+25*[MeasureCPUTemp]/100) | LineTo 0, 125 | ClosePath 1
DynamicVariables=1
death.crafter wrote: June 20th, 2021, 11:51 am This is probably what you wanted. And when working with percentages that are complement of each other you don't need separate measures with InvertMeasure=1.
Ok thanks, I was just going off the way the right side worked, my math was being over-complicated.
death.crafter wrote: June 20th, 2021, 11:51 am And you have to change the X and Y coordinates. I changed them for my convenience.
No problem the coordinates are the same...
death.crafter wrote: June 20th, 2021, 11:51 am P.S.: Don't specify a certain person when asking for help. They may not be around, and others may not feel obligated to reply.😄
Sorry, didn't mean to create a forum protocol issue. I just figured you've seen this whole thing before... and.. well. I shall not do that again.
But, thanks death.crafter. Your help is really appreciated. (props when this thing goes out tho :P).
death.crafter wrote: June 20th, 2021, 11:51 am About the Maths. What I am doing is subtracting the higher co-ordinte from the lower and multiplying with measure's per(unial?)ranges from 0-1 instead of 0-100 value to get the correct co-ordinate.

Let's take the points (x1,y1), (x2,y2), (x3,y3), (x4,y4), starting from top left in clockwise direction.

For X co-ordinate:

Top: (x1 + ((x2-x1)*[Measure]{0-1}))

Bottom: (x3 + ((x4-x3)*[Measure]{0-1}))

For Y co-ordinate:

Top: (y1 + ((y2 -y1)*[Measure]{0-1}))

Bottom: (y3 + ((y4 -y3)*[Measure]{0-1}))

*Note: The {0-1} just denote the range of the measure. They don't have actual use and should be ignored.
Oh man, thanks for that detail. Im keeping so many examples from you I should make a death.crafter folder :lol:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 797
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

Yay! I totally got everything after those explanations.
Now I have to find reasons to do these type of shapes more often so that the gist of this relevant math is better ingrained in my brain.
I like having a smart brain, the more smarts I learn, the bigger my healthy brain is. :lol:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 4108
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

CodeCode wrote: June 20th, 2021, 12:14 pmSorry, didn't mean to create a forum protocol issue. I just figured you've seen this whole thing before... and.. well. I shall not do that again.
I don't think it's a forum protocol issue, or that death.crafter meant that. It's simply restricting the probability to be helped (e.g. someone else knows the answer, but since you addressed the question to someone specifically, you don't get the desired solution, or you don't get it in a reasonable time frame). It's not about protocols, it's about maximixing the probability to be helped - which works in the user's favor and it's the main purpose of the forum.

Similar example: you ask a question in, I don't know, Zulu language. The others not speaking the language will either not understand or won't bother to make the effort to understand, therefore you won't get the needed answer.

That being said, it's perfectly reasonable to ask someone familiar with the code the question. Even if you don't, since the person knows the ins and outs already, he'll generally be the first to give a correct answer anyway. ;-)