public interface RenderDevice
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 sizeX,
float sizeY)
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.
|
void |
setResourceLoader(NiftyResourceLoader niftyResourceLoader)
Gives this RenderDevice access to the NiftyResourceLoader.
|
void setResourceLoader(NiftyResourceLoader niftyResourceLoader)
niftyResourceLoader
- NiftyResourceLoaderRenderImage createImage(String filename, boolean filterLinear)
filename
- filenamefilterLinear
- filterRenderFont createFont(String filename)
filename
- filenameint getWidth()
int getHeight()
void beginFrame()
void endFrame()
void clear()
void setBlendMode(BlendMode renderMode)
renderMode
- RenderModevoid renderQuad(int x, int y, int width, int height, Color color)
x
- xy
- ywidth
- widthheight
- heightcolor
- colorvoid renderQuad(int x, int y, int width, int height, Color topLeft, Color topRight, Color bottomRight, Color bottomLeft)
x
- y
- width
- height
- topLeft
- topRight
- bottomRight
- bottomLeft
- void renderImage(RenderImage image, int x, int y, int width, int height, Color color, float imageScale)
x
- xy
- ywidth
- wheight
- hcolor
- colorimageScale
- image scalevoid 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)
x
- xy
- yw
- wh
- hsrcX
- source xsrcY
- source ysrcW
- source widthsrcH
- source heightcolor
- colorvoid renderFont(RenderFont font, String text, int x, int y, Color fontColor, float sizeX, float sizeY)
text
- text to renderx
- x positiony
- y positionfontColor
- font colorsize
- sizevoid enableClip(int x0, int y0, int x1, int y1)
x0
- x0y0
- y0x1
- x1y1
- y1void disableClip()
MouseCursor createMouseCursor(String filename, int hotspotX, int hotspotY) throws IOException
filename
- image file for the cursorhotspotX
- hotspot x with 0 being left of the screenhotspotY
- hotspot y with 0 being top of the screenIOException
void enableMouseCursor(MouseCursor mouseCursor)
mouseCursor
- the mouse cursor to enablevoid disableMouseCursor()
Copyright © 2013. All Rights Reserved.