It is currently October 9th, 2024, 6:48 pm

VectorConverter [V 0.1.3]

Skins that control functions in Windows or Rainmeter
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

While Transform modifiers are fine on a Combine'd shape, the "Extend" parameter is not.

Code: Select all

[ConvertedShape]
Meter=Shape
X=0
Y=0
Shape = Path Path1 | StrokeWidth 0 | Extend Attributes
Shape2 = Path Path2 | StrokeWidth 0
Shape3 = Path Path3 | StrokeWidth 0
Shape4 = Path Path4 | StrokeWidth 0
Shape5 = Combine Shape1 | XOR Shape2 | XOR Shape3 | XOR Shape4 | Scale 0.2,0.2 | Rotate 90
Path1 = 448, 360 | LineTo 448, 24 | CurveTo 424, 0, 448, 10.7, 437.3, 0 | LineTo 96, 0 | CurveTo 0, 96, 43, 0, 0, 43 | LineTo 0, 416 | CurveTo 96, 512, 0, 469, 43, 512 | LineTo 424, 512 | CurveTo 448, 488, 437.3, 512, 448, 501.3 | LineTo 448, 472 | CurveTo 439.1, 453.3, 448, 464.5, 444.5, 457.7 | CurveTo 439.1, 378.6, 434.9, 437.9, 434.9, 394 | CurveTo 448, 360, 444.5, 374.3, 448, 367.5 | ClosePath 1
Path2 = 128, 134 | CurveTo 134, 128, 128, 130.7, 130.7, 128 | LineTo 346, 128 | CurveTo 352, 134, 349.3, 128, 352, 130.7 | LineTo 352, 154 | CurveTo 346, 160, 352, 157.3, 349.3, 160 | LineTo 134, 160 | CurveTo 128, 154, 130.7, 160, 128, 157.3 | LineTo 128, 134 | ClosePath 1
Path3 = 128, 198 | CurveTo 134, 192, 128, 194.7, 130.7, 192 | LineTo 346, 192 | CurveTo 352, 198, 349.3, 192, 352, 194.7 | LineTo 352, 218 | CurveTo 346, 224, 352, 221.3, 349.3, 224 | LineTo 134, 224 | CurveTo 128, 218, 130.7, 224, 128, 221.3 | LineTo 128, 198 | ClosePath 1
Path4 = 381.4, 448 | LineTo 96, 448 | CurveTo 64, 416, 78.3, 448, 64, 433.7 | CurveTo 96, 384, 64, 398.4, 78.4, 384 | LineTo 381.4, 384 | CurveTo 381.4, 448, 379.5, 401.1, 379.5, 430.9 | ClosePath 1
Attributes = Fill Color 137,190,250
;Transforms = Scale 0.2,0.2 | Rotate 90
This is because although Transform modifiers are allowed on Combine'd shapes, Attribute modifiers are NOT. Those are inherited from the parent shape. Since Extend is not specific to either type, I suspect the thinking was to just not allow it at all, rather than hunting and pecking though them deciding what was allowed and what was not.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

Post by raiguard »

jsmorley wrote: April 6th, 2019, 3:14 am While Transform modifiers are fine on a Combine'd shape, the "Extend" parameter is not.

Code: Select all

[ConvertedShape]
Meter=Shape
X=0
Y=0
Shape = Path Path1 | StrokeWidth 0 | Extend Attributes
Shape2 = Path Path2 | StrokeWidth 0
Shape3 = Path Path3 | StrokeWidth 0
Shape4 = Path Path4 | StrokeWidth 0
Shape5 = Combine Shape1 | XOR Shape2 | XOR Shape3 | XOR Shape4 | Scale 0.2,0.2 | Rotate 90
Path1 = 448, 360 | LineTo 448, 24 | CurveTo 424, 0, 448, 10.7, 437.3, 0 | LineTo 96, 0 | CurveTo 0, 96, 43, 0, 0, 43 | LineTo 0, 416 | CurveTo 96, 512, 0, 469, 43, 512 | LineTo 424, 512 | CurveTo 448, 488, 437.3, 512, 448, 501.3 | LineTo 448, 472 | CurveTo 439.1, 453.3, 448, 464.5, 444.5, 457.7 | CurveTo 439.1, 378.6, 434.9, 437.9, 434.9, 394 | CurveTo 448, 360, 444.5, 374.3, 448, 367.5 | ClosePath 1
Path2 = 128, 134 | CurveTo 134, 128, 128, 130.7, 130.7, 128 | LineTo 346, 128 | CurveTo 352, 134, 349.3, 128, 352, 130.7 | LineTo 352, 154 | CurveTo 346, 160, 352, 157.3, 349.3, 160 | LineTo 134, 160 | CurveTo 128, 154, 130.7, 160, 128, 157.3 | LineTo 128, 134 | ClosePath 1
Path3 = 128, 198 | CurveTo 134, 192, 128, 194.7, 130.7, 192 | LineTo 346, 192 | CurveTo 352, 198, 349.3, 192, 352, 194.7 | LineTo 352, 218 | CurveTo 346, 224, 352, 221.3, 349.3, 224 | LineTo 134, 224 | CurveTo 128, 218, 130.7, 224, 128, 221.3 | LineTo 128, 198 | ClosePath 1
Path4 = 381.4, 448 | LineTo 96, 448 | CurveTo 64, 416, 78.3, 448, 64, 433.7 | CurveTo 96, 384, 64, 398.4, 78.4, 384 | LineTo 381.4, 384 | CurveTo 381.4, 448, 379.5, 401.1, 379.5, 430.9 | ClosePath 1
Attributes = Fill Color 137,190,250
;Transforms = Scale 0.2,0.2 | Rotate 90
Huh. I could have sworn up and down that I tried that and it didn't work.

There goes my plan to convert literally the entire Material Icons font into shapes and use them with @includes...
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

Also, there is no such option as Shape1.

It's Shape, Shape2, Shape3.

Just like MeasureName, MeasureName2, MeasureName3.

Just like InlineSetting, InlineSetting2, InlineSetting3.

Doesn't change anything, as the Combine function is smart enough to guess what you meant, snicker quietly at you, and throw away the "1", but it's still wrong.
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

Also, scaling that combined shape doesn't change the size of the meter. So, just ick...

1.png
You do not have the required permissions to view the files attached to this post.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

Post by raiguard »

jsmorley wrote: April 6th, 2019, 3:49 am Also, scaling that combined shape doesn't change the size of the meter. So, just ick...


1.png
All you need to do is anchor the scale at 0,0, and that problem is solved:
2019-04-06 07_10_54-Window.png

Code: Select all

[ConvertedShape]
Meter=Shape
SolidColor=255,0,0,50
X=0
Y=0
Shape = Path Path1 | StrokeWidth 0 | Extend Attributes
Shape2 = Path Path2 | StrokeWidth 0
Shape3 = Path Path3 | StrokeWidth 0
Shape4 = Path Path4 | StrokeWidth 0
Shape5 = Combine Shape1 | XOR Shape2 | XOR Shape3 | XOR Shape4 | Scale 0.1,0.1,0,0
Path1 = 448, 360 | LineTo 448, 24 | CurveTo 424, 0, 448, 10.7, 437.3, 0 | LineTo 96, 0 | CurveTo 0, 96, 43, 0, 0, 43 | LineTo 0, 416 | CurveTo 96, 512, 0, 469, 43, 512 | LineTo 424, 512 | CurveTo 448, 488, 437.3, 512, 448, 501.3 | LineTo 448, 472 | CurveTo 439.1, 453.3, 448, 464.5, 444.5, 457.7 | CurveTo 439.1, 378.6, 434.9, 437.9, 434.9, 394 | CurveTo 448, 360, 444.5, 374.3, 448, 367.5 | ClosePath 1
Path2 = 128, 134 | CurveTo 134, 128, 128, 130.7, 130.7, 128 | LineTo 346, 128 | CurveTo 352, 134, 349.3, 128, 352, 130.7 | LineTo 352, 154 | CurveTo 346, 160, 352, 157.3, 349.3, 160 | LineTo 134, 160 | CurveTo 128, 154, 130.7, 160, 128, 157.3 | LineTo 128, 134 | ClosePath 1
Path3 = 128, 198 | CurveTo 134, 192, 128, 194.7, 130.7, 192 | LineTo 346, 192 | CurveTo 352, 198, 349.3, 192, 352, 194.7 | LineTo 352, 218 | CurveTo 346, 224, 352, 221.3, 349.3, 224 | LineTo 134, 224 | CurveTo 128, 218, 130.7, 224, 128, 221.3 | LineTo 128, 198 | ClosePath 1
Path4 = 381.4, 448 | LineTo 96, 448 | CurveTo 64, 416, 78.3, 448, 64, 433.7 | CurveTo 96, 384, 64, 398.4, 78.4, 384 | LineTo 381.4, 384 | CurveTo 381.4, 448, 379.5, 401.1, 379.5, 430.9 | ClosePath 1
Attributes = Fill Color 137,190,250
;Transforms = Scale 0.2,0.2 | Rotate 90
Granted, I have discovered that the FontAwesome 5 icon font is actually really good, so I might just switch to that. Unlike Material Icons, they're all consistently sized and there exists a thorough cheat sheet of all the hex IDs.
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

raiguard wrote: April 6th, 2019, 1:12 pm All you need to do is anchor the scale at 0,0, and that problem is solved:
Ah, good catch...
Granted, I have discovered that the FontAwesome 5 icon font is actually really good, so I might just switch to that. Unlike Material Icons, they're all consistently sized and there exists a thorough cheat sheet of all the hex IDs.
Yeah, I really like FontAwesome.

In general, I don't see any strong advantage to using shapes or images when a font exists. The power of the String meter, with IinlineSetting and the simplicity of FontColor and FontSize appeals to me.
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

There are some strange and wonderful pictographic fonts out there if you search around a bit... I used one in my MLBStandings skin, that is a font that is the logos of all the Major League Baseball teams.

https://forum.rainmeter.net/viewtopic.php?f=27&t=15451&p=86446#p86446

mlbstandings.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

Post by raiguard »

jsmorley wrote: April 6th, 2019, 1:16 pm Ah, good catch...



Yeah, I really like FontAwesome.

In general, I don't see any strong advantage to using shapes or images when a font exists. The power of the String meter, with IinlineSetting and the simplicity of FontColor and FontSize appeals to me.
Unfortunately there is one small problem with using the icon font so far: At the scale I'm working with (font sizes 8-12) most of the icons become indistinctly blurry:
2019-04-06 07_28_51-Window.png
So there might still be a place for images and shapes after all.
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22847
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

Perhaps. I think they are pretty good at 12 and up, but yeah, they don't scale down to 8 as well as one might like. Of course 8 is pretty small to be an icon you expect someone to click on in my view, particularly on a high-resolution screen, but to each his own.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

Post by raiguard »

So I did some testing, and found this:
2019-04-06 09_17_16-Cheatsheet _ Font Awesome.png
On the left is FontAwesome's cheatsheet page, where I zoomed out of the page until the icons were the same size as my Rainmeter ones. In Rainmeter, it goes string, image, shape.

This obviously points to the font itself being good, but somehow Rainmeter's displaying of it is borked. Perhaps it's just a difference in display technology (HTML vs Direct2D)? I do know that the web uses subpixel antialiasing while Rainmeter uses greyscale.

Anyway, this proves that if one wanted to basically rewrite Rainmeter (again), icon fonts could work at small scales. :D
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017