|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alienfactory.javamappy.viewer.render.J2SE14Renderer
public class J2SE14Renderer
This Renderer
has been optimised for use in Java2 SE 1.4 JVMs or
later.
Field Summary | |
---|---|
protected int |
blockHeight
|
protected int |
blockWidth
|
protected java.awt.Image[] |
opaqueImages
|
protected java.awt.Image[] |
transparentImages
|
Fields inherited from interface com.alienfactory.javamappy.viewer.render.Renderer |
---|
DRAW_LEFT_SIDE_ONLY, DRAW_RIGHT_SIDE_ONLY, NONE |
Constructor Summary | |
---|---|
J2SE14Renderer(Map map)
Uses the raw pixel data and colour map from the given Map to
create images in a JDK specific manner. |
|
J2SE14Renderer(Map map,
java.io.InputStream tileSheet,
boolean block0included)
Loads the tile sheet image from the given Input Stream (which is not closed). |
Method Summary | |
---|---|
void |
drawImage(java.lang.Object objGFX,
int imageIndex,
int dstPixX,
int dstPixY,
boolean transparency,
int modification)
Draws an image as given by imageIndex at the given coordinates. |
void |
restoreClip(java.lang.Object objGFX)
This is called after a Layer is drawn to restore the
clipping region to what it used to be. |
void |
setClip(java.lang.Object objGFX,
int x,
int y,
int width,
int height)
This is called just before a Layer is drawn to allow the
Renderer to set the desired clipping region. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.Image[] opaqueImages
protected java.awt.Image[] transparentImages
protected final int blockWidth
protected final int blockHeight
Constructor Detail |
---|
public J2SE14Renderer(Map map) throws java.lang.IllegalArgumentException
Map
to
create images in a JDK specific manner.
map
- the Map
containing the image data to be rendered
java.lang.IllegalArgumentException
- if Map
is null
public J2SE14Renderer(Map map, java.io.InputStream tileSheet, boolean block0included) throws java.io.IOException, java.lang.IllegalArgumentException
map
- the Map
containing the image data to be renderedtileSheet
- the input stream to load the tile image fromblock0included
- set to true
if the tile image includes block 0
java.lang.IllegalArgumentException
- if input parameter is null
java.io.IOException
Method Detail |
---|
public void setClip(java.lang.Object objGFX, int x, int y, int width, int height) throws java.lang.IllegalArgumentException
Renderer
Layer
is drawn to allow the
Renderer
to set the desired clipping region.
setClip
in interface Renderer
objGFX
- the gfx object specific to the Renderer
x
- the start coordinate of the clipping regiony
- the start coordinate of the clipping regionwidth
- the width of the clipping regionheight
- the height of the clipping region
java.lang.IllegalArgumentException
- if objGFX
is null
public void restoreClip(java.lang.Object objGFX) throws java.lang.IllegalArgumentException
Renderer
Layer
is drawn to restore the
clipping region to what it used to be.
restoreClip
in interface Renderer
objGFX
- the gfx object specific to the Renderer
java.lang.IllegalArgumentException
- if objGFX
is null
public final void drawImage(java.lang.Object objGFX, int imageIndex, int dstPixX, int dstPixY, boolean transparency, int modification) throws java.lang.IllegalArgumentException
Renderer
imageIndex
at the given coordinates.
drawImage
in interface Renderer
objGFX
- the gfx object specific to the Renderer
imageIndex
- the index of the image to draw - see Map.getImageData()
dstPixX
- the coordinate of where the image should be rendereddstPixY
- the coordinate of where the image should be renderedtransparency
- whether or not the image should rendered honouring
it's transparent pixels.modification
- any modification style should be applied to the image
java.lang.IllegalArgumentException
- if objGFX
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |