It is currently May 25th, 2019, 2:15 pm

VectorConverter [V 0.1.3]

Post your work-in-progress and completed skins to share and discuss.
User avatar
raiguard
Posts: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

raiguard » April 6th, 2019, 3:00 am

This is amazing! I have been getting really fed up with the Material Icons icon font, but I didn't want to switch to PNGs because they would take up a ton of space. Alas, now I can have the best of both worlds!

I have an issue though: For some reason I cannot get Transform modifiers to work. Can anyone help me? I feel like I'm making a really dumb mistake.

EDIT: And alas, I have already run into some SVGs that don't work. What are the chances of getting native SVG support in Rainmeter?

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 | Extend Transforms
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
”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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » 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
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: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

raiguard » April 6th, 2019, 3:16 am

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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » April 6th, 2019, 3:29 am

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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » April 6th, 2019, 3:49 am

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: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

raiguard » April 6th, 2019, 1:12 pm

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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » April 6th, 2019, 1:16 pm

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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » April 6th, 2019, 1:28 pm

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: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

raiguard » April 6th, 2019, 1:29 pm

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: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

jsmorley » April 6th, 2019, 1:44 pm

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.