Class SVGHandler

java.lang.Object
org.csstudio.utility.batik.SVGHandler

public class SVGHandler extends Object
SVGDocument handler. Handles render and animation of SVG files.
  • Field Details

    • handlerListener

      protected SVGHandlerListener handlerListener
    • listener

      protected SVGHandler.Listener listener
      The listener.
    • rendererFactory

      protected org.apache.batik.gvt.renderer.ImageRendererFactory rendererFactory
      The renderer factory.
    • renderer

      protected org.apache.batik.gvt.renderer.ImageRenderer renderer
      The current renderer.
    • userAgent

      protected org.apache.batik.bridge.UserAgent userAgent
      The user agent.
    • bridgeContext

      protected org.apache.batik.bridge.BridgeContext bridgeContext
      The current bridge context.
    • loader

      protected org.apache.batik.bridge.DocumentLoader loader
      The concrete bridge document loader.
    • gvtRoot

      protected org.apache.batik.gvt.GraphicsNode gvtRoot
    • updateManager

      protected UpdateManager updateManager
      The update manager.
    • timedDocumentRoot

      protected org.apache.batik.anim.timing.TimedDocumentRoot timedDocumentRoot
    • svgAnimationEngine

      protected SVGAnimationEngine svgAnimationEngine
    • cache

      protected AnimatedSVGCache cache
    • svgDocument

      protected org.w3c.dom.svg.SVGDocument svgDocument
      The current SVG document.
    • originalSVGDocument

      protected org.w3c.dom.svg.SVGDocument originalSVGDocument
    • originalDimension

      protected Dimension2D originalDimension
    • isDynamicDocument

      protected boolean isDynamicDocument
      Whether the current document has dynamic features.
    • animationLimitingMode

      protected int animationLimitingMode
      The animation limiting mode.
    • animationLimitingAmount

      protected float animationLimitingAmount
      The amount of animation limiting.
    • builder

      protected org.apache.batik.bridge.GVTBuilder builder
  • Constructor Details

    • SVGHandler

      public SVGHandler(org.w3c.dom.svg.SVGDocument doc, Display display)
  • Method Details

    • dispose

      public void dispose()
    • createUserAgent

      protected org.apache.batik.bridge.UserAgent createUserAgent()
      Creates a new user agent.
    • createBridgeContext

      protected org.apache.batik.bridge.BridgeContext createBridgeContext(org.apache.batik.anim.dom.SVGOMDocument doc)
      Creates a new bridge context.
    • createImageRenderer

      protected org.apache.batik.gvt.renderer.ImageRenderer createImageRenderer()
      Creates a new renderer.
    • handleException

      protected void handleException(Exception e)
    • getOriginalDocument

      public org.w3c.dom.svg.SVGDocument getOriginalDocument()
    • setRenderListener

      public void setRenderListener(SVGHandlerListener renderListener)
    • setRenderingHint

      public void setRenderingHint(Object key, Object value)
    • removeRenderingHint

      public void removeRenderingHint(Object key)
    • setCanvasSize

      public void setCanvasSize(int width, int height)
    • setColorToApply

      public void setColorToApply(Color newColor)
    • setColorToChange

      public void setColorToChange(Color newColor)
    • setTransformMatrix

      public void setTransformMatrix(double[][] newMatrix)
    • refreshContent

      public void refreshContent()
    • isDynamicDocument

      public boolean isDynamicDocument()
    • getDocumentSize

      public Dimension getDocumentSize()
      Returns:
      document size after applying matrix.
    • setAlignedToNearestSecond

      public void setAlignedToNearestSecond(boolean alignedToNearestSecond)
    • resumeProcessing

      public void resumeProcessing()
      Resumes the processing of the current document.
    • suspendProcessing

      public void suspendProcessing()
      Suspend the processing of the current document.
    • startProcessing

      public void startProcessing()
      Start the processing of the current document.
    • setAnimationLimitingNone

      public void setAnimationLimitingNone()
      Sets the animation limiting mode to "none".
    • setAnimationLimitingCPU

      public void setAnimationLimitingCPU(float pc)
      Sets the animation limiting mode to a percentage of CPU.
      Parameters:
      pc - the maximum percentage of CPU to use (0 < pc ≤ 1)
    • setAnimationLimitingFPS

      public void setAnimationLimitingFPS(float fps)
      Sets the animation limiting mode to a number of frames per second.
      Parameters:
      fps - the maximum number of frames per second (fps > 0)
    • setBridgeContextAnimationLimitingMode

      protected void setBridgeContextAnimationLimitingMode()
      Sets the animation limiting mode on the current bridge context.
    • getOffScreen

      public BufferedImage getOffScreen()
      Returns:
      SVG static image.
    • render

      protected void render()
    • doRender

      protected void doRender()
    • getCanvasGraphicsNode

      protected org.apache.batik.gvt.CanvasGraphicsNode getCanvasGraphicsNode(org.apache.batik.gvt.GraphicsNode gn)
    • resetCache

      protected void resetCache()
    • addToBuffer

      protected void addToBuffer(Image image)
    • notifyNewImage

      protected void notifyNewImage(Image newImage)