Re: Create image from SVG widget

2020-09-23 Thread Brian Milby via use-livecode
If it is placed in a library that is distributed with the IDE, then you 
wouldn’t need to worry about the LCB side of it.

If it is easy enough to translate a path in the compile code, LCB wouldn’t be 
needed at all.  I just didn’t spend enough time to figure it out.

Sent from my iPhone

> On Sep 23, 2020, at 8:18 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Brian,
> 
>> Am 23.09.2020 um 14:12 schrieb Brian Milby via use-livecode 
>> :
>> 
>> It doesn’t require an actual file, just an XML document.  
> 
> yes, I understood that already. 8-)
> 
>> I posted LCB code to convert the SVG path to what is needed for the compile. 
>>  It will require an engine change or LCB to get the path translated to 
>> remove top/left extra space.
>> I think the best way would be to update one of the LCB libraries to include 
>> my handler and the add a handler to the drawing library that uses it to do 
>> the compile.
>> Now that I’m writing/thinking, it might could be done inside the LCB code 
>> with a call to the compile script.
> 
> Thank you, but LCB is still a complete mistery to me and that ain't gonna 
> change in the near future...
> 
>> Sent from my iPhone
>>> ...
>>> FYI:
>>> I just created an enhancement request to make drawingSVGCompile also work
>>> internally with a widget: 
>>> 
>>> 
 Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode 
 :
 Hi Brian,
>> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode 
>> :
> Here's a link to the post in the archives:
> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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: Create image from SVG widget

2020-09-23 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 23.09.2020 um 14:12 schrieb Brian Milby via use-livecode 
> :
> 
> It doesn’t require an actual file, just an XML document.  

yes, I understood that already. 8-)

> I posted LCB code to convert the SVG path to what is needed for the compile.  
> It will require an engine change or LCB to get the path translated to remove 
> top/left extra space.
> I think the best way would be to update one of the LCB libraries to include 
> my handler and the add a handler to the drawing library that uses it to do 
> the compile.
> Now that I’m writing/thinking, it might could be done inside the LCB code 
> with a call to the compile script.

Thank you, but LCB is still a complete mistery to me and that ain't gonna 
change in the near future...

> Sent from my iPhone
>> ...
>> FYI:
>> I just created an enhancement request to make drawingSVGCompile also work
>> internally with a widget: 
>> 
>> 
>>> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode 
>>> :
>>> Hi Brian,
> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode 
> :
 Here's a link to the post in the archives:
 http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Create image from SVG widget

2020-09-23 Thread Brian Milby via use-livecode
It doesn’t require an actual file, just an XML document.  I posted LCB code to 
convert the SVG path to what is needed for the compile.  It will require an 
engine change or LCB to get the path translated to remove top/left extra space.

I think the best way would be to update one of the LCB libraries to include my 
handler and the add a handler to the drawing library that uses it to do the 
compile.

Now that I’m writing/thinking, it might could be done inside the LCB code with 
a call to the compile script.

Sent from my iPhone

> On Sep 23, 2020, at 3:19 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi all,
> 
> FYI:
> I just created an enhancement request to make drawingSVGCompile also work
> internally with a widget: 
> 
>> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode 
>> :
>> Hi Brian,
 Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode 
 :
>>> 
>>> Here's a link to the post in the archives:
>>> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html
>>> 
>>> I could get close, but still needed to work out a way to translate the path
>>> to improve upon what was already discussed.  (I can get the actual bounding
>>> box, but it doesn't really help with eliminating the need to use the cropIt
>>> handler.)
>> ...
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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: Create image from SVG widget

2020-09-23 Thread Klaus major-k via use-livecode
Hi all,

FYI:
I just created an enhancement request to make drawingSVGCompile also work
internally with a widget: 

> Am 22.09.2020 um 10:08 schrieb Klaus major-k via use-livecode 
> :
> Hi Brian,
>> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode 
>> :
>> 
>> Here's a link to the post in the archives:
>> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html
>> 
>> I could get close, but still needed to work out a way to translate the path
>> to improve upon what was already discussed.  (I can get the actual bounding
>> box, but it doesn't really help with eliminating the need to use the cropIt
>> handler.)
> ...

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Create image from SVG widget

2020-09-22 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode 
> :
> 
> Here's a link to the post in the archives:
> http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html
> 
> I could get close, but still needed to work out a way to translate the path
> to improve upon what was already discussed.  (I can get the actual bounding
> box, but it doesn't really help with eliminating the need to use the cropIt
> handler.)

thank you very much, will take a look!

> On Mon, Sep 21, 2020 at 10:18 PM Brian Milby  wrote:
> 
>> You do not need a file, but you do need additional code.  I found a
>> handler from a Sep 2018 thread that wraps a path to form the input needed
>> for the compile.  LC Mark mentioned an internal call that could enhance the
>> process but I didn’t see any code that leveraged it.  Let me take a crack
>> at it and see what I come up with.
>> 
>> Sent from my iPhone
>> ...
>>> 
>>>> This may be what you're looking for:
>>>> 
>>>> put drawingSvgCompile(tFileText) into tDrawing
>>>> set the text of image "svgImage" to tDrawing
>>>> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024
>>>> The stack in the forum post will let you see the difference in how a
>>>> particular svg file is rendered in the browser widget, as a SVG path
>>>> (widget), and as a SVG Compiled Drawing (image).  There is some
>> additional
>>>> code available that will translate the path (effectively trim extra
>> space
>>>> around the image) that I have not incorporated.
>>> 
>>> thank you!
>>> 
>>> But I thought we could do this from a SVG widget without the need of a
>> .svg FILE.
>>> Was I dreaming?

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Create image from SVG widget

2020-09-21 Thread Brian Milby via use-livecode
Here's a link to the post in the archives:
http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html

I could get close, but still needed to work out a way to translate the path
to improve upon what was already discussed.  (I can get the actual bounding
box, but it doesn't really help with eliminating the need to use the cropIt
handler.)

On Mon, Sep 21, 2020 at 10:18 PM Brian Milby  wrote:

> You do not need a file, but you do need additional code.  I found a
> handler from a Sep 2018 thread that wraps a path to form the input needed
> for the compile.  LC Mark mentioned an internal call that could enhance the
> process but I didn’t see any code that leveraged it.  Let me take a crack
> at it and see what I come up with.
>
> Sent from my iPhone
>
> > On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi Brian
> >
> >> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode <
> use-livecode@lists.runrev.com>:
> >>
> >> This may be what you're looking for:
> >>
> >> put drawingSvgCompile(tFileText) into tDrawing
> >> set the text of image "svgImage" to tDrawing
> >> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024
> >> The stack in the forum post will let you see the difference in how a
> >> particular svg file is rendered in the browser widget, as a SVG path
> >> (widget), and as a SVG Compiled Drawing (image).  There is some
> additional
> >> code available that will translate the path (effectively trim extra
> space
> >> around the image) that I have not incorporated.
> >
> > thank you!
> >
> > But I thought we could do this from a SVG widget without the need of a
> .svg FILE.
> > Was I dreaming?
> >
> > Best
> >
> > Klaus
> >
> > --
> > Klaus Major
> > https://www.major-k.de
> > kl...@major-k.de
> >
> >
> > ___
> > 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: Create image from SVG widget

2020-09-21 Thread Brian Milby via use-livecode
You do not need a file, but you do need additional code.  I found a handler 
from a Sep 2018 thread that wraps a path to form the input needed for the 
compile.  LC Mark mentioned an internal call that could enhance the process but 
I didn’t see any code that leveraged it.  Let me take a crack at it and see 
what I come up with.

Sent from my iPhone

> On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Brian
> 
>> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode 
>> :
>> 
>> This may be what you're looking for:
>> 
>> put drawingSvgCompile(tFileText) into tDrawing
>> set the text of image "svgImage" to tDrawing
>> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024
>> The stack in the forum post will let you see the difference in how a
>> particular svg file is rendered in the browser widget, as a SVG path
>> (widget), and as a SVG Compiled Drawing (image).  There is some additional
>> code available that will translate the path (effectively trim extra space
>> around the image) that I have not incorporated.
> 
> thank you!
> 
> But I thought we could do this from a SVG widget without the need of a .svg 
> FILE.
> Was I dreaming?
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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: Create image from SVG widget

2020-09-21 Thread Klaus major-k via use-livecode
Hi Brian

> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode 
> :
> 
> This may be what you're looking for:
> 
> put drawingSvgCompile(tFileText) into tDrawing
> set the text of image "svgImage" to tDrawing
> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024
> The stack in the forum post will let you see the difference in how a
> particular svg file is rendered in the browser widget, as a SVG path
> (widget), and as a SVG Compiled Drawing (image).  There is some additional
> code available that will translate the path (effectively trim extra space
> around the image) that I have not incorporated.

thank you!

But I thought we could do this from a SVG widget without the need of a .svg 
FILE.
Was I dreaming?

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Create image from SVG widget

2020-09-21 Thread Brian Milby via use-livecode
This may be what you're looking for:

put drawingSvgCompile(tFileText) into tDrawing
set the text of image "svgImage" to tDrawing

http://forums.livecode.com/viewtopic.php?f=10=30441#p163024

The stack in the forum post will let you see the difference in how a
particular svg file is rendered in the browser widget, as a SVG path
(widget), and as a SVG Compiled Drawing (image).  There is some additional
code available that will translate the path (effectively trim extra space
around the image) that I have not incorporated.


On Mon, Sep 21, 2020 at 4:41 PM Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mark,
>
> > Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode <
> use-livecode@lists.runrev.com>:
> > On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote:
> >> Hi friends,
> >> I need a little hint, I forgot what command creates an image
> >> from an SVG widget. 8-)
> >> ...
> >> set the text of img 1 to ???(???)
> >> ...
> >> Thanks for any hint!
> >
> > Dunno.
>
> very helpful, thank you. :-D
>
> > I export a snapshot from the widget.
> >
> > --
> > Mark Wieder
> > ahsoftw...@gmail.com
>
> Best
>
> Klaus
>
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
>
>
> ___
> 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: Create image from SVG widget

2020-09-21 Thread Klaus major-k via use-livecode
Hi Mark,

> Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode 
> :
> On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote:
>> Hi friends,
>> I need a little hint, I forgot what command creates an image
>> from an SVG widget. 8-)
>> ...
>> set the text of img 1 to ???(???)
>> ...
>> Thanks for any hint!
> 
> Dunno.

very helpful, thank you. :-D

> I export a snapshot from the widget.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Create image from SVG widget

2020-09-21 Thread Mark Wieder via use-livecode

On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote:

Hi friends,

I need a little hint, I forgot what command creates an image
from an SVG widget. 8-)
...
set the text of img 1 to ???(???)
...

Thanks for any hint!


Dunno.
I export a snapshot from the widget.

--
 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


Create image from SVG widget

2020-09-21 Thread Klaus major-k via use-livecode
Hi friends,

I need a little hint, I forgot what command creates an image 
from an SVG widget. 8-)
...
set the text of img 1 to ???(???)
...

Thanks for any hint!


Best

Klaus
--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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-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


SVG widget and grab me command

2019-02-21 Thread Tore Nilsen via use-livecode


When one of my students tried to use grab me command in a mouseDown handler on 
a SVG widget, some strange things happened. In run-mode, the script did not 
work as expected. The widget would not move with the mouse. When switching back 
to edit mode, the widget started to move with the mouse once the cursor entered 
the rect of the stack. It was impossible to put down the widget afterwards.

The same thing happened when we tried to make the widget follow the mouse in a 
mouseMove handler. Has anyone else come across this?

Best regards 
Tore Nilsen
___
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: Let's rotate an SVG widget

2018-01-07 Thread Richmond Mathewson via use-livecode

"But you can compute the needed rectangle and resize the

widget accordingly by LC Script."

Indeed: but that presupposes I'm NOT a lazy slob8-)

http://forums.livecode.com/viewtopic.php?f=8=30405

Richmond.


On 7/1/2018 11:58 am, hh via use-livecode wrote:

Maintain aspect ratio is for resizing the svg object
when resizing the widget.

What you want is  probably that the widget resizes its
rectangle *minimally* so that the size of the svg remains
unchanged when rotating. That's not (yet) available in LCB.

But you can compute the needed rectangle and resize the
widget accordingly by LC Script.
(I did that for a rotating text widget).

___
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: Let's rotate an SVG widget

2018-01-07 Thread hh via use-livecode
Maintain aspect ratio is for resizing the svg object
when resizing the widget.

What you want is  probably that the widget resizes its
rectangle *minimally* so that the size of the svg remains
unchanged when rotating. That's not (yet) available in LCB.

But you can compute the needed rectangle and resize the
widget accordingly by LC Script.
(I did that for a rotating text widget).

___
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: Let's rotate an SVG widget

2018-01-07 Thread Richmond Mathewson via use-livecode

I went here: https://livecode.com/livecode-widgets-svg-path/

and came across maintainAspectRatio which sounds dead groovy:

setthemaintainAspectRatio ofwidget "hour" totrue
settheangleofwidget "hour" toINC

but it didn't maintain its aspect ratio . . .

Richmond.


On 7/1/2018 10:43 am, Richmond Mathewson wrote:

So, I imported an SVG from Inkscape into an SVG widget . . .

Then I tried to rotate the thing;

it rotated,

it kept "swelling and shrinking" because its bounding box was square.

This is not cutting the mustard.

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


Let's rotate an SVG widget

2018-01-07 Thread Richmond Mathewson via use-livecode

So, I imported an SVG from Inkscape into an SVG widget . . .

Then I tried to rotate the thing;

it rotated,

it kept "swelling and shrinking" because its bounding box was square.

This is not cutting the mustard.

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


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 
> <use-livecode@lists.runrev.com> 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 
>> <use-livecode@lists.runrev.com> 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

SVG widget?

2017-05-13 Thread Alejandro Tejada 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=27811=147279#p147286

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

Al
___
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 
> <use-livecode@lists.runrev.com> 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

SVG widget?

2017-05-13 Thread Alejandro Tejada via use-livecode
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

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 
> <use-livecode@lists.runrev.com> 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


SVG widget?

2017-05-13 Thread Richmond Mathewson via use-livecode
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


Re: Drop Shadow Not Available on SVG widget

2016-10-31 Thread Devin Asay
On Oct 30, 2016, at 11:48 PM, Jeanne A. E. DeVoto  
wrote:
> 
> At 4:51 AM + 10/31/2016, Sannyasin Brahmanathaswami wrote:
>> Any work arounds?
> 
> 
> Can you put it in a group and set a drop shadow for the group?

Just tried that. It works beautifully.

Devin

Devin Asay
Director
Office of Digital Humanities
Brigham Young University


___
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: Drop Shadow Not Available on SVG widget

2016-10-31 Thread Mark Waddingham

On 2016-10-31 05:51, Sannyasin Brahmanathaswami wrote:

is it worth asking for an enhancement?  or is this just "not going to
happen, no way, no how" because of the nature of SVG inside a widget?


I've filed a report in the quality center:

http://quality.livecode.com/show_bug.cgi?id=18735

I can't think of a reason off the top of my head why they shouldn't be 
allowed to work - I *think* it is just an oversight.


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: Drop Shadow Not Available on SVG widget

2016-10-31 Thread hh
DropShadow can be made available in LCB, just extend
the widget with your code for that and rebuild it.
Or:
Use the SVGText-widget, which has (fixed) dropshadow.
For that do in the Property Inspector of the SVGText-widget
[1] check "useShadow" in section "Colors",
[2] copy the iconPath of the SVGIcon-widget to the
svgTextPath (section "Contents"),
[3] check "inputPathInstructions" (below the svgTextPath).


___
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: Drop Shadow Not Available on SVG widget

2016-10-30 Thread Jeanne A. E. DeVoto

At 4:51 AM + 10/31/2016, Sannyasin Brahmanathaswami wrote:

Any work arounds?



Can you put it in a group and set a drop shadow for 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


Drop Shadow Not Available on SVG widget

2016-10-30 Thread Sannyasin Brahmanathaswami
I guess I can understand why the SVG which has no graphic effects available.

OTHO If one has a series  of icons along a toolbar, mixing different control 
types, we need it.

You can set graphic effects for

button 1 (which uses a letter for it's label)   # nice drop shadow
button 2 (which uses a icon ) # nice drop shadow
Widget 3 (acting as a button) # we are stuck now: no drop shadow available

Any work arounds?

is it worth asking for an enhancement?  or is this just "not going to happen, 
no way, no how" because of the nature of SVG inside a widget?


BR

___
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: Re: (Re: Apply an SVG Widget as a single object in a st....)

2016-06-19 Thread James Hale
Firstly sorry about the subject less post and secondly for my double post 
(seeing I didn't see my first post due to it having no subject. Phew!)

Anyway, rjd318 asked...

> Ah! What's the library stack that does the svg path conversion?


The latest version is included on the last post to this thread.

http://forums.livecode.com/phpBB2/viewtopic.php?f=8=27202

James
___
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: Apply an SVG Widget as a single object in a stack to multiple buttons as icon?

2016-06-19 Thread Klaus major-k
Hi all,

> Am 19.06.2016 um 07:03 schrieb Richard Gaskin :
> 
> Sannyasin Brahmanathaswami wrote:
> 
> > With images we can import a raster "object" and then set the icon
> > of a button to that image.
> >
> > Wouldn't it be nice to be able to do the same with a SVG file?
> 
> We can't?

No we can't!

> What's the point of an SGV Icon object if it can't be used as an icon?

There is already an enhancement request: 


> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for Desktop, Mobile, and Web

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Apply an SVG Widget as a single object in a stack to multiple buttons as icon?

2016-06-19 Thread Richmond
Well: Let's start at the beginning (Yes, I know; that's oozing with 
originality; sorry.):


1. How does one import an SVG image in the IDE?

[By that I don't mean "fekking around" extracting path data and so on].

2. I popped the 'black star' SVG thingy on a stack and tried to set a 
button up so

it had that SVG as an icon . . . like this:

The SVG had an ide assigned of 1003

The prefs palette would not allow me to set the button's icon to 1003.

3. Is it just me, or is the 'thing' with SVG images still in a sort of 
alpha-beta state?

--

4. I thought I'd try a "different way", and to test that I imported a 
PNG image

called "INKKY.png" [don't ask] and executed this in the MessageBox:

set the icon of btn "BT" to the id of img "INKY" . . . and, 
unsurprisingly it worked.


So:

5. set the icon of btn "BT" to the id of widget "SVG icon" . . . Humph: 
obviously expecting a bit much.


---

There are 2 questions that I can think of just now:

6. Why bother with using an SVG image as an icon when it's dead easy to 
convert it into a PNG
image using any number of image processors, and then importing that into 
one's stack?


6.5. [possible answer] Because if one sets one's stack up to scale to an 
end-user's monitor a PNG

might get jaggy round the edges.

7. When (?) are we going to be able to go /Menu/File/Import as 
Control/Image File...
and an SVG file will be imported just the same as a GIF, JPG, PNG or one 
of those funny image formats nobody has heard of?


Richmond.

On 19.06.2016 08:03, Richard Gaskin wrote:

Sannyasin Brahmanathaswami wrote:

> With images we can import a raster "object" and then set the icon
> of a button to that image.
>
> Wouldn't it be nice to be able to do the same with a SVG file?

We can't?

What's the point of an SGV Icon object if it can't be used as an icon?




___
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: Apply an SVG Widget as a single object in a stack to multiple buttons as icon?

2016-06-18 Thread Richard Gaskin

Sannyasin Brahmanathaswami wrote:

> With images we can import a raster "object" and then set the icon
> of a button to that image.
>
> Wouldn't it be nice to be able to do the same with a SVG file?

We can't?

What's the point of an SGV Icon object if it can't be used as an icon?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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


Apply an SVG Widget as a single object in a stack to multiple buttons as icon?

2016-06-18 Thread Sannyasin Brahmanathaswami
With images we can import a raster "object" and then set the icon of a button 
to that image.

Wouldn't it be nice to be able to do the same with a SVG file?  Theoretically 
then the different buttons calling that same (0ne and one only in the stack) 
SVG image as their icon could have varying sizes, but the image would still be 
perfect (since icon is rendering a vector object)

What is the use case? If our designers do cool things in illustrator. 
(hopefully one day we can support multiple colors and gradients in LC SVG 
widgets)  we would just like to save them once and call them into various 
contexts. Scenarios would include background on text button links, small icons 
on maps that would appear perfectly at any zoom level etc.  Even better: have a 
label that can sit on top.

see:

http://wiki.hindu.org/screenshots/vector-btn-bkgnds.jpg

the ragged "patches" behind the text/button links are vector… previously I was 
forced to save as PNG.. set the icon to a pattern, use the png as the pattern 
set icon gravity … careful manipulation of margins… But, advantage was: it was 
still a single object in the stack and the PNG could be applied to multiple 
buttons.

now I'm trying to see how I can get these as single SVG object(s)without having 
to have

a) SVG widget underneath
b) text button on top
So, we all know this -- except for lurking newbies, so FWIW we will "declare" 
the obvious:

currently the icon of a button set to an image requires that image to be the 
precisely sized to meet the button's display size/rendering requirements. I 
have in some scenarios, dynamically resized images that are used for button 
icons on different cards, so that they appear correctly. Goal was, obviously 
not to have multiple instances of the same image across multiple cards.

One might have a case where there were large buttons on a card… then the image 
for the icons may need to be set at e.g. 128 X 128.. then if you displayed them 
on a grid on another card you might down size them dynamically to 32 X 32.

Problem is of course there is always a break down of the image quality, even if 
set to "best" with SVG that should go away.

Is anyone doing this? I visualize a scenario where one dynamically sets the SVG 
path to a string that might be, for example, stored as a custom property 
(instead of on an "image resources" card)

Would it be worth it to make this a feature request, so that this icon 
assignment would be indifferent to the image format .png, svgwidget, jpg?  Then 
you could still work with "the button name" programmatically.

BR




___
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