Top Methods
com.sun.prism

public Interface Graphics

Known Direct Subinterfaces
com.sun.prism.MaskTextureGraphics, com.sun.prism.ReadbackGraphics, com.sun.prism.RectShadowGraphics, com.sun.prism.ps.ShaderGraphics
Imports
java.nio.ByteBuffer, com.sun.glass.ui.Screen, com.sun.javafx.font.FontStrike, .Glyph, com.sun.javafx.geom.RectBounds, .Rectangle, .Shape, com.sun.javafx.geom.transform.BaseTransform, .GeneralTransform3D, com.sun.javafx.scene.text.GlyphList, com.sun.javafx.sg.prism.NGCamera, .NGLightBase, .NodePath, com.sun.prism.Texture.WrapMode, com.sun.prism.paint.Color, .Paint

Method Summary

Modifier and TypeMethod and Description
public void
blit(RTTexture srcTex, RTTexture dstTex, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1)

public void
clear()

Clears the current RenderTarget with transparent pixels.

public void
clear(Color color)

Clears the current RenderTarget with the given Color.

public void
clearQuad(float x1, float y1, float x2, float y2)

Clears the region represented by the given quad with transparent pixels.

public void
draw(Shape shape)

public default void
drawColorGlyph(GlyphList gl, FontStrike strike, float x, float y, Color selectColor, int selectStart, int selectEnd)

public void
drawEllipse(float x, float y, float width, float height)

public void
drawLine(float x1, float y1, float x2, float y2)

public void
drawMappedTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx11, float ty11, float tx21, float ty21, float tx12, float ty12, float tx22, float ty22)

public void
drawRect(float x, float y, float width, float height)

public void
drawRoundRect(float x, float y, float width, float height, float arcw, float arch)

public void
drawString(GlyphList gl, FontStrike strike, float x, float y, Color selectColor, int selectStart, int selectEnd)

public void
drawTexture(Texture tex, float x, float y, float w, float h)

public void
drawTexture(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)

public void
drawTexture3SliceH(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dh1, float dh2, float sh1, float sh2)

public void
drawTexture3SliceV(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dv1, float dv2, float sv1, float sv2)

public void
drawTexture9Slice(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dh1, float dv1, float dh2, float dv2, float sh1, float sv1, float sh2, float sv2)

public void
drawTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx1, float ty1, float tx2, float ty2)

public void
drawTextureVO(Texture tex, float topopacity, float botopacity, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)

public void
fill(Shape shape)

public void
fillEllipse(float x, float y, float width, float height)

public void
fillQuad(float x1, float y1, float x2, float y2)

public void
fillRect(float x, float y, float width, float height)

public void
fillRoundRect(float x, float y, float width, float height, float arcw, float arch)

public Screen
public NGCamera
public Rectangle
public int
public Rectangle
public CompositeMode
public float
public RectBounds
public NGLightBase[]
public Paint
public float
public float
public NodePath
public RenderTarget
public ResourceFactory
public BasicStroke
public BaseTransform
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
scale(float sx, float sy)

public void
scale(float sx, float sy, float sz)

public void
setAntialiasedShape(boolean aa)

public void
public void
public void
setClipRectIndex(int index)

public void
public void
setDepthBuffer(boolean depthBuffer)

public void
setDepthTest(boolean depthTest)

public void
setExtraAlpha(float extraAlpha)

public void
setHasPreCullingBits(boolean hasBits)

public void
public void
setNodeBounds(RectBounds
should not include node transform
bounds
)

Set the node bounds for any node that would like to render objects of a different size to self.

public void
setPaint(Paint paint)

public void
public void
setPixelScaleFactors(float pixelScaleX, float pixelScaleY)

public void
public void
setState3D(boolean flag)

public void
public void
public void
setTransform(double m00, double m10, double m01, double m11, double m02, double m12)

public void
setTransform3D(double mxx, double mxy, double mxz, double mxt, double myx, double myy, double myz, double myt, double mzx, double mzy, double mzz, double mzt)

public void
public void
sync()

Synchronize, or flush, any outstanding rendering operations to the destination in preparation for some caller potentially reusing or disposing a resource that has been used as the source of a recently invoked rendering operation.

public void
public void
translate(float tx, float ty)

public void
translate(float tx, float ty, float tz)

Method Detail

blitback to summary
public void blit(RTTexture srcTex, RTTexture dstTex, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1)
clearback to summary
public void clear()

Clears the current RenderTarget with transparent pixels. Note that this operation is affected by the current clip rectangle, if set. To clear the entire surface, call setClipRect(null) prior to calling clear().

This is equivalent to calling:

    clear(Color.TRANSPARENT);
clearback to summary
public void clear(Color color)

Clears the current RenderTarget with the given Color. Note that this operation is affected by the current clip rectangle, if set. To clear the entire surface, call setClipRect(null) prior to calling clear().

clearQuadback to summary
public void clearQuad(float x1, float y1, float x2, float y2)

Clears the region represented by the given quad with transparent pixels. Note that this operation is affected by the current clip rectangle, if set, as well as the current transform (the quad is specified in user space). Also note that unlike the clear() methods, this method does not attempt to clear the depth buffer.

drawback to summary
public void draw(Shape shape)
drawColorGlyphback to summary
public default void drawColorGlyph(GlyphList gl, FontStrike strike, float x, float y, Color selectColor, int selectStart, int selectEnd)
drawEllipseback to summary
public void drawEllipse(float x, float y, float width, float height)
drawLineback to summary
public void drawLine(float x1, float y1, float x2, float y2)
drawMappedTextureRawback to summary
public void drawMappedTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx11, float ty11, float tx21, float ty21, float tx12, float ty12, float tx22, float ty22)
drawRectback to summary
public void drawRect(float x, float y, float width, float height)
drawRoundRectback to summary
public void drawRoundRect(float x, float y, float width, float height, float arcw, float arch)
drawStringback to summary
public void drawString(GlyphList gl, FontStrike strike, float x, float y, Color selectColor, int selectStart, int selectEnd)
drawTextureback to summary
public void drawTexture(Texture tex, float x, float y, float w, float h)
drawTextureback to summary
public void drawTexture(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
drawTexture3SliceHback to summary
public void drawTexture3SliceH(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dh1, float dh2, float sh1, float sh2)
drawTexture3SliceVback to summary
public void drawTexture3SliceV(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dv1, float dv2, float sv1, float sv2)
drawTexture9Sliceback to summary
public void drawTexture9Slice(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2, float dh1, float dv1, float dh2, float dv2, float sh1, float sv1, float sh2, float sv2)
drawTextureRawback to summary
public void drawTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx1, float ty1, float tx2, float ty2)
drawTextureVOback to summary
public void drawTextureVO(Texture tex, float topopacity, float botopacity, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
fillback to summary
public void fill(Shape shape)
fillEllipseback to summary
public void fillEllipse(float x, float y, float width, float height)
fillQuadback to summary
public void fillQuad(float x1, float y1, float x2, float y2)
fillRectback to summary
public void fillRect(float x, float y, float width, float height)
fillRoundRectback to summary
public void fillRoundRect(float x, float y, float width, float height, float arcw, float arch)
getAssociatedScreenback to summary
public Screen getAssociatedScreen()
getCameraNoCloneback to summary
public NGCamera getCameraNoClone()
getClipRectback to summary
public Rectangle getClipRect()
getClipRectIndexback to summary
public int getClipRectIndex()
getClipRectNoCloneback to summary
public Rectangle getClipRectNoClone()
getCompositeModeback to summary
public CompositeMode getCompositeMode()
getExtraAlphaback to summary
public float getExtraAlpha()
getFinalClipNoCloneback to summary
public RectBounds getFinalClipNoClone()
getLightsback to summary
public NGLightBase[] getLights()
getPaintback to summary
public Paint getPaint()
getPixelScaleFactorXback to summary
public float getPixelScaleFactorX()
getPixelScaleFactorYback to summary
public float getPixelScaleFactorY()
getRenderRootback to summary
public NodePath getRenderRoot()
getRenderTargetback to summary
public RenderTarget getRenderTarget()
getResourceFactoryback to summary
public ResourceFactory getResourceFactory()
getStrokeback to summary
public BasicStroke getStroke()
getTransformNoCloneback to summary
public BaseTransform getTransformNoClone()
hasPreCullingBitsback to summary
public boolean hasPreCullingBits()
isAlphaTestShaderback to summary
public boolean isAlphaTestShader()
isAntialiasedShapeback to summary
public boolean isAntialiasedShape()
isDepthBufferback to summary
public boolean isDepthBuffer()
isDepthTestback to summary
public boolean isDepthTest()
isState3Dback to summary
public boolean isState3D()
scaleback to summary
public void scale(float sx, float sy)
scaleback to summary
public void scale(float sx, float sy, float sz)
setAntialiasedShapeback to summary
public void setAntialiasedShape(boolean aa)
setCameraback to summary
public void setCamera(NGCamera camera)
setClipRectback to summary
public void setClipRect(Rectangle clipRect)
setClipRectIndexback to summary
public void setClipRectIndex(int index)
setCompositeModeback to summary
public void setCompositeMode(CompositeMode mode)
setDepthBufferback to summary
public void setDepthBuffer(boolean depthBuffer)
setDepthTestback to summary
public void setDepthTest(boolean depthTest)
setExtraAlphaback to summary
public void setExtraAlpha(float extraAlpha)
setHasPreCullingBitsback to summary
public void setHasPreCullingBits(boolean hasBits)
setLightsback to summary
public void setLights(NGLightBase[] lights)
setNodeBoundsback to summary
public void setNodeBounds(RectBounds bounds)

Set the node bounds for any node that would like to render objects of a different size to self. This is useful for proportional paints, where by definition proportional paint should be stretched across node bounds to which it has been applied. In most cases nodes/shapes are rendered in a single draw call, and if needed bounds can be determined by inspecting object to be drawn. However not all nodes are so simple, NGText for example can have hundreds of Graphics.drawString(...), draw(...), and fill(...) calls per a single NGText.renderContent(). Use: Before making several draw calls from a single node, setNodeBounds(bounds), when complete invalidate nodeBounds by setNodeBounds(null).

Parameters
bounds:RectBounds

should not include node transform

setPaintback to summary
public void setPaint(Paint paint)
setPerspectiveTransformback to summary
public void setPerspectiveTransform(GeneralTransform3D perspectiveTransform)
setPixelScaleFactorsback to summary
public void setPixelScaleFactors(float pixelScaleX, float pixelScaleY)
setRenderRootback to summary
public void setRenderRoot(NodePath root)
setState3Dback to summary
public void setState3D(boolean flag)
setStrokeback to summary
public void setStroke(BasicStroke stroke)
setTransformback to summary
public void setTransform(BaseTransform xform)
setTransformback to summary
public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12)
setTransform3Dback to summary
public void setTransform3D(double mxx, double mxy, double mxz, double mxt, double myx, double myy, double myz, double myt, double mzx, double mzy, double mzz, double mzt)
setup3DRenderingback to summary
public void setup3DRendering()
syncback to summary
public void sync()

Synchronize, or flush, any outstanding rendering operations to the destination in preparation for some caller potentially reusing or disposing a resource that has been used as the source of a recently invoked rendering operation. This method does not (yet?) guarantee that the actual pixels in the destination will be updated - it simply guarantees that no currently buffered rendering will depend on any texture data included by reference. The typical usage is before a Texture disposal or "return to texture cache pool" operation.

transformback to summary
public void transform(BaseTransform xform)
translateback to summary
public void translate(float tx, float ty)
translateback to summary
public void translate(float tx, float ty, float tz)