public class RenderDeviceJava2dImpl extends Object implements RenderDevice
| Constructor and Description |
|---|
RenderDeviceJava2dImpl(GraphicsWrapper graphicsWrapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginFrame() |
void |
clear() |
RenderFont |
createFont(String filename) |
RenderImage |
createImage(String filename,
boolean filterLinear) |
MouseCursor |
createMouseCursor(String filename,
int hotspotX,
int hotspotY) |
void |
disableClip() |
void |
disableMouseCursor() |
void |
enableClip(int x0,
int y0,
int x1,
int y1) |
void |
enableMouseCursor(MouseCursor mouseCursor) |
void |
endFrame() |
protected Graphics2D |
getGraphics() |
int |
getHeight() |
int |
getWidth() |
void |
renderFont(RenderFont font,
String text,
int x,
int y,
Color fontColor,
float sizeX,
float sizeY) |
void |
renderImage(RenderImage image,
int x,
int y,
int width,
int height,
Color color,
float imageScale) |
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) |
void |
renderQuad(int x,
int y,
int width,
int height,
Color color) |
void |
renderQuad(int x,
int y,
int width,
int height,
Color topLeft,
Color topRight,
Color bottomRight,
Color bottomLeft) |
static boolean |
sameColor(Color color1,
Color color2) |
void |
setBlendMode(BlendMode blendMode) |
void |
setFontProvider(FontProviderJava2dImpl fontProvider) |
void |
setResourceLoader(NiftyResourceLoader resourceLoader) |
protected static final Logger logger
public RenderDeviceJava2dImpl(GraphicsWrapper graphicsWrapper)
protected Graphics2D getGraphics()
public void setResourceLoader(@Nonnull NiftyResourceLoader resourceLoader)
setResourceLoader in interface RenderDevicepublic void beginFrame()
beginFrame in interface RenderDevicepublic void endFrame()
endFrame in interface RenderDevicepublic void clear()
clear in interface RenderDevicepublic void setFontProvider(FontProviderJava2dImpl fontProvider)
@Nonnull public RenderFont createFont(@Nonnull String filename)
createFont in interface RenderDevice@Nonnull public RenderImage createImage(@Nonnull String filename, boolean filterLinear)
createImage in interface RenderDevicepublic void disableClip()
disableClip in interface RenderDevicepublic void enableClip(int x0,
int y0,
int x1,
int y1)
enableClip in interface RenderDevicepublic int getHeight()
getHeight in interface RenderDevicepublic int getWidth()
getWidth in interface RenderDevicepublic void renderImage(@Nonnull RenderImage image, int x, int y, int width, int height, @Nonnull Color color, float imageScale)
renderImage in interface RenderDevicepublic void renderImage(@Nonnull RenderImage image, int x, int y, int w, int h, int srcX, int srcY, int srcW, int srcH, @Nonnull Color color, float scale, int centerX, int centerY)
renderImage in interface RenderDevicepublic void renderQuad(int x,
int y,
int width,
int height,
@Nonnull
Color color)
renderQuad in interface RenderDevicepublic void renderQuad(int x,
int y,
int width,
int height,
@Nonnull
Color topLeft,
@Nonnull
Color topRight,
@Nonnull
Color bottomRight,
@Nonnull
Color bottomLeft)
renderQuad in interface RenderDevicepublic void setBlendMode(@Nonnull BlendMode blendMode)
setBlendMode in interface RenderDevicepublic void renderFont(@Nonnull RenderFont font, @Nonnull String text, int x, int y, @Nonnull Color fontColor, float sizeX, float sizeY)
renderFont in interface RenderDevice@Nullable public MouseCursor createMouseCursor(@Nonnull String filename, int hotspotX, int hotspotY) throws IOException
createMouseCursor in interface RenderDeviceIOExceptionpublic void enableMouseCursor(@Nonnull MouseCursor mouseCursor)
enableMouseCursor in interface RenderDevicepublic void disableMouseCursor()
disableMouseCursor in interface RenderDeviceCopyright © 2016. All rights reserved.