Open ratishphilip opened 6 years ago
Why can't the author use elliptical arcs, horizontal and vertical lines, and a mixture of the two, to achieve the desired effects?
It is just for the convenience of the author. For example, creating a Rectangle would require one command instead of providing two horizontal and two vertical line commands.
Rectangle, RoundedRectangle and Ellipse are commonly used geometries. It would be great if a convenient command was provided which would encapsulate the creation of the required horizontal lines, vertical lines or arcs.
The SVG path data language provides a simple way for describing complex geometries.
I have authored the Win2d Mini Language specification (which is based on the SVG Path data language). It has been implemented to create geometries using the Win2d library and the Windows 10 Composition layer. The Win2d Mini Language specification consists of several other commands (apart from the SVG path commands) which can be used to specify geometries of common figures and color and brushes etc.
I would like to propose the addition of the following commands in the Path data for SVG which can be useful for creating figures easily
Ellipse Figure
Adds an Ellipse figure to the path. The radiusX and radiusY parameters denote the elliptical radii on the x-axis and y-axis respectively. (x y) denotes the center of the ellipse. The current point remains unchanged.
Polygon Figure
Adds a n-sided Polygon figure to the path. The radius parameter denotes the elliptical radii on the x-axis and y-axis respectivelyhe radius of the circle circumscribing the polygon vertices. (x y) denotes the center of the polygon. The current point remains unchanged.
Rectangle Figure
Adds a Rectangle figure to the path. (x y) denotes the top-left corner of the rectangle. The current point remains unchanged.
RoundedRectangle Figure
Adds a RoundedRectangle figure to the path. (x y) denotes the top-left corner of the rectangle. radiusX and radiusY denote the radii of the corner curves on the x-axis and y-axis respectively. The current point remains unchanged.