public abstract class BaseGraphics extends Object implements RectShadowGraphics
Modifier and Type | Field and Description |
---|---|
protected static BaseTransform |
IDENT |
protected boolean |
isSimpleTranslate |
protected RectBounds |
nodeBounds |
protected Paint |
paint |
protected static Ellipse2D |
scratchEllipse |
protected static Line2D |
scratchLine |
protected static RoundRectangle2D |
scratchRRect |
protected BasicStroke |
stroke |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
blit, clear, clearQuad, drawEllipse, drawLine, drawRect, drawRoundRect, drawString, fillEllipse, fillQuad, fillRect, fillRoundRect, getLights, setLights, setNodeBounds, setup3DRendering, sync
protected static final RoundRectangle2D scratchRRect
protected static final Ellipse2D scratchEllipse
protected static final Line2D scratchLine
protected static final BaseTransform IDENT
protected RectBounds nodeBounds
protected Paint paint
protected BasicStroke stroke
protected boolean isSimpleTranslate
protected float transX
protected float transY
protected BaseGraphics(BaseContext context, RenderTarget target)
protected NGCamera getCamera()
public RenderTarget getRenderTarget()
getRenderTarget
in interface Graphics
public void setState3D(boolean flag)
setState3D
in interface Graphics
public Screen getAssociatedScreen()
getAssociatedScreen
in interface Graphics
public ResourceFactory getResourceFactory()
getResourceFactory
in interface Graphics
public BaseTransform getTransformNoClone()
getTransformNoClone
in interface Graphics
public void setPerspectiveTransform(GeneralTransform3D transform)
setPerspectiveTransform
in interface Graphics
public void setTransform(BaseTransform transform)
setTransform
in interface Graphics
public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12)
setTransform
in interface Graphics
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)
setTransform3D
in interface Graphics
public void transform(BaseTransform transform)
public void translate(float tx, float ty, float tz)
public void setClipRectIndex(int index)
setClipRectIndex
in interface Graphics
public int getClipRectIndex()
getClipRectIndex
in interface Graphics
public void setHasPreCullingBits(boolean hasBits)
setHasPreCullingBits
in interface Graphics
public boolean hasPreCullingBits()
hasPreCullingBits
in interface Graphics
public final void setRenderRoot(NodePath root)
setRenderRoot
in interface Graphics
public final NodePath getRenderRoot()
getRenderRoot
in interface Graphics
public NGCamera getCameraNoClone()
getCameraNoClone
in interface Graphics
public void setDepthTest(boolean depthTest)
setDepthTest
in interface Graphics
public boolean isDepthTest()
isDepthTest
in interface Graphics
public void setDepthBuffer(boolean depthBuffer)
setDepthBuffer
in interface Graphics
public boolean isDepthBuffer()
isDepthBuffer
in interface Graphics
public boolean isAlphaTestShader()
isAlphaTestShader
in interface Graphics
public void setAntialiasedShape(boolean aa)
setAntialiasedShape
in interface Graphics
public boolean isAntialiasedShape()
isAntialiasedShape
in interface Graphics
public void setPixelScaleFactor(float pixelScale)
setPixelScaleFactor
in interface Graphics
public float getPixelScaleFactor()
getPixelScaleFactor
in interface Graphics
public Rectangle getClipRect()
getClipRect
in interface Graphics
public Rectangle getClipRectNoClone()
getClipRectNoClone
in interface Graphics
public RectBounds getFinalClipNoClone()
getFinalClipNoClone
in interface Graphics
public void setClipRect(Rectangle clipRect)
setClipRect
in interface Graphics
public float getExtraAlpha()
getExtraAlpha
in interface Graphics
public void setExtraAlpha(float extraAlpha)
setExtraAlpha
in interface Graphics
public CompositeMode getCompositeMode()
getCompositeMode
in interface Graphics
public void setCompositeMode(CompositeMode compMode)
setCompositeMode
in interface Graphics
public BasicStroke getStroke()
public void setStroke(BasicStroke stroke)
public void clear()
Graphics
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);
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 Graphics
public void drawTexture(Texture tex, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
drawTexture
in interface Graphics
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)
drawTexture3SliceH
in interface Graphics
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)
drawTexture3SliceV
in interface Graphics
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)
drawTexture9Slice
in interface Graphics
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)
drawTextureVO
in interface Graphics
public void drawTextureRaw(Texture tex, float dx1, float dy1, float dx2, float dy2, float tx1, float ty1, float tx2, float ty2)
drawTextureRaw
in interface Graphics
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)
drawMappedTextureRaw
in interface Graphics
Copyright © 2020. All rights reserved.