|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lessvoid.nifty.render.NiftyRenderEngineImpl
public class NiftyRenderEngineImpl
The Nifty RenderEngine.
Nested Class Summary | |
---|---|
class |
NiftyRenderEngineImpl.Clip
|
Constructor Summary | |
---|---|
NiftyRenderEngineImpl(RenderDevice renderDeviceParam)
create the device. |
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 filename)
Create a new RenderFont. |
NiftyImage |
createImage(String filename,
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)
renderImage. |
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. |
protected void |
renderSelectionText(String text,
int x,
int y,
Color textColor,
Color textSelectionColor,
float textSizeX,
float textSizeY,
int selectionStartParam,
int selectionEndParam)
Render a Text with some text selected. |
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 blendModeParam)
Set BlendMode. |
void |
setColor(Color colorParam)
Set a new color. |
void |
setColorAlpha(float newColorAlpha)
set only the color alpha. |
void |
setColorIgnoreAlpha(Color newColor)
Set only the color component of the given color. |
void |
setFont(RenderFont newFont)
set font. |
void |
setGlobalPosition(float xPos,
float yPos)
set global position. |
void |
setImageScale(float scale)
set image size. |
void |
setRenderTextSize(float size)
Set RenderTextSize. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NiftyRenderEngineImpl(RenderDevice renderDeviceParam)
renderDeviceParam
- RenderDeviceMethod Detail |
---|
public int getWidth()
NiftyRenderEngine
getWidth
in interface NiftyRenderEngine
NiftyRenderEngine.getWidth()
public int getHeight()
NiftyRenderEngine
getHeight
in interface NiftyRenderEngine
NiftyRenderEngine.getHeight()
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 NiftyImage createImage(String filename, boolean filterLinear)
NiftyRenderEngine
createImage
in interface NiftyRenderEngine
filename
- namefilterLinear
- filter
NiftyRenderEngine.createImage(java.lang.String, boolean)
public RenderFont createFont(String filename)
NiftyRenderEngine
createFont
in interface NiftyRenderEngine
filename
- name
NiftyRenderEngine.createFont(java.lang.String)
public String getFontname(RenderFont font)
NiftyRenderEngine
getFontname
in interface NiftyRenderEngine
font
- RenderFont to get the name from
public void renderQuad(int x, int y, int width, int height)
NiftyRenderEngine
renderQuad
in interface NiftyRenderEngine
x
- xy
- ywidth
- widthheight
- heightNiftyRenderEngine.renderQuad(int, int, int, int)
public 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 renderImage(NiftyImage image, int x, int y, int width, int height)
renderImage
in interface NiftyRenderEngine
image
- imagex
- xy
- ywidth
- widthheight
- heightpublic void renderText(String text, int x, int y, int selectionStart, int selectionEnd, Color textSelectionColor)
renderText
in interface NiftyRenderEngine
text
- textx
- xy
- yselectionStart
- selection startselectionEnd
- selection endtextSelectionColor
- textSelectionColorprotected void renderSelectionText(String text, int x, int y, Color textColor, Color textSelectionColor, float textSizeX, float textSizeY, int selectionStartParam, int selectionEndParam)
text
- textx
- xy
- ytextColor
- colortextSelectionColor
- textSelectionColortextSize
- text sizeselectionStartParam
- selection startselectionEndParam
- selection endpublic void setFont(RenderFont newFont)
setFont
in interface NiftyRenderEngine
newFont
- fontpublic RenderFont getFont()
getFont
in interface NiftyRenderEngine
public void setColor(Color colorParam)
NiftyRenderEngine
setColor
in interface NiftyRenderEngine
colorParam
- colorNiftyRenderEngine.setColor(de.lessvoid.nifty.tools.Color)
public void setColorAlpha(float newColorAlpha)
setColorAlpha
in interface NiftyRenderEngine
newColorAlpha
- new alpha valuepublic void setColorIgnoreAlpha(Color newColor)
setColorIgnoreAlpha
in interface NiftyRenderEngine
newColor
- colorpublic boolean isColorChanged()
isColorChanged
in interface NiftyRenderEngine
public boolean isColorAlphaChanged()
NiftyRenderEngine
isColorAlphaChanged
in interface NiftyRenderEngine
NiftyRenderEngine.isColorAlphaChanged()
public void moveTo(float xParam, float yParam)
NiftyRenderEngine
moveTo
in interface NiftyRenderEngine
xParam
- xyParam
- yNiftyRenderEngine.moveTo(float, float)
public void enableClip(int x0, int y0, int x1, int y1)
NiftyRenderEngine
enableClip
in interface NiftyRenderEngine
x0
- x0y0
- y0x1
- x1y1
- y1NiftyRenderEngine.enableClip(int, int, int, int)
public void disableClip()
NiftyRenderEngine
disableClip
in interface NiftyRenderEngine
NiftyRenderEngine.disableClip()
public void setRenderTextSize(float size)
NiftyRenderEngine
setRenderTextSize
in interface NiftyRenderEngine
size
- sizeNiftyRenderEngine.setRenderTextSize(float)
public void setImageScale(float scale)
NiftyRenderEngine
setImageScale
in interface NiftyRenderEngine
scale
- scaleNiftyRenderEngine.setImageScale(float)
public void setGlobalPosition(float xPos, float yPos)
NiftyRenderEngine
setGlobalPosition
in interface NiftyRenderEngine
xPos
- xyPos
- yNiftyRenderEngine.setGlobalPosition(float, float)
public void displayResolutionChanged()
NiftyRenderEngine
displayResolutionChanged
in interface NiftyRenderEngine
public void saveState(RenderStates statesToSave)
NiftyRenderEngine
saveState
in interface NiftyRenderEngine
statesToSave
- set of renderstates to savepublic void restoreState()
NiftyRenderEngine
restoreState
in interface NiftyRenderEngine
public void setBlendMode(BlendMode blendModeParam)
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 RenderImage reload(RenderImage image)
NiftyRenderEngine
reload
in interface NiftyRenderEngine
image
- image
public int getNativeWidth()
NiftyRenderEngine
getNativeWidth
in interface NiftyRenderEngine
public int getNativeHeight()
NiftyRenderEngine
getNativeHeight
in interface NiftyRenderEngine
public int convertToNativeX(int x)
convertToNativeX
in interface NiftyRenderEngine
public int convertToNativeY(int y)
convertToNativeY
in interface NiftyRenderEngine
public int convertToNativeWidth(int x)
convertToNativeWidth
in interface NiftyRenderEngine
public int convertToNativeHeight(int y)
convertToNativeHeight
in interface NiftyRenderEngine
public int convertFromNativeX(int x)
convertFromNativeX
in interface NiftyRenderEngine
public int convertFromNativeY(int y)
convertFromNativeY
in interface NiftyRenderEngine
public float convertToNativeTextSizeX(float size)
convertToNativeTextSizeX
in interface NiftyRenderEngine
public float convertToNativeTextSizeY(float size)
convertToNativeTextSizeY
in interface NiftyRenderEngine
public void enableAutoScaling(int baseResolutionX, int baseResolutionY)
enableAutoScaling
in interface NiftyRenderEngine
public void enableAutoScaling(int baseResolutionX, int baseResolutionY, float scaleX, float scaleY)
enableAutoScaling
in interface NiftyRenderEngine
public void disableAutoScaling()
disableAutoScaling
in interface NiftyRenderEngine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |