Package gov.nih.mipav.model.algorithms
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 theContourPlot.GenericRenderer
forContourPlot.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 Summary
Fields Modifier and Type Field Description protected static char
NL
-
Fields inherited from class gov.nih.mipav.model.algorithms.ContourPlot.GenericRenderer
isEnabled, itemsToRender, view
-
-
Constructor Summary
Constructors Constructor Description LinesRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double[]
findStrokeInterval(double current, double strokeLen, short pattern)
void
renderFallback(java.awt.Graphics2D g, java.awt.Graphics2D p, int w, int h)
Renders thisContourPlot.Renderer
's 'scene'.private void
renderFallbackLinesCT(java.awt.Graphics2D g, java.awt.Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, java.awt.geom.Rectangle2D viewportRect, float thickness)
private void
renderFallbackLinesVT(java.awt.Graphics2D g, java.awt.Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, java.awt.geom.Rectangle2D viewportRect, float[][] polygonCoords)
protected float[]
strokePattern2dashPattern(short pattern, float strokeLen)
protected int[]
transferBits(short bits, int[] target)
-
Methods inherited from class gov.nih.mipav.model.algorithms.ContourPlot.GenericRenderer
addItemToRender, getItemsToRender, isEnabled, removeItemToRender, setView
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.model.algorithms.ContourPlot.PDFRenderer
renderPDF
-
-
-
-
Field Detail
-
NL
protected static final char NL
- See Also:
- Constant Field Values
-
-
Method Detail
-
renderFallback
public void renderFallback(java.awt.Graphics2D g, java.awt.Graphics2D p, int w, int h)
Description copied from interface:ContourPlot.Renderer
Renders thisContourPlot.Renderer
's 'scene'. This is the fallback path in case OpenGL based rendering through#render(int, int, int, int)
is not available.- Parameters:
g
- main graphics object for drawing onto the framebufferp
- graphics object for drawing onto the picking framebuffer (invisible but used for picking)w
- width of the current viewport in pixelsh
- height of the current viewport in pixels
-
renderFallbackLinesCT
private void renderFallbackLinesCT(java.awt.Graphics2D g, java.awt.Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, java.awt.geom.Rectangle2D viewportRect, float thickness)
-
renderFallbackLinesVT
private void renderFallbackLinesVT(java.awt.Graphics2D g, java.awt.Graphics2D p, ContourPlot.Lines lines, double translateX, double translateY, double scaleX, double scaleY, java.awt.geom.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)
-
-