Package gov.nih.mipav.model.algorithms
Interface ContourPlot.Glyph
- Enclosing class:
ContourPlot
public static interface ContourPlot.Glyph
The Glyph interface has to be implemented by a class that realizes
a graphical representation of a 2D point (e.g. a cross or a circle).
The interface declares the
method
that fills a vertex array so that it contains the vertices for the
shape of the glyph.
The other methods describe how the glyph has to be drawn
by the
.
invalid reference
#fillVertexArray(VertexArray)
invalid reference
PointsRenderer
- Author:
- hageldave
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pdfbox.pdmodel.edit.PDPageContentStreamcreatePDFElement(org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream) Creates PDF elements that will be appended to the content stream.voiddrawFallback(Graphics2D g, float scaling) Fallback rendering path when OpenGL is not available.booleanisFilled()intintintboolean
-
Method Details
-
numVertices
int numVertices()- Returns:
- number of vertices this glyph has.
-
primitiveType
int primitiveType()- Returns:
- the GL primitive to be used for drawing.
For example
or
invalid reference
GL11#GL_LINESinvalid reference
GL11#GL_TRIANGLE_STRIP
-
pixelSize
int pixelSize()- Returns:
- the size in pixels this glyph should be scaled to.
-
useElementsDrawCall
boolean useElementsDrawCall()- Returns:
- true if an elements draw call is to be used e.g.
, false if an arrays draw call is to be used e.g.
invalid reference
GL31#glDrawElementsInstanced(int, int, int, long, int).invalid reference
GL31#glDrawArraysInstanced(int, int, int, int)
Of course an elements draw call can only be used if the VertexArray has indices, i.e. the ELEMENT_ARRAY_BUFFER is set. AContourPlot.Glyphimplementation has to guarantee for that.
-
createPDFElement
org.apache.pdfbox.pdmodel.edit.PDPageContentStream createPDFElement(org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream) Creates PDF elements that will be appended to the content stream. This is used to create an SVGsymbol. TheisFilled()method determines whether the "fill" or "stroke" attribute is used for coloring an instance of the symbol.- Parameters:
contentStream- content stream that the glyph will be added to- Returns:
- content stream that holds the glyph written to the document
-
drawFallback
Fallback rendering path when OpenGL is not available. Draws this glyph to the specifiedGraphics2Dobject with the specified scaling.- Parameters:
g- graphics to draw toscaling- factor by which to scale this glyph
-
glyphName
String glyphName()- Returns:
- name of this Glyph, used as part of an SVG identifier for the corresponding symbol definition.
-
isFilled
boolean isFilled()- Returns:
- whether this glyph is filled or not, e.g. a cross is not filled but a circle can.
-