KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: The 4D SVG Method SVG_SET_XY does not affect SVG G elements
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: August 18, 2011

The 4D SVG Method SVG_SET_XY does not affect SVG "g" elements. 4D SVG creates "g" elements using the method SVG_New_group.

As defined by the W3C Working Group, The "g" element is a container element for grouping together related graphics elements. The "g" element itself does not contain or recognize "x" and "y" attributes. Using the 4D SVG Method SVG_SET_XY will insert the "x" and "y" attributes to the target "g" element but it will not be acted upon by the SVG engine.

When the goal is to move a group of objects that belong to a "g" element, Coordinate system transformations must be used. A "transform" attribute on a container or graphics element repositions all the objects in the container as one object.

For more on 4D SVG transforms see Attributes in the 4D SVG Component documentation.