RX and RY Parameters

309 views
Skip to first unread message

Nico Hennrich

unread,
Jan 6, 2017, 3:54:46 AM1/6/17
to Raphaël
I try to set RX and RY Paramters for a rect using:
rect.attr("rx",10);
rect.attr("ry",10);
        
Nothing happens rx and ry stay 0

In the method setFillAndStroke rx is handled in the following way:
case "rx":
if (att == "rx" && o.type == "rect") {
break;
}

So nothing is done.

I changed it to:
 case "rx":
 node.setAttribute(att, value);
if (att == "rx" && o.type == "rect") {
 break;
 }

Now it works. Is this a bug or did I use the atrr in a wrong way?

Ian B

unread,
Jan 6, 2017, 4:41:52 AM1/6/17
to raph...@googlegroups.com
I'm guessing rx/ry are not supported, probably because it's not implemented for VML (I may be wrong!) which would need to be supported also.

As mentioned, I may be wrong though! If you need more modern implementation for SVG similar to Raphael, you could take a look at Snap.svg.

Ian

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raphaeljs+unsubscribe@googlegroups.com.
To post to this group, send email to raph...@googlegroups.com.
Visit this group at https://groups.google.com/group/raphaeljs.
For more options, visit https://groups.google.com/d/optout.

Nico Hennrich

unread,
Jan 6, 2017, 5:12:24 AM1/6/17
to Raphaël
The strange thing is that is documented to work


Am Freitag, 6. Januar 2017 10:41:52 UTC+1 schrieb Ian:
I'm guessing rx/ry are not supported, probably because it's not implemented for VML (I may be wrong!) which would need to be supported also.

As mentioned, I may be wrong though! If you need more modern implementation for SVG similar to Raphael, you could take a look at Snap.svg.

Ian
On Fri, Jan 6, 2017 at 8:20 AM, 'Nico Hennrich' via Raphaël <raph...@googlegroups.com> wrote:
I try to set RX and RY Paramters for a rect using:
rect.attr("rx",10);
rect.attr("ry",10);
        
Nothing happens rx and ry stay 0

In the method setFillAndStroke rx is handled in the following way:
case "rx":
if (att == "rx" && o.type == "rect") {
break;
}

So nothing is done.

I changed it to:
 case "rx":
 node.setAttribute(att, value);
if (att == "rx" && o.type == "rect") {
 break;
 }

Now it works. Is this a bug or did I use the atrr in a wrong way?

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raphaeljs+...@googlegroups.com.

Ian B

unread,
Jan 6, 2017, 5:15:50 AM1/6/17
to raph...@googlegroups.com
Can you clarify where it's documented out of interest ?

Ian

To unsubscribe from this group and stop receiving emails from it, send an email to raphaeljs+unsubscribe@googlegroups.com.

Nico Hennrich

unread,
Jan 8, 2017, 2:38:35 PM1/8/17
to Raphaël

Ian B

unread,
Jan 8, 2017, 3:14:13 PM1/8/17
to raph...@googlegroups.com
I think thats just saying that its a possible parameter for an element (it is, ie in an ellipse), but I can't see it mentioned there as part of a rect.


To unsubscribe from this group and stop receiving emails from it, send an email to raphaeljs+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages