Re: SVG widget and grab me command

2019-02-22 Thread Håkan Liljegren via use-livecode
Or you can use an image instead as they happily handle SVG files nowadays…

:-Håkan
On 21 Feb 2019, 18:18 +0100, Tore Nilsen via use-livecode 
, wrote:
>
> The simple solution was to «group» each individual SVG widget and add the 
> grab me command to the group.
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget and grab me command

2019-02-21 Thread Tore Nilsen via use-livecode
My mistake, I meant handles, not handlers. The widgets are used to display 
chess pieces. The actual script «controlling" each widget/group is a behavior, 
where the script itself resides in a button script.

Best regards
Tore



> 21. feb. 2019 kl. 18:36 skrev hh via use-livecode 
> :
> 
>> Tore wrote:
>> Since my student does not need any handlers (in fact would not
>> want any handlers added to the widgets) ...
> 
> That's exactly why I wrote ControlHandles: The approach doesn't
> change any property of a control/widget.
> 
> Your approach does (grouping, scripting) ...
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget and grab me command

2019-02-21 Thread hh via use-livecode
> Tore wrote:
> Since my student does not need any handlers (in fact would not
> want any handlers added to the widgets) ...

That's exactly why I wrote ControlHandles: The approach doesn't
change any property of a control/widget.

Your approach does (grouping, scripting) ...

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SVG widget and grab me command

2019-02-21 Thread Tore Nilsen via use-livecode
Thanks for your explanation. Since my student does not need any handlers (in 
fact would not want any handlers added to the widgets), the examples from 
«ControlHandles89» could not be used.

The simple solution was to «group» each individual SVG widget and add the grab 
me command to the group.

Best regards
Tore Nilsen








> 21. feb. 2019 kl. 16:02 skrev hh via use-livecode 
> :
> 
> Widgets are not ordinary controls.
> So this is not a bug, rather a missing feature (the widget
> author will have to implement an own "grab"-handler).
> The widget passes mouseDown but not in a way that "grab" can
> be used. MouseMove isn't passed (=> not usable) at all.
> 
> You could try "ControlHandles89" from "Sample Stacks" or
> http://livecodeshare.runrev.com/stack/902/
> which adds handles to widgets for resizing and grabbing.
> (Or use a solution similar to that).
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget and grab me command

2019-02-21 Thread Mark Wieder via use-livecode

On 2/21/19 7:02 AM, hh via use-livecode wrote:

Widgets are not ordinary controls.
So this is not a bug, rather a missing feature (the widget
author will have to implement an own "grab"-handler).
The widget passes mouseDown but not in a way that "grab" can
be used. MouseMove isn't passed (=> not usable) at all.


Actually, I *do* consider this a bug, although one by design.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SVG widget and grab me command

2019-02-21 Thread hh via use-livecode
Widgets are not ordinary controls.
So this is not a bug, rather a missing feature (the widget
author will have to implement an own "grab"-handler).
The widget passes mouseDown but not in a way that "grab" can
be used. MouseMove isn't passed (=> not usable) at all.

You could try "ControlHandles89" from "Sample Stacks" or
http://livecodeshare.runrev.com/stack/902/
which adds handles to widgets for resizing and grabbing.
(Or use a solution similar to that).


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SVG widget?

2017-05-16 Thread Mark Wieder 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=27811=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
 ahsoftw...@gmail.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SVG widget?

2017-05-15 Thread Mark Waddingham 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 ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread William Prothero via use-livecode
I wonder too. Seems with all the demand for SVG, it would be a natural to build 
into the engine. I’m trying to remember if getting SVG was a kickstarter goal???

Best,
Bill P

> On May 13, 2017, at 1:15 PM, Jonathan Lynch via use-livecode 
>  wrote:
> 
> I wish they would just buy an svg library and create a real svg object. This 
> seems like such an obvious thing to do.
> 
> Sent from my iPhone
> 
>> On May 13, 2017, at 4:00 PM, Richmond via use-livecode 
>>  wrote:
>> 
>> Well . . . .
>> 
>> here [ https://livecode.com/resources/roadmap/ ] all that is mentioned is a
>> 
>> "SVG vector shape widget"
>> 
>> Which is what we've got :/
>> 
>> Obviously full, multi-path SVG import is not
>> being considered.
>> 
>> Richmond.
>> 
>>> On 13.05.2017 21:16, Alejandro Tejada via use-livecode wrote:
>>> What happened to the multiple color SVG widget?
>>> http://forums.livecode.com/viewtopic.php?f=93=27811=147279#p147286
>>> 
>>> Al
>>> 
>>> Scott Rossi 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;
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread hh 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
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread Jonathan Lynch via use-livecode
I wish they would just buy an svg library and create a real svg object. This 
seems like such an obvious thing to do.

Sent from my iPhone

> On May 13, 2017, at 4:00 PM, Richmond via use-livecode 
>  wrote:
> 
> Well . . . .
> 
> here [ https://livecode.com/resources/roadmap/ ] all that is mentioned is a
> 
> "SVG vector shape widget"
> 
> Which is what we've got :/
> 
> Obviously full, multi-path SVG import is not
> being considered.
> 
> Richmond.
> 
>> On 13.05.2017 21:16, Alejandro Tejada via use-livecode wrote:
>> What happened to the multiple color SVG widget?
>> http://forums.livecode.com/viewtopic.php?f=93=27811=147279#p147286
>> 
>> Al
>> 
>> Scott Rossi 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;
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread Richmond via use-livecode

Well . . . .

here [ https://livecode.com/resources/roadmap/ ] all that is mentioned is a

"SVG vector shape widget"

Which is what we've got :/

Obviously full, multi-path SVG import is not
being considered.

Richmond.

On 13.05.2017 21:16, Alejandro Tejada via use-livecode wrote:

What happened to the multiple color SVG widget?
http://forums.livecode.com/viewtopic.php?f=93=27811=147279#p147286

Al

Scott Rossi 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;

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread Scott Rossi via use-livecode
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;

Regards,

Scott Rossi 
Creative Director 
Tactile Media, UX/UI Design 



> On May 13, 2017, at 6:56 AM, hh via use-livecode 
>  wrote:
> 
> The widget SVG Icon is set up to display at most ONE SINGLE path,
> no matter where the path comes from.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread Colin Holgate via use-livecode
In LiveCode 8.1.4 the path data for the M seems to look ok, and I didn’t get 
any errors.


> On May 13, 2017, at 9:56 AM, hh via use-livecode 
>  wrote:
> 
> @Colin
> Your letter "R" is not part of the (single) path.
> 
> @Richmond
> The widget SVG Icon is set up to display at most ONE SINGLE path,
> no matter where the path comes from.
> 
> The format must according to dict fulfill the SVG specifications
> https://www.w3.org/TR/SVG/paths.html#PathData.
> 
> Colin's _path_ demo contains also elliptical arcs (a- or A-Elements).
> 
> That's what LC obviously does not (yet) support in LC 9.0.0-dp6.
> It IS supported by LC 8.1.4-rc2.
> 
> The extracted path is (shows an "M")
> 
> M257.85,186a119.82,119.82,0,0,1,7.09-38
> c.45-1.24.88-3.22,1.64-4.25,1.81-2.48,2.39-1.47,3.54.62
> q2.21,4,4.16,8.15a153.47,153.47,0,0,1,7.49,19.24
> c.35,1.11,2.19,1.62,2.74.36l8.43-19.06
> c1.14-2.58,2.26-7.56,4.21-9.53,3.42-3.46,3.32,4.4,3.69,6.83
> l6.41,42.15c.29,1.9,3.18,1.09,2.89-.8L305.78,163l-2-13.41
> c-.45-2.95-.15-8.14-2.26-10.52-3.93-4.44-6.94,3-8.06,5.57
> l-11.49,26,2.74.36a157.53,157.53,0,0,0-9.81-24.06
> c-1.37-2.69-4.73-12-9.17-7.74-2.16,2.07-3,6.2-4,8.9
> a119.47,119.47,0,0,0-3.62,12.24
> A124.63,124.63,0,0,0,254.85,186
> c-.05,1.93,2.95,1.93,3,0Z
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG widget?

2017-05-13 Thread hh via use-livecode
@Colin
Your letter "R" is not part of the (single) path.

@Richmond
The widget SVG Icon is set up to display at most ONE SINGLE path,
no matter where the path comes from.

The format must according to dict fulfill the SVG specifications
https://www.w3.org/TR/SVG/paths.html#PathData.

Colin's _path_ demo contains also elliptical arcs (a- or A-Elements).

That's what LC obviously does not (yet) support in LC 9.0.0-dp6.
It IS supported by LC 8.1.4-rc2.

The extracted path is (shows an "M")

M257.85,186a119.82,119.82,0,0,1,7.09-38
c.45-1.24.88-3.22,1.64-4.25,1.81-2.48,2.39-1.47,3.54.62
q2.21,4,4.16,8.15a153.47,153.47,0,0,1,7.49,19.24
c.35,1.11,2.19,1.62,2.74.36l8.43-19.06
c1.14-2.58,2.26-7.56,4.21-9.53,3.42-3.46,3.32,4.4,3.69,6.83
l6.41,42.15c.29,1.9,3.18,1.09,2.89-.8L305.78,163l-2-13.41
c-.45-2.95-.15-8.14-2.26-10.52-3.93-4.44-6.94,3-8.06,5.57
l-11.49,26,2.74.36a157.53,157.53,0,0,0-9.81-24.06
c-1.37-2.69-4.73-12-9.17-7.74-2.16,2.07-3,6.2-4,8.9
a119.47,119.47,0,0,0-3.62,12.24
A124.63,124.63,0,0,0,254.85,186
c-.05,1.93,2.95,1.93,3,0Z


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SVG widget?

2017-05-13 Thread Colin Holgate via use-livecode
I tried the path data from the file I made for you. The text letter R is 
handled differently, but the M path data copy into LiveCode ok.


> On May 13, 2017, at 9:12 AM, Richmond Mathewson via use-livecode 
>  wrote:
> 
> Is it true that the Livecode SVG widget is ONLY setup to deal with code 
> pasted from Inkscape SVG images?
> 
> Might be time for Livecode to "fess up".
> 
> Richmond.
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode