SVG_SET_DIMENSIONS

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

version 11.3


SVG_SET_DIMENSIONS (svgObject; width{; height{; unit}})

ParameterTypeDescription
svgObjectSVG_RefReference of SVG element
widthNumberDimension on the X axis
heightNumberDimension on the Y axis
unitStringUnit of measurement

Description

The SVG_SET_DIMENSIONS command can be used to set the dimensions for the SVG object having the svgObject reference. If these attributes already exist, their values are replaced by those passed as parameters.

If the unit parameter is passed, it will be used. The expected values are: px, pt, pc, cm, mm or in. An incorrect unit value generates an error. If the parameter is omitted, the values of the width and height parameters are expected in the user coordinate system.

Example

   $svg :=SVG_New ` Create a new document
   $object:=SVG_New_rect ($svg; 10; 10; 200; 200; 0; 0; "black";"white"; 2)
   SVG_SET_DIMENSIONS ($object; -1; 400)`New height

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