|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NiftyRenderEngine
NiftyRenderEngine interface.
Method Summary | |
---|---|
void |
beginFrame()
Called when a frame begins. |
void |
clear()
Clear the screen. |
int |
convertFromNativeX(int x)
|
int |
convertFromNativeY(int y)
|
int |
convertToNativeHeight(int y)
|
float |
convertToNativeTextSizeX(float size)
|
float |
convertToNativeTextSizeY(float size)
|
int |
convertToNativeWidth(int x)
|
int |
convertToNativeX(int x)
|
int |
convertToNativeY(int y)
|
RenderFont |
createFont(String name)
Create a new RenderFont. |
NiftyImage |
createImage(String name,
boolean filterLinear)
Create a new Image. |
void |
disableAutoScaling()
|
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 |
enableAutoScaling(int baseResolutionX,
int baseResolutionY)
|
void |
enableAutoScaling(int baseResolutionX,
int baseResolutionY,
float scaleX,
float scaleY)
|
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. |
String |
getFontname(RenderFont font)
Returns the original filename of the given RenderFont. |
int |
getHeight()
Get Height of Display mode. |
int |
getNativeHeight()
This will always return the current native display resolution independent of the auto scaling mode. |
int |
getNativeWidth()
This will always return the current native display resolution independent of the auto scaling 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(RenderStates 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. |
Method Detail |
---|
int getWidth()
int getHeight()
int getNativeWidth()
int getNativeHeight()
void beginFrame()
void endFrame()
void clear()
NiftyImage createImage(String name, boolean filterLinear)
name
- file name to usefilterLinear
- filter
RenderFont createFont(String name)
name
- name of the font
String getFontname(RenderFont font)
font
- RenderFont to get the name from
void 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(RenderStates statesToSave)
statesToSave
- set of renderstates to savevoid restoreState()
RenderDevice getRenderDevice()
void disposeImage(RenderImage image)
image
- image to disposeRenderImage reload(RenderImage image)
image
- image
void displayResolutionChanged()
void enableAutoScaling(int baseResolutionX, int baseResolutionY)
void enableAutoScaling(int baseResolutionX, int baseResolutionY, float scaleX, float scaleY)
void disableAutoScaling()
int convertToNativeX(int x)
int convertToNativeY(int y)
int convertToNativeWidth(int x)
int convertToNativeHeight(int y)
int convertFromNativeX(int x)
int convertFromNativeY(int y)
float convertToNativeTextSizeX(float size)
float convertToNativeTextSizeY(float size)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |