SVGGroup

The SVGGroup allows you to modify SVG groups targeted form Design. Set fill, stroke, strokeWidth.

An SVGGroup should not be created in code. The only way to get an SVGGroup is through the elements property of SVGLayer

  1. svg = new SVGLayer
  2. svg: """
  3. <svg>
  4. <g id='group' name='Container'>
  5. <path id='shape' name='Rectangle' d='M0 0 H 150 V 75 H 0 L 0 0' />
  6. </g>
  7. </svg>
  8. """
  9. group = svg.elements.group

All properties set on an SVGGroup will be set on the containing paths. When using a property from a group, it will return the value of the underlying SVGPath properties, or null if the underlying SVGPaths have different values for that property.

group.fill <string>

Sets the fill color of all the paths contained in the group.

  1. group.fill = "#FFF"

group.stroke <string>

Sets the stroke color of all the paths contained in the group.

  1. group.stroke = "#0AF"

group.strokeWidth <number>

Sets the stroke width of all the paths contained in the group.

  1. group.strokeWidth = 10