Free Vectors

All sorts of amusements and nonsense unrelated to xTalk
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Free Vectors

Post by richmond62 »

https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

Here they are as an Inkscape SVG document:

https://inkscape.org/
Attachments
drawing.svg.zip
(79.46 KiB) Downloaded 37 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

richmond62 wrote: Mon Sep 23, 2024 12:32 pm Here they are as an Inkscape SVG document
Thanks Richmond, I've slightly tweaked the SVG so that it has the correct size artboard
drawing-artboard.svg.zip
(38.78 KiB) Downloaded 39 times
Funny thing with this, if you import the SVG into a stack, you can no longer edit the script of the stack. Anyone else find that?
Yet, if you close the stack and make another - you can edit the script of the new stack. It seems to be when I import an SVG, or open a stack with an SVG inside, it disables script editing of the stack and the cards.
drawing.oxtstack
(122.25 KiB) Downloaded 34 times
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

That is quite a kicker that needs sorting out.

How about importing an SVG from somewhere other than those I uploaded?
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

Screenshot 2024-09-23 at 18.51.36.png
Screenshot 2024-09-23 at 18.51.36.png (129.23 KiB) Viewed 1517 times
-
No obvious problems with an SVG from another source than those.

https://svgsilh.com/image/2330021.html
-
Screenshot 2024-09-23 at 18.54.18.png
Screenshot 2024-09-23 at 18.54.18.png (127.13 KiB) Viewed 1517 times
Attachments
batman.svg.zip
(1.87 KiB) Downloaded 37 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

Nothing obviously wonky here either (MacOS 12):
-
Screenshot 2024-09-23 at 18.57.17.png
Screenshot 2024-09-23 at 18.57.17.png (198.51 KiB) Viewed 1516 times
-

But yours is wonky: so probably says more about something odd going on at your end than the SVG as such:
-
Screenshot 2024-09-23 at 18.59.26.png
Screenshot 2024-09-23 at 18.59.26.png (605.78 KiB) Viewed 1516 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

That's interesting.
The Batman svg is not a problem "over here" either. Something weird in that free svg file perhaps?
holy-scripteditor-batman.png
holy-scripteditor-batman.png (113.42 KiB) Viewed 1509 times
Judging by your screenshot, you can't do any script editing with that SVG arrows stack either?
I notice not only are all your menuitems disabled, so is the 'Script editor' button icon on the toolbar.

I'll have to do more testing.
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

I could NOT do anything with your stack, but when I created a new stack and imported your SVG file I COULD edit it.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

How bizarre. Didn't do anything different this time around, same file, but here we are with the script editor and all menuitems available. Very weird indeed.
how-strange.png
how-strange.png (152.28 KiB) Viewed 1503 times
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

Now my other question will invariably be, why don't they come through as editable paths or as graphics with points at the very least?
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

I was thinking something like this:
for-gotham.png
for-gotham.png (17.42 KiB) Viewed 1497 times
batman native.oxtstack
(2.9 KiB) Downloaded 33 times
points.png
points.png (5.59 KiB) Viewed 1497 times
points.txt.zip
(799 Bytes) Downloaded 34 times
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

why don't they come through as editable paths or as graphics with points at the very least?
OK:

1. Open the original SVG in Inkscape:
-
Inkscape1.jpg
Inkscape1.jpg (370.45 KiB) Viewed 1491 times
-
Select the vector image you want and paste t into a new Inkscape document:
-
Inkscape2.jpg
Inkscape2.jpg (311.34 KiB) Viewed 1491 times
-
Save the thing:
Attachments
squiggle_1.svg.zip
(3.62 KiB) Downloaded 33 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

I started to convert the shapes into points, but it's a time consuming process (so I've only done a few).
drawing3.png
drawing3.png (54.69 KiB) Viewed 1494 times
Using
https://shinao.github.io/PathToPoints/
to do this.

https://github.com/Shinao/PathToPoints? ... me-ov-file
Attachments
drawing3.oxtstack
(130.05 KiB) Downloaded 35 times
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

Import your exported SVG into a stack:
-
Screenshot 2024-09-23 at 21.44.24.png
Screenshot 2024-09-23 at 21.44.24.png (215.07 KiB) Viewed 1489 times
Attachments
Squiggle_1.oxtstack
(4 KiB) Downloaded 36 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

Although it is probably better to export ONLY the Vector:
-
Inkscape3.jpg
Inkscape3.jpg (267.65 KiB) Viewed 1483 times
-
As this gives you a tighter bounding box when you import the SVG into a stack:
-
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

That's great, but it's only slicing the svg up into individual sections.
The points still aren't adjustable within the ide as points.

What I had been doing above, was convert the svg into points that were adjustable in the IDE.
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

What I had been doing above, was convert the svg into points that were adjustable in the IDE.
Good point.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Free Vectors

Post by tperry2x »

Don't get me wrong, both approaches are valid.
There are times where you'd want an svg imported as it'll appear smoother because the curves are genuine curves.

However, there are times where you'd perhaps want to edit and recolour the graphic inside the IDE with the inspector. the downside there is you lose genuine curves as they are then angular points.

I kind of wish we could import the svg, keep the genuine curves, and also change the fill colour - all within the IDE. the only way I can currently think to do that is make the inspector aware of editing the svg data directly, let the inspector write back to file, then re-read it back in - all automatically.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Free Vectors

Post by OpenXTalkPaul »

tperry2x wrote: Mon Sep 23, 2024 7:35 pm Don't get me wrong, both approaches are valid.
There are times where you'd want an svg imported as it'll appear smoother because the curves are genuine curves.

However, there are times where you'd perhaps want to edit and recolour the graphic inside the IDE with the inspector. the downside there is you lose genuine curves as they are then angular points.

I kind of wish we could import the svg, keep the genuine curves, and also change the fill colour - all within the IDE. the only way I can currently think to do that is make the inspector aware of editing the svg data directly, let the inspector write back to file, then re-read it back in - all automatically.
There are at least four ways to use SVG files / path data in our IDE, they are:

1) import them as 'compiled' SVG data using the 'drawing lbrary', which can then be used with an IMAGE control. AFAICT this uses a binary format used by Skia internally. Currently there's no way to convert these SVG 'images' back into a normal SVG file. These also DO NOT BEHAVE like normal images, there's no pixels to manipulate.
It also does not fully support the SVG standards, for example styled text that may be embedded in the SVG file is ignored and so any text was to be converted into path data before it can be used with this method (https://forums.livecode.com/viewtopic.p ... e&start=15). The only upside to using this method is that they are resolution independent as vector graphics are.
https://livecode.fandom.com/wiki/DrawingSvgCompileFile

2) There's a widget that renders SVG XML that works with v8 and v9. This supports full color, multiple SVG paths, SVG for tags named shapes (like "circle", rounded rectangle. etc.), and most importantly the SVG XML is still editable (provided you know how to manually edit SVG format).

3) The SVG Path widget (which is used extensively by the IDE) can be used for simple line art (1-color) color vectors like these squiggly arrows.
https://livecode.byu.edu/graphics/livec ... upport.php

4) Convert SVG format into group of a series of shapes made out of Graphic controls. This was the only way to use SVG graphics prior to about version 8 of the engine. The problem with this is that graphic controls do not support bezier curve points, so any circles, rounded edges, etc. are actually being made by a bunch of smaller straight lines. But if you want to be able to pick apart the components shapes of the group that make up the graphics then this is a way of doing that. Although, in my opinion, it would make much more sense to edit SVG in a dedicated vector drawing application, rather than trying to make the IDE into a vector graphics tool.
https://livecodeshare.runrev.com/stack/ ... /112/SVGL/
http://at.livecodejournal.com/stacks/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Free Vectors

Post by richmond62 »

To be honest the free vectors (see firt message) strike me as really nothing on the sort as each one needs to be traced
to get its path in Inkscape, and I cannot work out why I cannot do that with the individual PNG images.

While one can see the data path of any of those SVG glyphs:
-
Screenshot 2024-09-24 at 9.08.53.png
Screenshot 2024-09-24 at 9.08.53.png (144.6 KiB) Viewed 1446 times
-
It is unclear to me HOW one can export it as a path SVG rather than a plain-garden rectangular thing.
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests