Quantcast

SVG widget?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SVG widget?

Richmond Mathewson via use-livecode
Peter Thirkell wrote a widget that import SVG with multiple colors.

Download this widget source code from this forum post:
http://forums.livecode.com/viewtopic.php?f=93&t=27811&p=147279#p147286

Could you compile and use it in your own LiveCode setup?

Al
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG widget?

Richmond Mathewson via use-livecode
> Scott R. wrote:
> Maybe it’s more accurate to say "one single path definition"
> because you aren't limited to a single vector path. You can
> create compound graphics from multiple paths as is done in
> many icons and graphics.
> For example:
> go url "http://tactilemedia.com/download/svg_sample.livecode"

Yes. If you define path by "connected points" (I haven't seen
that in any specification).

But your example is a fine example for a nice option we have
with the LC-SVG icons:
We can simply "merge" some of them to one icon by merging their
(textual) iconPathes.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG widget?

Richmond Mathewson via use-livecode
On 2017-05-14 00:58, hh via use-livecode wrote:

>> Scott R. wrote:
>> Maybe it’s more accurate to say "one single path definition"
>> because you aren't limited to a single vector path. You can
>> create compound graphics from multiple paths as is done in
>> many icons and graphics.
>> For example:
>> go url "http://tactilemedia.com/download/svg_sample.livecode"
>
> Yes. If you define path by "connected points" (I haven't seen
> that in any specification).
>

SVG paths are an extension of PostScript paths - these are a sequence
of disjoint subpaths. You can have as many such subpaths as you like.

However, they are always rendered as 'one thing' which is where the
fillRule (evenodd or nonzero) and direction of the subpaths comes into
play to decide which parts are filled and which parts are not.

A good illustrated example is given here:

   http://commons.oreilly.com/wiki/index.php/SVG_Essentials/Paths

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG widget?

Richmond Mathewson via use-livecode
In reply to this post by Richmond Mathewson via use-livecode
On 05/13/2017 01:46 PM, Alejandro Tejada via use-livecode wrote:
> Peter Thirkell wrote a widget that import SVG with multiple colors.
>
> Download this widget source code from this forum post:
> http://forums.livecode.com/viewtopic.php?f=93&t=27811&p=147279#p147286

I added my updates to that forum post, building on Peter's fine work.
Allows for my flexibility for svg files from other formats.
The lack of xml and word chunk processing in LCB is a severe handicap.

--
  Mark Wieder
  [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...