Class SVGSolidColorElementBridge

    • Constructor Detail

      • SVGSolidColorElementBridge

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

      • getLocalName

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

        public java.awt.Paint createPaint​(BridgeContext ctx,
                                          org.w3c.dom.Element paintElement,
                                          org.w3c.dom.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​(org.w3c.dom.Element paintElement,
                                              float opacity,
                                              BridgeContext ctx)
      • extractColor

        protected static java.awt.Color extractColor​(org.w3c.dom.Element paintElement,
                                                     float opacity,
                                                     BridgeContext ctx)