RE: SVG Shape With No Background

2018-07-20 Thread Timothy Penner via 4D_Tech
> Who might I ask about adding that to the documentation as I think it would be 
> helpful for others in the future?

If you think the documentation should be update you can always submit a comment 
to the doc team, or post a public note on the doc page:

Tech Tip: The Comments feature for the Documentation Site .
http://kb.4d.com/assetid=77724

-Tim



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
> some time ago, we received a similar question from a customer,
> evidently it is intentional that opacity=0 is ignored (it is explicitly coded 
> that way).
> the explanation from the developer was that opacity=0 makes no sense and 
> "none" should be used instead.

I agree, it does make sense. I looked all over in the SVG documentation in the 
Colors and Gradients section and couldn’t find anything about using “none”. Who 
might I ask about adding that to the documentation as I think it would be 
helpful for others in the future?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: SVG Shape With No Background

2018-07-20 Thread Keisuke Miyako via 4D_Tech
F.Y.I.

the source code of SVG component is available for partners.

some time ago, we received a similar question from a customer,
evidently it is intentional that opacity=0 is ignored (it is explicitly coded 
that way).
the explanation from the developer was that opacity=0 makes no sense and "none" 
should be used instead.

2018/07/21 0:05、Cannon Smith via 4D_Tech 
<4d_tech@lists.4d.com>のメール:

$tRef:=SVG_New_circle ($tSVG;200;200;100;"red”;"none";10)

gives me a circle with no background.

So, never mind! :-)



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
I guess I just needed to hit the Send button to figure it out. It turns out 
that I can pass “none” as a color. I don’t see it in the documentation 
anywhere, but the SVG component must just pass it through to the SVG layer. So:

$tRef:=SVG_New_circle ($tSVG;200;200;100;"red”;"none";10) 

gives me a circle with no background.

So, never mind! :-)

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Jul 20, 2018, at 8:59 AM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>   $tRef:=SVG_New_circle ($tSVG;200;200;100;"red";"white:0";10) 
> //“white:0” = transparent

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
Hi All,

What is the best way to draw a shape (circle, rectangle, etc.) without a 
background using the SVG component? I tried using a “transparent” color:

$tRef:=SVG_New_circle ($tSVG;200;200;100;"red";"white:0";10) 
//“white:0” = transparent

But it seems that if you pass a color like “white:0” where the transparency 
part after the colon is 0, it is ignored and the fill-opacity attribute is not 
set.

I can call SVG_SET_OPACITY after creating the shape and it will set it 
properly, but I wasn’t expecting to have to call another command to remove the 
background of an object. Is this the normal way of doing it? Is there a special 
color I can use that denotes transparent? Is “white:0” not working considered a 
bug?

Or is trying to set the transparency the wrong way to do it? I guess at the end 
of the day what I’m really after is for the XML to end up with this attribute:

fill=“none”

What is the best way of doing this?


Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**