Class SVGSolidColorElementBridge

All Implemented Interfaces:
SVGAnimationTargetContext, Bridge, BridgeUpdateHandler, GenericBridge, PaintBridge, XMLConstants, SVGContext, CSSConstants, SVGConstants

public class SVGSolidColorElementBridge extends AnimatableGenericSVGBridge implements PaintBridge
Bridge class for a regular polygon element.
  • Constructor Details

    • SVGSolidColorElementBridge

      public SVGSolidColorElementBridge()
      Constructs a new bridge for the <rect> element.
  • Method Details

    • getNamespaceURI

      public String getNamespaceURI()
      Returns the SVG namespace URI.
      Specified by:
      getNamespaceURI in interface Bridge
      Overrides:
      getNamespaceURI in class AbstractSVGBridge
    • getLocalName

      public String getLocalName()
      Returns 'rect'.
      Specified by:
      getLocalName in interface Bridge
    • createPaint

      public Paint createPaint(BridgeContext ctx, Element paintElement, Element paintedElement, GraphicsNode paintedNode, float opacity)
      Creates a Paint according to the specified parameters.
      Specified by:
      createPaint in interface PaintBridge
      Parameters:
      ctx - the bridge context to use
      paintElement - the element that defines a Paint
      paintedElement - the element referencing the paint
      paintedNode - the graphics node on which the Paint will be applied
      opacity - the opacity of the Paint to create
    • extractOpacity

      protected static float extractOpacity(Element paintElement, float opacity, BridgeContext ctx)
    • extractColor

      protected static Color extractColor(Element paintElement, float opacity, BridgeContext ctx)