public interface NiftyRenderEngine
Modifier and Type | Method and Description |
---|---|
void |
beginFrame()
Called when a frame begins.
|
void |
clear()
Clear the screen.
|
RenderFont |
createFont(String name)
Create a new RenderFont.
|
NiftyImage |
createImage(String name,
boolean filterLinear)
Create a new Image.
|
void |
disableClip()
Disable the clipping.
|
void |
displayResolutionChanged()
This is called from Nifty when it receives the resolutionChange notify from application code.
|
void |
disposeImage(RenderImage image)
Dispose image.
|
void |
enableClip(int x0,
int y0,
int x1,
int y1)
Enable clipping to the given region.
|
void |
endFrame()
Called when a frame ends.
|
RenderFont |
getFont()
get font.
|
int |
getHeight()
Get Height of Display mode.
|
RenderDevice |
getRenderDevice()
Get RenderDevice.
|
int |
getWidth()
Get Width of Display mode.
|
boolean |
isColorAlphaChanged()
return true when color alpha has been changed.
|
boolean |
isColorChanged()
return true when color has been changed.
|
void |
moveTo(float xParam,
float yParam)
Move to the given x/y position.
|
RenderImage |
reload(RenderImage image)
Dispose the given image and reload it.
|
void |
renderImage(NiftyImage image,
int x,
int y,
int width,
int height)
Render Image.
|
void |
renderQuad(int x,
int y,
int width,
int height)
render a quad.
|
void |
renderQuad(int x,
int y,
int width,
int height,
Color topLeft,
Color topRight,
Color bottomRight,
Color bottomLeft)
Renders a quad with different colors at the quad vertices.
|
void |
renderText(String text,
int x,
int y,
int selectionStart,
int selectionEnd,
Color textSelectionColor)
renderText.
|
void |
restoreState()
restore states.
|
void |
saveState(Set<RenderStateType> statesToSave)
save given states.
|
void |
setBlendMode(BlendMode blendMode)
Set BlendMode.
|
void |
setColor(Color colorParam)
Set a new color.
|
void |
setColorAlpha(float newColorAlpha)
set only the color alpha.
|
void |
setColorIgnoreAlpha(Color color)
Set only the color component of the given color.
|
void |
setFont(RenderFont font)
set font.
|
void |
setGlobalPosition(float xPos,
float yPos)
set global position.
|
void |
setImageScale(float scale)
set image size.
|
void |
setRenderTextSize(float size)
Set RenderTextSize.
|
int getWidth()
int getHeight()
void beginFrame()
void endFrame()
void clear()
NiftyImage createImage(String name, boolean filterLinear)
name
- file name to usefilterLinear
- filterRenderFont createFont(String name)
name
- name of the fontvoid renderQuad(int x, int y, int width, int height)
x
- xy
- ywidth
- widthheight
- heightvoid 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(NiftyImage image, int x, int y, int width, int height)
image
- the image to renderx
- the x position on the screeny
- the y position on the screenwidth
- the widthheight
- the heightvoid renderText(String text, int x, int y, int selectionStart, int selectionEnd, Color textSelectionColor)
text
- textx
- xy
- yselectionStart
- selection startselectionEnd
- selection endtextSelectionColor
- color for text selectionsvoid setFont(RenderFont font)
font
- fontRenderFont getFont()
void setColor(Color colorParam)
colorParam
- new current color to setvoid setColorAlpha(float newColorAlpha)
newColorAlpha
- new alpha valuevoid setColorIgnoreAlpha(Color color)
color
- colorboolean isColorChanged()
boolean isColorAlphaChanged()
void setBlendMode(BlendMode blendMode)
void moveTo(float xParam, float yParam)
xParam
- xyParam
- yvoid enableClip(int x0, int y0, int x1, int y1)
x0
- x0y0
- y0x1
- x1y1
- y1void disableClip()
void setRenderTextSize(float size)
size
- sizevoid setImageScale(float scale)
scale
- new image sizevoid setGlobalPosition(float xPos, float yPos)
xPos
- xyPos
- yvoid saveState(Set<RenderStateType> statesToSave)
statesToSave
- set of renderstates to savevoid restoreState()
RenderDevice getRenderDevice()
void disposeImage(RenderImage image)
image
- image to disposeRenderImage reload(RenderImage image)
image
- imagevoid displayResolutionChanged()
Copyright © 2013. All Rights Reserved.