It is currently October 22nd, 2021, 6:10 am

VectorConverter [V 0.1.3]

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

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

Yeah, I don't think the Antialiasing in Rainmeter is optimal.

Part of the issue is that in reality, EVERYTHING in Rainmeter is an "image".
User avatar
Brian
Developer
Posts: 2272
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: VectorConverter [V 0.1.3]

Post by Brian »

Just to be clear, there are 2 kinds of anti-aliasing that Rainmeter can do (at the moment). Both are D2D sub-pixel anti-aliasing. For text (aka the String meter), Rainmeter uses a GrayScale anti-aliasing, which is a better equivalent to its GDI counterpart for text. There is even a better alternative called ClearType anti-aliasing, but it doesn't play well when blending with transparent areas, which is why we don't offer it. The rest of Rainmeter uses what is called per-primitive anti-alias, which just basically makes sure the edges of what is being drawn blend better to whatever is behind it. This isn't quite as good as its GDI equivalent, but is close.

In a few cases, we have actually force the meter to draw with AntiAlias=1 since the default D2D version was not good enough.

We may be looking to add some anti-alias options in the future, but it will most likely require a new option. These will probably effect mostly images used in Rainmeter.

jsmorley wrote: April 6th, 2019, 3:24 pm Part of the issue is that in reality, EVERYTHING in Rainmeter is an "image".
Huh? This is somewhat misleading. We don't really work with images directly (except for the loading "real" images and displaying them). What really happens is we draw onto a canvas, which is then "presented" to the screen. D2D/D3D uses an image as a backbuffer to "flip" our canvas onto the screen. We don't directly work with the backbuffer too much.

-Brian
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: VectorConverter [V 0.1.3]

Post by jsmorley »

Brian wrote: April 8th, 2019, 7:00 am Huh? This is somewhat misleading. We don't really work with images directly (except for the loading "real" images and displaying them). What really happens is we draw onto a canvas, which is then "presented" to the screen. D2D/D3D uses an image as a backbuffer to "flip" our canvas onto the screen. We don't directly work with the backbuffer too much.
Yeah, I shouldn't have gone down that road, as the semantics get pretty murky pretty fast. It was my assumption that meters are at the end created into a "bitmap" that is then drawn onto the canvas.
User avatar
raiguard
Posts: 658
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: VectorConverter [V 0.1.3]

Post by raiguard »

I have discovered that 99% of the failed conversions with this tool can be worked around by first converting all path coordinates to absolute. You can use this tool to do so. Open the SVG code, copy the path definition, paste it onto the website, convert it and replace the string in the SVG. Refresh the vectorconverter skin and hopefully it will work!

All of the icons in this skin are shape meters, there is no image in sight. It's beautiful.
2019-05-03 21_48_30-D__Caleb_Development_Rainmeter_Testbench_Skins_ModernGadgets_NetworkMeter_Networ.png
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
F!.OW
Posts: 22
Joined: April 1st, 2018, 12:42 pm

Re: VectorConverter [V 0.1.3]

Post by F!.OW »

This tool worked great in the beginning with SVG files I created in Affinity Designer, but sadly, something has changed (in AD) and is no longer the case. With some tweaking, sometimes it works, but not like it once did.

Here's to hoping further development on this tool picks up, it's invaluable for shape creation.
User avatar
MultiPotent
Posts: 6
Joined: August 30th, 2021, 10:13 pm

Re: VectorConverter [V 0.1.3]

Post by MultiPotent »

Okay first off this tool is highly underated for how much time it can save you! But if you dont understand some basics about it, it can be frustrating.

Here is how to use the app without issues:

Tip 1: If you add your file and hit convert and nothing happens. It means your file's contents are incompatible. But the app still works you just have to fix your SVG file! (Instructions below)

Tip 2: If your file does convert correctly you need to Left Click the provided code and it will instantly copy to your clipboard. You can now paste the output anywhere you like. There will be no indicator or alert that the output has now copied to your clipboard; it does it in the background only after left clicking on the code provided. You can not select the provided code like "input text". Just click it.

------------------------------------------

SOLUTION IF SVG NOT WORKING:

How i solved it:
  • If you have an SVG that is not working in VectorConverter [V 0.1.3], First convert your SVG to a PNG File. If you dont know how to do this properly you can use this easy tool here: https://convertio.co/SVG-PNG
The final result is an SVG file that works in VectorConverter [V 0.1.3]. :D

Note/Tip: If you're getting bad output from convertio.co/PNG-SVG try to increase the size of the PNG so it has enough data to trace. Also sometimes it has trouble reading light colors. If possible convert to a black color and than update the color once in rainmeter.
  • if the convertio.co solution stops working just try different vector programs i guess.
I actually got better results using the Vector Magic windows app for creating vectors for VectorConverter [V 0.1.3], but i think thats a paid app.

------------------------------------------

HOW TO RESIZE YOUR NEW SHAPE:

Example:

Code: Select all

[Variables]
; Comment: Sizing Tip: 1 = full scale | 2 = double scale | 0.5 = half scale | 0.0554?? = add more numbers to scale in smaller increments.
ScaleThisSVG=0.532

[ConvertedShape]
Meter=Shape
X=0
Y=0
H=0 ;important or will have invisible margins
W=0 ;important or will have invisible margins
Shape = Path Path1 | fill color 43, 46, 58 | StrokeWidth 0
Path1 = 200, 0 | LineTo 200.32, 0 | CurveTo 207.5, 10.52, 203.01, 3.29, 205.14, 6.99 | CurveTo 338.54, 191.44, 247.67, 73.31, 295.23, 130.87 | CurveTo 378.82, 257.07, 353.31, 212.44, 367.45, 234 | CurveTo 400, 326.99, 389.8, 278.92, 397.99, 302.48 | LineTo 400, 348 | CurveTo 385.02, 406.09, 398.56, 368.05, 393.57, 387.88 | CurveTo 359.19, 446.19, 378.35, 420.59, 369.22, 433.83 | CurveTo 278.62, 501.55, 337.27, 470.72, 309.36, 489.85 | CurveTo 180.96, 514.99, 247.67, 513.46, 213.96, 517.89 | CurveTo 57.73, 463.21, 135.81, 511.35, 91.79, 493.19 | CurveTo 4.74, 377.95, 32.17, 440.9, 12.95, 410.98 | CurveTo 1.38, 319.05, -0.16, 358.76, -0.61, 338.68 | CurveTo 31.3, 229.25, 4.37, 287.34, 15.17, 256.63 | CurveTo 78.55, 163.49, 44.93, 205.9, 61.31, 184.28 | CurveTo 131.27, 99.22, 96.14, 142.08, 113.72, 120.67 | CurveTo 177.74, 35.72, 147.66, 78.73, 163.3, 57.63 | CurveTo 200, 0, 185.7, 24.15, 192.57, 11.9 | ClosePath 1
; Comment: Transform the size of the Shape using above Dynamic Variable
TransformationMatrix=#ScaleThisSVG#;0;0;#ScaleThisSVG#;0;0
DynamicVariables=1
Special thanks to: https://forum.rainmeter.net/viewtopic.php?f=138&t=32423&p=162682&hilit=VectorConverter+Icons#p162682
Last edited by MultiPotent on September 20th, 2021, 10:25 pm, edited 4 times in total.
User avatar
balala
Rainmeter Sage
Posts: 13337
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: VectorConverter [V 0.1.3]

Post by balala »

MultiPotent wrote: September 18th, 2021, 1:25 am Okay first off this tool is highly underated for how much time it can save you! But if you dont understand some basics about it, it can be frustrating.

Here is how to use the app without issues:

Tip 1: If you add your file and hit convert and nothing happens. It means your file's contents are incompatible. But the app still works you just have to fix your SVG file! (Instructions below)

Tip 2: If your file does convert correctly you need to Left Click the provided code and it will instantly copy to your clipboard. You can now paste the output anywhere you like. There will be no indicator or alert that the output has now copied to your clipboard; it does it in the background only after left clicking on the code.

------------------------------------------

SOLUTION IF SVG NOT WORKING:

How i solved it:
  • If you have an SVG that is not working in VectorConverter [V 0.1.3], First convert your SVG to a PNG File. If you dont know how to do this properly you can use this easy tool here: https://convertio.co/SVG-PNG
The final result is an SVG file that works in VectorConverter [V 0.1.3]. :D

Note/Tip: If you're getting bad output from convertio.co/PNG-SVG try to increase the size of the PNG so it has enough data to trace. Also sometimes it has trouble reading light colors. If possible convert to a black color and than update the color once in rainmeter.
  • if the solution above stops working just try different vector programs i guess.
I actually got better results using the Vector Magic windows app for creating vectors but i think thats a paid app.
DynamicVariables=1[/code]

Special thanks to: https://forum.rainmeter.net/viewtopic.php?f=138&t=32423&p=162682&hilit=VectorConverter+Icons#p162682
I agree with you when you say this is a highly underrated tool. Unfortunately it is, even if I suppose the author have invested a lot of effort and work in creating it.
Mayn thanks for this description of what is going on when nothing is going on. In past I experienced this kind of problems a few times and since I was not sure on what is going on, I usually quickly renounced. Now having this description next time I'm gonna know what to do.
So thank you again.