public class NullRenderDevice extends Object implements RenderDevice
Constructor and Description |
---|
NullRenderDevice() |
Modifier and Type | Method and Description |
---|---|
void |
beginFrame()
Called every begin frame.
|
void |
clear()
clear screen.
|
RenderFont |
createFont(String filename)
Create a new RenderFont.
|
RenderImage |
createImage(String filename,
boolean filterLinear)
Create a new RenderImage.
|
MouseCursor |
createMouseCursor(String filename,
int hotspotX,
int hotspotY)
Create a new mouse cursor.
|
void |
disableClip()
Disable Clipping.
|
void |
disableMouseCursor()
Disable the current mouse cursor.
|
void |
enableClip(int x0,
int y0,
int x1,
int y1)
Enable clipping to the given region.
|
void |
enableMouseCursor(MouseCursor mouseCursor)
Enable the given mouse cursor.
|
void |
endFrame()
Called every end frame.
|
int |
getHeight()
Get Height.
|
int |
getWidth()
Get Width.
|
void |
renderFont(RenderFont font,
String text,
int x,
int y,
Color fontColor,
float size)
Render the given text at the given position.
|
void |
renderImage(RenderImage image,
int x,
int y,
int width,
int height,
Color color,
float imageScale)
Render the image.
|
void |
renderImage(RenderImage image,
int x,
int y,
int w,
int h,
int srcX,
int srcY,
int srcW,
int srcH,
Color color,
float scale,
int centerX,
int centerY)
Render a sub image of this image.
|
void |
renderQuad(int x,
int y,
int width,
int height,
Color color)
Render a quad.
|
void |
renderQuad(int x,
int y,
int width,
int height,
Color topLeft,
Color topRight,
Color bottomRight,
Color bottomLeft)
Render a quad with different colors at the vertices.
|
void |
setBlendMode(BlendMode renderMode)
Change the RenderMode to the given Mode.
|
public void beginFrame()
RenderDevice
beginFrame
in interface RenderDevice
public void endFrame()
RenderDevice
endFrame
in interface RenderDevice
public void clear()
RenderDevice
clear
in interface RenderDevice
public RenderFont createFont(String filename)
RenderDevice
createFont
in interface RenderDevice
filename
- filenamepublic RenderImage createImage(String filename, boolean filterLinear)
RenderDevice
createImage
in interface RenderDevice
filename
- filenamefilterLinear
- filterpublic void disableClip()
RenderDevice
disableClip
in interface RenderDevice
public void enableClip(int x0, int y0, int x1, int y1)
RenderDevice
enableClip
in interface RenderDevice
x0
- x0y0
- y0x1
- x1y1
- y1public int getHeight()
RenderDevice
getHeight
in interface RenderDevice
public int getWidth()
RenderDevice
getWidth
in interface RenderDevice
public void renderFont(RenderFont font, String text, int x, int y, Color fontColor, float size)
RenderDevice
renderFont
in interface RenderDevice
text
- text to renderx
- x positiony
- y positionfontColor
- font colorsize
- sizepublic void renderImage(RenderImage image, int x, int y, int width, int height, Color color, float imageScale)
RenderDevice
renderImage
in interface RenderDevice
x
- xy
- ywidth
- wheight
- hcolor
- colorimageScale
- image scalepublic void renderImage(RenderImage image, int x, int y, int w, int h, int srcX, int srcY, int srcW, int srcH, Color color, float scale, int centerX, int centerY)
RenderDevice
renderImage
in interface RenderDevice
x
- xy
- yw
- wh
- hsrcX
- source xsrcY
- source ysrcW
- source widthsrcH
- source heightcolor
- colorpublic void renderQuad(int x, int y, int width, int height, Color color)
RenderDevice
renderQuad
in interface RenderDevice
x
- xy
- ywidth
- widthheight
- heightcolor
- colorpublic void renderQuad(int x, int y, int width, int height, Color topLeft, Color topRight, Color bottomRight, Color bottomLeft)
RenderDevice
renderQuad
in interface RenderDevice
public void setBlendMode(BlendMode renderMode)
RenderDevice
setBlendMode
in interface RenderDevice
renderMode
- RenderModepublic MouseCursor createMouseCursor(String filename, int hotspotX, int hotspotY)
RenderDevice
createMouseCursor
in interface RenderDevice
filename
- image file for the cursorhotspotX
- hotspot x with 0 being left of the screenhotspotY
- hotspot y with 0 being top of the screenpublic void enableMouseCursor(MouseCursor mouseCursor)
RenderDevice
enableMouseCursor
in interface RenderDevice
mouseCursor
- the mouse cursor to enablepublic void disableMouseCursor()
RenderDevice
disableMouseCursor
in interface RenderDevice
Copyright © 2013. All Rights Reserved.