Class NativePainterFactory

java.lang.Object
org.jzy3d.chart.factories.NativePainterFactory
All Implemented Interfaces:
IPainterFactory
Direct Known Subclasses:
AWTPainterFactory, NewtPainterFactory, SWTPainterFactory

public abstract class NativePainterFactory extends Object implements IPainterFactory
  • Field Details

    • chartFactory

      protected IChartFactory chartFactory
    • capabilities

      protected com.jogamp.opengl.GLCapabilities capabilities
    • offscreen

      protected boolean offscreen
    • width

      protected int width
    • height

      protected int height
    • traceGL

      protected boolean traceGL
    • debugGL

      protected boolean debugGL
  • Constructor Details

    • NativePainterFactory

      public NativePainterFactory()
      Initialize a factory with a default desired GLCapabilities defined by getDefaultCapabilities(GLProfile) based on the detected GLProfile, either GLProfile.GL2 or GLProfile.GL2ES2 if GLProfile.GL2 is not available. If none of these profile is available, an UnsupportedOperationException is thrown.
    • NativePainterFactory

      public NativePainterFactory(com.jogamp.opengl.GLCapabilities capabilities)
  • Method Details

    • getCapabilities

      public com.jogamp.opengl.GLCapabilities getCapabilities()
      Return desired Open GL Capabilities
    • newRenderer3D

      public Renderer3d newRenderer3D(View view)
      Only needed by INativeCanvas
    • newPainter

      public IPainter newPainter()
      Specified by:
      newPainter in interface IPainterFactory
    • newAnimator

      public NativeAnimator newAnimator(ICanvas canvas)
      Specified by:
      newAnimator in interface IPainterFactory
    • newSymbolHandler

      public SymbolHandler newSymbolHandler(IImageWrapper image)
      Specified by:
      newSymbolHandler in interface IPainterFactory
    • getChartFactory

      public IChartFactory getChartFactory()
      Specified by:
      getChartFactory in interface IPainterFactory
    • setChartFactory

      public void setChartFactory(IChartFactory chartFactory)
      Specified by:
      setChartFactory in interface IPainterFactory
    • isOffscreen

      public boolean isOffscreen()
      Specified by:
      isOffscreen in interface IPainterFactory
    • setOffscreenDisabled

      public void setOffscreenDisabled()
      Specified by:
      setOffscreenDisabled in interface IPainterFactory
    • setOffscreen

      public void setOffscreen(int width, int height)
      Set the painter factory with the offscreen image dimension will configure Capabilities.setOnscreen(boolean) properly and let inheriting painters they should use OffscreenCanvas instead of the ICanvas they use by default for display.
      Specified by:
      setOffscreen in interface IPainterFactory
    • setOffscreen

      public void setOffscreen(Rectangle rectangle)
      Specified by:
      setOffscreen in interface IPainterFactory
    • getOffscreenDimension

      public Dimension getOffscreenDimension()
      Specified by:
      getOffscreenDimension in interface IPainterFactory
    • detectGLProfile

      public static com.jogamp.opengl.GLProfile detectGLProfile()
      OPENGL PROFILE AND CAPABILITIES HELPERS
    • getOffscreenCapabilities

      public static com.jogamp.opengl.GLCapabilities getOffscreenCapabilities(com.jogamp.opengl.GLProfile glp)
      This profile has prove to fix the fact that using a raw GLCapabilities without settings let screenshot as gray only
    • getDefaultCapabilities

      public static com.jogamp.opengl.GLCapabilities getDefaultCapabilities(com.jogamp.opengl.GLProfile glp)
    • isTraceGL

      public boolean isTraceGL()
    • setTraceGL

      public void setTraceGL(boolean traceGL)
      If true, will enable GL code tracing in console. Default is false. This is equivalent to enabling the JVM flag -Djogl.debug.TraceGLGL
    • isDebugGL

      public boolean isDebugGL()
      Specified by:
      isDebugGL in interface IPainterFactory
    • setDebugGL

      public void setDebugGL(boolean debugGL)
      If true, will let GL trigger
      invalid @link
      GLException
      if an error occur in OpenGL which ease debugging. Default is false. This is equivalent to enabling the JVM flag -Djogl.debug.DebugGL
      Specified by:
      setDebugGL in interface IPainterFactory