SVG_New_line

4D - Documentation   Français   English   German   4D SVG Component, Command Theme List   4D SVG Component, Index   Back   Previous   Next

version 11.3


SVG_New_line (parentSVGObject; startX; startY; endX; endY{; color{; strokeWidth}}) SVG_Ref

ParameterTypeDescription
parentSVGObjectSVG_RefReference of parent element
startXNumberHorizontal start position
startYNumberVertical start position
endXNumberHorizontal end position
endYNumberVertical end position
colorStringColor or gradient name
strokeWidthLongintLine thickness
Function resultSVG_RefReference of line

Description

The SVG_New_line command creates a new line in the SVG container designated by parentSVGObject and returns its reference. The object is positioned according to the startX, startY, endX and endY coordinates. The SVG container can be the document root or any other reference to an SVG object that can contain this type of element.

The optional color parameter contains the name of the line color. (For more information about colors, please refer to the commands of the Colors and Gradients theme).

The optional strokeWidth parameter contains the pen size expressed in pixels. Its default value is 1.

Example

Draw a blue line that is 3 pixels thick:

   svgRef:= SVG_New
   objectRef:= SVG_New_line (svgRef;10;10;200;100;"blue";3)

See Also

SVG_New_polyline, SVG_PATH_LINE_TO.


4D - Documentation   Français   English   German   4D SVG Component, Command Theme List   4D SVG Component, Index   Back   Previous   Next