Class ContourPlot.LinesRenderer

java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.GenericRenderer<ContourPlot.Lines>
gov.nih.mipav.model.algorithms.ContourPlot.LinesRenderer
All Implemented Interfaces:
ContourPlot.AdaptableView, ContourPlot.PDFRenderer, ContourPlot.Renderer
Enclosing class:
ContourPlot

public class ContourPlot.LinesRenderer extends ContourPlot.GenericRenderer<ContourPlot.Lines>
The LinesRenderer is an implementation of the ContourPlot.GenericRenderer for ContourPlot.Lines. This renderer uses a geometry shader that extends a line primitive into a quad of width that corresponds to the line width of the Lines object.
Its fragment shader draws the picking color into the second render buffer alongside the 'visible' color that is drawn into the first render buffer.
Author:
hageldave
  • Field Details

  • Constructor Details

    • LinesRenderer

      public LinesRenderer()
  • Method Details

    • renderFallback

      public void renderFallback(Graphics2D g, Graphics2D p, int w, int h)
      Description copied from interface: ContourPlot.Renderer
      Renders this ContourPlot.Renderer's 'scene'. This is the fallback path in case OpenGL based rendering through
      invalid reference
      #render(int, int, int, int)
      is not available.
      Parameters:
      g - main graphics object for drawing onto the framebuffer
      p - graphics object for drawing onto the picking framebuffer (invisible but used for picking)
      w - width of the current viewport in pixels
      h - height of the current viewport in pixels
    • renderFallbackLinesCT

      private void renderFallbackLinesCT(Graphics2D g, Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, Rectangle2D viewportRect, float thickness)
    • renderFallbackLinesVT

      private void renderFallbackLinesVT(Graphics2D g, Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, Rectangle2D viewportRect, float[][] polygonCoords)
    • findStrokeInterval

      protected double[] findStrokeInterval(double current, double strokeLen, short pattern)
    • transferBits

      protected int[] transferBits(short bits, int[] target)
    • strokePattern2dashPattern

      protected float[] strokePattern2dashPattern(short pattern, float strokeLen)