public abstract class BaseGraphics extends java.lang.Object implements RectShadowGraphics
| Modifier and Type | Field and Description |
|---|---|
private boolean |
antialiasedShape |
private NGCamera |
camera |
private Rectangle |
clipRect |
private int |
clipRectIndex |
private CompositeMode |
compMode |
private BaseContext |
context |
private static Paint |
DEFAULT_PAINT |
private static BasicStroke |
DEFAULT_STROKE |
private boolean |
depthBuffer |
private boolean |
depthTest |
private RectBounds |
devClipRect |
private float |
extraAlpha |
private RectBounds |
finalClipRect |
private boolean |
hasPreCullingBits |
protected static BaseTransform |
IDENT |
protected boolean |
isSimpleTranslate |
protected RectBounds |
nodeBounds |
protected Paint |
paint |
private float |
pixelScale |
private NodePath |
renderRoot |
private RenderTarget |
renderTarget |
protected static Ellipse2D |
scratchEllipse |
protected static Line2D |
scratchLine |
protected static RoundRectangle2D |
scratchRRect |
private boolean |
state3D |
protected BasicStroke |
stroke |
private Affine3D |
transform3D |
protected float |
transX |
protected float |
transY |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseGraphics(BaseContext context,
RenderTarget target) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the current
RenderTarget with transparent pixels. |
void |
draw(Shape shape) |
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) |
void |
drawTexture(Texture tex,
float x,
float y,
float w,
float h) |
void |
drawTexture(Texture tex,
float dx1,
float dy1,
float dx2,
float dy2,
float sx1,
float sy1,
float sx2,
float sy2) |
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) |
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) |
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) |
void |
drawTextureRaw(Texture tex,
float dx1,
float dy1,
float dx2,
float dy2,
float tx1,
float ty1,
float tx2,
float ty2) |
void |
drawTextureVO(Texture tex,
float topopacity,
float botopacity,
float dx1,
float dy1,
float dx2,
float dy2,
float sx1,
float sy1,
float sx2,
float sy2) |
void |
fill(Shape shape) |
Screen |
getAssociatedScreen() |
protected NGCamera |
getCamera() |
NGCamera |
getCameraNoClone() |
Rectangle |
getClipRect() |
int |
getClipRectIndex() |
Rectangle |
getClipRectNoClone() |
CompositeMode |
getCompositeMode() |
float |
getExtraAlpha() |
RectBounds |
getFinalClipNoClone() |
Paint |
getPaint() |
float |
getPixelScaleFactor() |
NodePath |
getRenderRoot() |
RenderTarget |
getRenderTarget() |
ResourceFactory |
getResourceFactory() |
BasicStroke |
getStroke() |
BaseTransform |
getTransformNoClone() |
boolean |
hasPreCullingBits() |
boolean |
isAlphaTestShader() |
boolean |
isAntialiasedShape() |
boolean |
isDepthBuffer() |
boolean |
isDepthTest() |
boolean |
isState3D() |
protected abstract void |
renderShape(Shape shape,
BasicStroke stroke,
float bx,
float by,
float bw,
float bh) |
void |
scale(float sx,
float sy) |
void |
scale(float sx,
float sy,
float sz) |
void |
setAntialiasedShape(boolean aa) |
void |
setCamera(NGCamera camera) |
void |
setClipRect(Rectangle clipRect) |
void |
setClipRectIndex(int index) |
void |
setCompositeMode(CompositeMode compMode) |
void |
setDepthBuffer(boolean depthBuffer) |
void |
setDepthTest(boolean depthTest) |
void |
setExtraAlpha(float extraAlpha) |
void |
setHasPreCullingBits(boolean hasBits) |
void |
setPaint(Paint paint) |
void |
setPerspectiveTransform(GeneralTransform3D transform) |
void |
setPixelScaleFactor(float pixelScale) |
void |
setRenderRoot(NodePath root) |
void |
setState3D(boolean flag) |
void |
setStroke(BasicStroke stroke) |
void |
setTransform(BaseTransform transform) |
void |
setTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12) |
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) |
void |
transform(BaseTransform transform) |
void |
translate(float tx,
float ty) |
void |
translate(float tx,
float ty,
float tz) |
private void |
validateTransformAndPaint() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitblit, clear, clearQuad, drawEllipse, drawLine, drawRect, drawRoundRect, drawString, fillEllipse, fillQuad, fillRect, fillRoundRect, getLights, setLights, setNodeBounds, setup3DRendering, syncprivate static final BasicStroke DEFAULT_STROKE
private static final Paint DEFAULT_PAINT
protected static final RoundRectangle2D scratchRRect
protected static final Ellipse2D scratchEllipse
protected static final Line2D scratchLine
protected static final BaseTransform IDENT
private final Affine3D transform3D
private NGCamera camera
private RectBounds devClipRect
private RectBounds finalClipRect
protected RectBounds nodeBounds
private Rectangle clipRect
private int clipRectIndex
private boolean hasPreCullingBits
private float extraAlpha
private CompositeMode compMode
private boolean antialiasedShape
private boolean depthBuffer
private boolean depthTest
protected Paint paint
protected BasicStroke stroke
protected boolean isSimpleTranslate
protected float transX
protected float transY
private final BaseContext context
private final RenderTarget renderTarget
private boolean state3D
private float pixelScale
private NodePath renderRoot
protected BaseGraphics(BaseContext context, RenderTarget target)
protected NGCamera getCamera()
public RenderTarget getRenderTarget()
getRenderTarget in interface Graphicspublic void setState3D(boolean flag)
setState3D in interface Graphicspublic Screen getAssociatedScreen()
getAssociatedScreen in interface Graphicspublic ResourceFactory getResourceFactory()
getResourceFactory in interface Graphicspublic BaseTransform getTransformNoClone()
getTransformNoClone in interface Graphicspublic void setPerspectiveTransform(GeneralTransform3D transform)
setPerspectiveTransform in interface Graphicspublic void setTransform(BaseTransform transform)
setTransform in interface Graphicspublic void setTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
setTransform in interface Graphicspublic 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)
setTransform3D in interface Graphicspublic void transform(BaseTransform transform)
public void translate(float tx,
float ty,
float tz)
public void setClipRectIndex(int index)
setClipRectIndex in interface Graphicspublic int getClipRectIndex()
getClipRectIndex in interface Graphicspublic void setHasPreCullingBits(boolean hasBits)
setHasPreCullingBits in interface Graphicspublic boolean hasPreCullingBits()
hasPreCullingBits in interface Graphicspublic final void setRenderRoot(NodePath root)
setRenderRoot in interface Graphicspublic final NodePath getRenderRoot()
getRenderRoot in interface Graphicsprivate void validateTransformAndPaint()
public NGCamera getCameraNoClone()
getCameraNoClone in interface Graphicspublic void setDepthTest(boolean depthTest)
setDepthTest in interface Graphicspublic boolean isDepthTest()
isDepthTest in interface Graphicspublic void setDepthBuffer(boolean depthBuffer)
setDepthBuffer in interface Graphicspublic boolean isDepthBuffer()
isDepthBuffer in interface Graphicspublic boolean isAlphaTestShader()
isAlphaTestShader in interface Graphicspublic void setAntialiasedShape(boolean aa)
setAntialiasedShape in interface Graphicspublic boolean isAntialiasedShape()
isAntialiasedShape in interface Graphicspublic void setPixelScaleFactor(float pixelScale)
setPixelScaleFactor in interface Graphicspublic float getPixelScaleFactor()
getPixelScaleFactor in interface Graphicspublic Rectangle getClipRect()
getClipRect in interface Graphicspublic Rectangle getClipRectNoClone()
getClipRectNoClone in interface Graphicspublic RectBounds getFinalClipNoClone()
getFinalClipNoClone in interface Graphicspublic void setClipRect(Rectangle clipRect)
setClipRect in interface Graphicspublic float getExtraAlpha()
getExtraAlpha in interface Graphicspublic void setExtraAlpha(float extraAlpha)
setExtraAlpha in interface Graphicspublic CompositeMode getCompositeMode()
getCompositeMode in interface Graphicspublic void setCompositeMode(CompositeMode compMode)
setCompositeMode in interface Graphicspublic BasicStroke getStroke()
public void setStroke(BasicStroke stroke)
public void clear()
GraphicsRenderTarget 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);
protected abstract void renderShape(Shape shape, BasicStroke stroke, float bx, float by, float bw, float bh)
public void drawTexture(Texture tex, float x, float y, float w, float h)
drawTexture in interface Graphicspublic void drawTexture(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
drawTexture in interface Graphicspublic 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)
drawTexture3SliceH in interface Graphicspublic 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)
drawTexture3SliceV in interface Graphicspublic 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)
drawTexture9Slice in interface Graphicspublic void drawTextureVO(Texture tex, float topopacity, float botopacity, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
drawTextureVO in interface Graphicspublic void drawTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx1, float ty1, float tx2, float ty2)
drawTextureRaw in interface Graphicspublic 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)
drawMappedTextureRaw in interface Graphics