public class NiftyRenderDeviceProxy extends Object implements NiftyRenderEngine
Constructor and Description |
---|
NiftyRenderDeviceProxy() |
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.
|
Set<RenderStateType> |
getStates() |
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 param,
float param2)
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 c)
renderText.
|
void |
reset() |
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 pos,
float pos2)
set global position.
|
void |
setImageScale(float scale)
set image size.
|
void |
setRenderTextSize(float size)
Set RenderTextSize.
|
public void beginFrame()
NiftyRenderEngine
beginFrame
in interface NiftyRenderEngine
public void endFrame()
NiftyRenderEngine
endFrame
in interface NiftyRenderEngine
public void clear()
NiftyRenderEngine
clear
in interface NiftyRenderEngine
public RenderFont createFont(String name)
NiftyRenderEngine
createFont
in interface NiftyRenderEngine
name
- name of the fontpublic NiftyImage createImage(String name, boolean filterLinear)
NiftyRenderEngine
createImage
in interface NiftyRenderEngine
name
- file name to usefilterLinear
- filterpublic void disableClip()
NiftyRenderEngine
disableClip
in interface NiftyRenderEngine
public void enableClip(int x0, int y0, int x1, int y1)
NiftyRenderEngine
enableClip
in interface NiftyRenderEngine
x0
- x0y0
- y0x1
- x1y1
- y1public int getHeight()
NiftyRenderEngine
getHeight
in interface NiftyRenderEngine
public int getWidth()
NiftyRenderEngine
getWidth
in interface NiftyRenderEngine
public void setColor(Color colorParam)
NiftyRenderEngine
setColor
in interface NiftyRenderEngine
colorParam
- new current color to setpublic void setColorAlpha(float newColorAlpha)
NiftyRenderEngine
setColorAlpha
in interface NiftyRenderEngine
newColorAlpha
- new alpha valuepublic void setColorIgnoreAlpha(Color color)
NiftyRenderEngine
setColorIgnoreAlpha
in interface NiftyRenderEngine
color
- colorpublic boolean isColorChanged()
NiftyRenderEngine
isColorChanged
in interface NiftyRenderEngine
public boolean isColorAlphaChanged()
NiftyRenderEngine
isColorAlphaChanged
in interface NiftyRenderEngine
public void moveTo(float param, float param2)
NiftyRenderEngine
moveTo
in interface NiftyRenderEngine
param
- xparam2
- ypublic void renderImage(NiftyImage image, int x, int y, int width, int height)
NiftyRenderEngine
renderImage
in interface NiftyRenderEngine
image
- the image to renderx
- the x position on the screeny
- the y position on the screenwidth
- the widthheight
- the heightpublic void renderQuad(int x, int y, int width, int height)
NiftyRenderEngine
renderQuad
in interface NiftyRenderEngine
x
- xy
- ywidth
- widthheight
- heightpublic void renderQuad(int x, int y, int width, int height, Color topLeft, Color topRight, Color bottomRight, Color bottomLeft)
NiftyRenderEngine
renderQuad
in interface NiftyRenderEngine
public void renderText(String text, int x, int y, int selectionStart, int selectionEnd, Color c)
NiftyRenderEngine
renderText
in interface NiftyRenderEngine
text
- textx
- xy
- yselectionStart
- selection startselectionEnd
- selection endc
- color for text selectionspublic void restoreState()
NiftyRenderEngine
restoreState
in interface NiftyRenderEngine
public void saveState(Set<RenderStateType> statesToSave)
NiftyRenderEngine
saveState
in interface NiftyRenderEngine
statesToSave
- set of renderstates to savepublic void setFont(RenderFont font)
NiftyRenderEngine
setFont
in interface NiftyRenderEngine
font
- fontpublic RenderFont getFont()
NiftyRenderEngine
getFont
in interface NiftyRenderEngine
public void setGlobalPosition(float pos, float pos2)
NiftyRenderEngine
setGlobalPosition
in interface NiftyRenderEngine
pos
- xpos2
- ypublic void setImageScale(float scale)
NiftyRenderEngine
setImageScale
in interface NiftyRenderEngine
scale
- new image sizepublic void setRenderTextSize(float size)
NiftyRenderEngine
setRenderTextSize
in interface NiftyRenderEngine
size
- sizepublic void setBlendMode(BlendMode blendMode)
NiftyRenderEngine
setBlendMode
in interface NiftyRenderEngine
public RenderDevice getRenderDevice()
NiftyRenderEngine
getRenderDevice
in interface NiftyRenderEngine
public void disposeImage(RenderImage image)
NiftyRenderEngine
disposeImage
in interface NiftyRenderEngine
image
- image to disposepublic void displayResolutionChanged()
NiftyRenderEngine
displayResolutionChanged
in interface NiftyRenderEngine
public void reset()
public Set<RenderStateType> getStates()
public RenderImage reload(RenderImage image)
NiftyRenderEngine
reload
in interface NiftyRenderEngine
image
- imageCopyright © 2013. All Rights Reserved.