Class SvgUse

java.lang.Object

public class SvgUse
extends SvgGraphic
An SvgUse is an svg graphical element that uses another, previously defined graphical element to paint to the graphics context with its own set of styles and transforms.

See also: http://www.w3.org/TR/SVG/struct.html#UseElement

  • Field Details

    • linkId

      java.lang.String linkId
    • x

      float x
    • y

      float y
    • w

      java.lang.Float w
    • h

      java.lang.Float h
  • Constructor Details

  • Method Details

    • apply

      public void apply​(org.eclipse.swt.graphics.GC gc)
      Description copied from class: SvgGraphic
      Apply this svg graphic to the given graphics context.

      Note that to support the rather abstract structure of svg, each time this method is called all transformations and css properties to be calculated and applied. If this is a shape, it will be painted to the graphics context. Containers will recursively make this call on their children.

      Specified by:
      apply in class SvgGraphic
      Parameters:
      gc - the gc to use in all graphics operations
    • getFill

      SvgFill getFill()
      Overrides:
      getFill in class SvgGraphic
    • getStroke

      SvgStroke getStroke()
      Overrides:
      getStroke in class SvgGraphic