开发者

Raphael newbie: what are cx, rx, ox in Raphael.js

开发者 https://www.devze.com 2023-03-14 11:49 出处:网络
In Raphael.js documentation of official website, there are ma开发者_运维技巧ny parameters used, like cx, ox, rx, but what are the definitions for these parameters, can someone explain to me what are t

In Raphael.js documentation of official website, there are ma开发者_运维技巧ny parameters used, like cx, ox, rx, but what are the definitions for these parameters, can someone explain to me what are they represented for?

Where can I find the definitions for these parameters?


They are listed right there in the documentaiton you linked:

  • rx - Horisontal radius
  • cx - X coordinate of the origin of rotation

ox is just a variable they use to store data.


  • CX - the x-axis coordinate of the center of the circle, or ellipse
  • CY -the y-axis coordinate of the center of the circle, or ellipse
  • RX - horisontal radius of the ellipse
  • RY - vertical radius of the ellipse


Take a look here: Raphael Documentation - Element.attr. The parameter descriptions you are looking for are explained there.

So cx denotes the center x coordinate while rx defines the horizontal (x-axis) radius of an ellipse or circle. Same applies for vertical direction with y.

0

精彩评论

暂无评论...
验证码 换一张
取 消