de.lessvoid.nifty.nulldevice
Class NullRenderDevice

java.lang.Object
  extended by de.lessvoid.nifty.nulldevice.NullRenderDevice
All Implemented Interfaces:
RenderDevice

public class NullRenderDevice
extends Object
implements RenderDevice


Constructor Summary
NullRenderDevice()
           
 
Method Summary
 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 size)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullRenderDevice

public NullRenderDevice()
Method Detail

beginFrame

public void beginFrame()
Description copied from interface: RenderDevice
Called every begin frame.

Specified by:
beginFrame in interface RenderDevice

endFrame

public void endFrame()
Description copied from interface: RenderDevice
Called every end frame.

Specified by:
endFrame in interface RenderDevice

clear

public void clear()
Description copied from interface: RenderDevice
clear screen.

Specified by:
clear in interface RenderDevice

createFont

public RenderFont createFont(String filename)
Description copied from interface: RenderDevice
Create a new RenderFont.

Specified by:
createFont in interface RenderDevice
Parameters:
filename - filename
Returns:
RenderFont

createImage

public RenderImage createImage(String filename,
                               boolean filterLinear)
Description copied from interface: RenderDevice
Create a new RenderImage.

Specified by:
createImage in interface RenderDevice
Parameters:
filename - filename
filterLinear - filter
Returns:
RenderImage

disableClip

public void disableClip()
Description copied from interface: RenderDevice
Disable Clipping.

Specified by:
disableClip in interface RenderDevice

enableClip

public void enableClip(int x0,
                       int y0,
                       int x1,
                       int y1)
Description copied from interface: RenderDevice
Enable clipping to the given region.

Specified by:
enableClip in interface RenderDevice
Parameters:
x0 - x0
y0 - y0
x1 - x1
y1 - y1

getHeight

public int getHeight()
Description copied from interface: RenderDevice
Get Height.

Specified by:
getHeight in interface RenderDevice
Returns:
height of display mode

getWidth

public int getWidth()
Description copied from interface: RenderDevice
Get Width.

Specified by:
getWidth in interface RenderDevice
Returns:
width of display mode

renderFont

public void renderFont(RenderFont font,
                       String text,
                       int x,
                       int y,
                       Color fontColor,
                       float size)
Description copied from interface: RenderDevice
Render the given text at the given position.

Specified by:
renderFont in interface RenderDevice
text - text to render
x - x position
y - y position
fontColor - font color
size - size

renderImage

public void renderImage(RenderImage image,
                        int x,
                        int y,
                        int width,
                        int height,
                        Color color,
                        float imageScale)
Description copied from interface: RenderDevice
Render the image.

Specified by:
renderImage in interface RenderDevice
x - x
y - y
width - w
height - h
color - color
imageScale - image scale

renderImage

public 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)
Description copied from interface: RenderDevice
Render a sub image of this image.

Specified by:
renderImage in interface RenderDevice
x - x
y - y
w - w
h - h
srcX - source x
srcY - source y
srcW - source width
srcH - source height
color - color

renderQuad

public void renderQuad(int x,
                       int y,
                       int width,
                       int height,
                       Color color)
Description copied from interface: RenderDevice
Render a quad.

Specified by:
renderQuad in interface RenderDevice
Parameters:
x - x
y - y
width - width
height - height
color - color

renderQuad

public void renderQuad(int x,
                       int y,
                       int width,
                       int height,
                       Color topLeft,
                       Color topRight,
                       Color bottomRight,
                       Color bottomLeft)
Description copied from interface: RenderDevice
Render a quad with different colors at the vertices.

Specified by:
renderQuad in interface RenderDevice

setBlendMode

public void setBlendMode(BlendMode renderMode)
Description copied from interface: RenderDevice
Change the RenderMode to the given Mode.

Specified by:
setBlendMode in interface RenderDevice
Parameters:
renderMode - RenderMode

createMouseCursor

public MouseCursor createMouseCursor(String filename,
                                     int hotspotX,
                                     int hotspotY)
Description copied from interface: RenderDevice
Create a new mouse cursor.

Specified by:
createMouseCursor in interface RenderDevice
Parameters:
filename - image file for the cursor
hotspotX - hotspot x with 0 being left of the screen
hotspotY - hotspot y with 0 being top of the screen
Returns:
the loaded mouse cursor resource ready to be applied

enableMouseCursor

public void enableMouseCursor(MouseCursor mouseCursor)
Description copied from interface: RenderDevice
Enable the given mouse cursor.

Specified by:
enableMouseCursor in interface RenderDevice
Parameters:
mouseCursor - the mouse cursor to enable

disableMouseCursor

public void disableMouseCursor()
Description copied from interface: RenderDevice
Disable the current mouse cursor.

Specified by:
disableMouseCursor in interface RenderDevice


Copyright © 2011. All Rights Reserved.