Class Quality
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.canvas.Quality
-
public class Quality extends Object
Provides a structure for setting the rendering quality, i.e., the tradeoff between computation speed, and graphic quality. Following mode have an impact on the way theView
makes its GL2 initialization. TheQuality
may also activate anAbstractOrderingStrategy
algorithm that enables clean alpha results.- Fastest: No transparency, no color shading, just handle depth buffer.
- Intermediate: include Fastest mode abilities, Color shading, mainly usefull to have interpolated colors on polygons.
- Advanced: include Intermediate mode abilities, Transparency (GL2 alpha blending + polygon ordering in scene graph)
- Nicest: include Advanced mode abilities, Anti aliasing on wires
IAnimator
updating the choosenICanvas
implementation. setAutoSwapBuffer(false) will configure theICanvas
.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected static Quality
Advanced
protected boolean
alphaActivated
static boolean
DEFAULT_PRESERVE_VIEWPORT
protected boolean
depthActivated
protected boolean
disableDepthTestWhenAlpha
protected static Quality
Fastest
protected static Quality
Intermediate
protected boolean
isAnimated
protected boolean
isAutoSwapBuffer
protected static Quality
Nicest
protected boolean
preserveViewportSize
protected boolean
smoothColor
protected boolean
smoothLine
protected boolean
smoothPoint
protected boolean
smoothPolygon
-
Constructor Summary
Constructors Constructor Description Quality(boolean depthActivated, boolean alphaActivated, boolean smoothColor, boolean smoothPoint, boolean smoothLine, boolean smoothPolygon, boolean disableDepthTestWhenAlphaActivated)
Initialize a Quality configuration for a View.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Quality
Advanced()
Enables alpha and color interpolation.Quality
clone()
static Quality
Fastest()
Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing).ColorModel
getColorModel()
HiDPI
getHiDPI()
static Quality
Intermediate()
Enables color interpolation.boolean
isAlphaActivated()
boolean
isAnimated()
boolean
isAutoSwapBuffer()
boolean
isDepthActivated()
boolean
isDisableDepthBufferWhenAlpha()
boolean
isHiDPIEnabled()
boolean
isPreserveViewportSize()
Used by aCanvas
to setup pixel ratio.boolean
isSmoothColor()
boolean
isSmoothLine()
boolean
isSmoothPoint()
boolean
isSmoothPolygon()
static Quality
Nicest()
Enables alpha, color interpolation and antialiasing on lines, points, and polygons.Quality
setAlphaActivated(boolean alphaActivated)
Quality
setAnimated(boolean isAnimated)
Quality
setAutoSwapBuffer(boolean isAutoSwapBuffer)
void
setColorModel(ColorModel model)
Quality
setDepthActivated(boolean depthActivated)
Quality
setDisableDepthBufferWhenAlpha(boolean disableDepthBufferWhenAlpha)
Quality
setHiDPI(HiDPI hidpi)
Quality
setHiDPIEnabled(boolean hidpi)
If true, states that the chart should make use of HiDPI or Retina capabilities to draw more good looking charts due to higher number of physical pixels.Quality
setPreserveViewportSize(boolean preserveViewportSize)
Quality
setSmoothColor(boolean smoothColor)
Quality
setSmoothEdge(boolean smoothLine)
Quality
setSmoothPoint(boolean smoothPoint)
Quality
setSmoothPolygon(boolean smoothPolygon)
-
-
-
Field Detail
-
Nicest
protected static final Quality Nicest
-
Advanced
protected static final Quality Advanced
-
Intermediate
protected static final Quality Intermediate
-
Fastest
protected static final Quality Fastest
-
depthActivated
protected boolean depthActivated
-
alphaActivated
protected boolean alphaActivated
-
smoothColor
protected boolean smoothColor
-
smoothPoint
protected boolean smoothPoint
-
smoothLine
protected boolean smoothLine
-
smoothPolygon
protected boolean smoothPolygon
-
disableDepthTestWhenAlpha
protected boolean disableDepthTestWhenAlpha
-
isAnimated
protected boolean isAnimated
-
isAutoSwapBuffer
protected boolean isAutoSwapBuffer
-
preserveViewportSize
protected boolean preserveViewportSize
-
DEFAULT_PRESERVE_VIEWPORT
public static boolean DEFAULT_PRESERVE_VIEWPORT
-
-
Method Detail
-
Nicest
public static final Quality Nicest()
Enables alpha, color interpolation and antialiasing on lines, points, and polygons.
-
Advanced
public static final Quality Advanced()
Enables alpha and color interpolation. Set HiDPI on by default
-
Intermediate
public static final Quality Intermediate()
Enables color interpolation. Keep HiDPI off by default
-
Fastest
public static final Quality Fastest()
Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing).
-
isDepthActivated
public boolean isDepthActivated()
-
setDepthActivated
public Quality setDepthActivated(boolean depthActivated)
-
isAlphaActivated
public boolean isAlphaActivated()
-
setAlphaActivated
public Quality setAlphaActivated(boolean alphaActivated)
-
isSmoothColor
public boolean isSmoothColor()
-
setSmoothColor
public Quality setSmoothColor(boolean smoothColor)
-
isSmoothLine
public boolean isSmoothLine()
-
setSmoothEdge
public Quality setSmoothEdge(boolean smoothLine)
-
isSmoothPoint
public boolean isSmoothPoint()
-
setSmoothPoint
public Quality setSmoothPoint(boolean smoothPoint)
-
isSmoothPolygon
public boolean isSmoothPolygon()
-
setSmoothPolygon
public Quality setSmoothPolygon(boolean smoothPolygon)
-
isDisableDepthBufferWhenAlpha
public boolean isDisableDepthBufferWhenAlpha()
-
setDisableDepthBufferWhenAlpha
public Quality setDisableDepthBufferWhenAlpha(boolean disableDepthBufferWhenAlpha)
-
isAnimated
public boolean isAnimated()
-
setAnimated
public Quality setAnimated(boolean isAnimated)
-
isAutoSwapBuffer
public boolean isAutoSwapBuffer()
-
setAutoSwapBuffer
public Quality setAutoSwapBuffer(boolean isAutoSwapBuffer)
-
isPreserveViewportSize
public boolean isPreserveViewportSize()
Used by aCanvas
to setup pixel ratio. This might be used to avoid mouse pointer errors on Retina display as most canvas implementation will perform :if(quality.isPreserveViewportSize()) setPixelScale(new float[] { ScalableSurface.IDENTITY_PIXELSCALE, ScalableSurface.IDENTITY_PIXELSCALE });
-
setPreserveViewportSize
public Quality setPreserveViewportSize(boolean preserveViewportSize)
-
isHiDPIEnabled
public boolean isHiDPIEnabled()
-
getHiDPI
public HiDPI getHiDPI()
-
setHiDPIEnabled
public Quality setHiDPIEnabled(boolean hidpi)
If true, states that the chart should make use of HiDPI or Retina capabilities to draw more good looking charts due to higher number of physical pixels. A convenient shortcut tosetPreserveViewportSize(!hidpi)
- Parameters:
hidpi
-
-
getColorModel
public ColorModel getColorModel()
-
setColorModel
public void setColorModel(ColorModel model)
-
-