It is currently March 28th, 2024, 4:04 pm

Thread for help with the Shape meter

Get help with creating, editing & fixing problems with skins
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: Thread for help with the Shape meter

Post by death.crafter »

CodeCode wrote: June 20th, 2021, 1:17 pm 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:
I was thinking about making another, mmm, unexplainatory video but I changed my mind and went with a verbal one this time.

But glad you worked it out.

And Yincognito's reply.

P.S.: The smarter you get, the more connections your brain cells make, and the clumsier your brain becomes. So my moto - "Stay dumb. Live long."
User avatar
Yincognito
Rainmeter Sage
Posts: 7024
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 20th, 2021, 2:27 pmI was thinking about making another, mmm, unexplainatory video but I changed my mind and went with a verbal one this time.
You should try sign language or 0-s and 1-s next time... :D It'll be like
Image
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: Thread for help with the Shape meter

Post by death.crafter »

Yincognito wrote: June 20th, 2021, 3:08 pm You should try sign language or 0-s and 1-s next time... :D It'll be like
Yincognito on a meme rampage😂
User avatar
Yincognito
Rainmeter Sage
Posts: 7024
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 20th, 2021, 4:27 pm Yincognito on a meme rampage😂
Shhh, don't tell anyone about it - you spoil the element of surprise. They'll never know what struck them... :sly:
To be honest, jsmorley is the best at these things, LOL. Me, I'm just a humble apprentice, it just happens that today it got me. :D
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

Hello. Forum Search was a bit scattered, and my question didn't seem to be clearly addressed.

I am making the effort to have a spectrum circle, gradient on the stroke:

Code: Select all

[BlackSquare]
Meter=Image
SolidColor=0,0,0,255
W=250
H=250
AntiAlias=1

[ShapeSpectrum]
Meter=Shape
Shape=Rectangle 50,50,150,150,75 | StrokeWidth 10 | Stroke LinearGradient MyStrokeGradient1
MyStrokeGradient1=180 | 0,255,255,255 ; 0.0 | 100,255,0,255 ; 0.25 | 255,130,0,255 ; 0.50 | 255,5,5,255 ; 0.75 | 0,255,255,255 ; 1.0
Am I using too many Pipe? it looks like this:
Capture.PNG
Instead of this googled image:
mask_temp.png
I reads likethat should be possible, but perhaps I misinterpreted?
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

Ok SO... I am getting mixed results. I am trying 2 180 degree arcs. The top seems ok - great even. But the bottom - I don't understand the how the percentage of the arc works *upside down* ??

Code: Select all

[WhiteSquare]
Meter=Image
SolidColor=220,220,220,255
W=250
H=250
AntiAlias=1

[Button1G]
Meter=Shape
Shape=Arc 3,105,203,105,100,100,0,0,0,0 | StrokeWidth 15 | Stroke LinearGradient MyStrokeGradient1
MyStrokeGradient1=180 | 0,205,250,255 ; 0.0 | 100,255,0,255 ; 0.5 | 255,130,0,255 ; 1.0

[Button2G]
Meter=Shape
Shape=Arc 203,105,3,105,100,100,0,0,0,0 | StrokeWidth 15 | Stroke LinearGradient MyStrokeGradient1
MyStrokeGradient1=90 | 255,130,0,255 ; 1.0 | 255,5,255,255 ; 0.75 | 0,205,250,255 ; 0.0
The bottom seems to be mirroring at 50%. From what I am inputting - I just don't understand why it isn't working?

ANy help is appreciated.

EDIT: I got it.

[Button1G]

Code: Select all

Meter=Shape
Shape=Arc 3,105,203,105,100,100,0,0,0,0 | StrokeWidth 15 | Stroke LinearGradient MyStrokeGradient1
MyStrokeGradient1=180 | 0,205,250,255 ; 0.0 | 100,255,0,255 ; 0.5 | 255,130,0,255 ; 1.0

[Button2G]
Meter=Shape
Shape=Arc 203,105,3,105,100,100,0,0,0,0 | StrokeWidth 15 | Stroke LinearGradient MyStrokeGradient1
MyStrokeGradient1=180 | 255,130,0,255 ; 1.0 | 255,5,255,255 ; 0.75 | 0,205,250,255 ; 0.0
That seems pretty good now. SO I will watch for any tips that come along. :thumbup:

EDIT2: I know - it's weird. The percentage is backwards in the code but it looks like almost perfect. My code at home here has been corrected.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: Thread for help with the Shape meter

Post by death.crafter »

CodeCode wrote: August 13th, 2021, 8:30 am That seems pretty good now. SO I will watch for any tips that come along. :thumbup:

EDIT2: I know - it's weird. The percentage is backwards in the code but it looks like almost perfect. My code at home here has been corrected.
To be honest, I would rather use an image instead of making it in shape. If you are making a color picker that is.
User avatar
Yincognito
Rainmeter Sage
Posts: 7024
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

It's normal that in the bottom arc percentages are "backwards", because, since you start with the same color there as the rightmost color in the upper arc, the bottom arc percentage would start at 100% of the arc (which is to the right in your code, irrespective of whether you swapped the start and end coordinates compared to the upper arc, because the SweepDirection parameter of the Arc is just like the upper arc's, i.e. going clockwise) and progress down to 0%.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

death.crafter wrote: August 13th, 2021, 9:05 am To be honest, I would rather use an image instead of making it in shape. If you are making a color picker that is.
No, just drawing. I am going to use the shape gradient to avoid using an image. Lightens things up. 8-)
Yincognito wrote: August 13th, 2021, 9:30 am It's normal that in the bottom arc percentages are "backwards", because, since you start with the same color there as the rightmost color in the upper arc, the bottom arc percentage would start at 100% of the arc (which is to the right in your code, irrespective of whether you swapped the start and end coordinates compared to the upper arc, because the SweepDirection parameter of the Arc is just like the upper arc's, i.e. going clockwise) and progress down to 0%.
Yep. I noticed in the Arc section of the shape page that the sweep direction can be selected - CW or CCW.

Cheers :thumbup:
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Thread for help with the Shape meter

Post by CodeCode »

Ok, I have the spectrum arcs working.

Now, I am trying to have a line segment travel the circumference - to denote any point needed. I have the measure to tell it where to go, just not the math to draw the line segment.
Example circle:

Code: Select all

[MeterShow]
Meter=Shape
Shape=Rectangle 10,10,193,193,97 | Fill Color 0,0,0,0 | StrokeWidth 6 | Stroke Color 255,255,0,255
The segment would be from the center, but only showing on the 6 pixel strokewidth, as a black segment.

Starting from the bottom center - or 90 deg (i think thats right).

I hope this isn't too easy, but asking for help will reduce trial and error time.

Thanks.
Post Reply