com.alienfactory.javamappy.viewer.render
Class JDK12Renderer
java.lang.Object
com.alienfactory.javamappy.viewer.render.JDK12Renderer
- All Implemented Interfaces:
- Renderer
public class JDK12Renderer
- extends java.lang.Object
This Renderer
has been optimised for use in JDK 1.2 JVMs.
- Author:
- Steve Eynon
Constructor Summary |
JDK12Renderer(Map map)
Uses the raw pixel data and colour map from the given Map to
create the solid and transparent images in a JDK specific manner. |
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 |
opaqueImages
protected java.awt.Image[] opaqueImages
transparentImages
protected java.awt.Image[] transparentImages
blockWidth
protected final int blockWidth
blockHeight
protected final int blockHeight
JDK12Renderer
public JDK12Renderer(Map map)
throws java.lang.IllegalArgumentException
- Uses the raw pixel data and colour map from the given
Map
to
create the solid and transparent images in a JDK specific manner.
- Parameters:
map
- the Map
containing the image data to be rendered
- Throws:
java.lang.IllegalArgumentException
- if Map
is null
setClip
public void setClip(java.lang.Object objGFX,
int x,
int y,
int width,
int height)
throws java.lang.IllegalArgumentException
- Description copied from interface:
Renderer
- This is called just before a
Layer
is drawn to allow the
Renderer
to set the desired clipping region.
- Specified by:
setClip
in interface Renderer
- Parameters:
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
- Throws:
java.lang.IllegalArgumentException
- if objGFX
is null
restoreClip
public void restoreClip(java.lang.Object objGFX)
throws java.lang.IllegalArgumentException
- Description copied from interface:
Renderer
- This is called after a
Layer
is drawn to restore the
clipping region to what it used to be.
- Specified by:
restoreClip
in interface Renderer
- Parameters:
objGFX
- the gfx object specific to the Renderer
- Throws:
java.lang.IllegalArgumentException
- if objGFX
is null
drawImage
public final void drawImage(java.lang.Object objGFX,
int imageIndex,
int dstPixX,
int dstPixY,
boolean transparency,
int modification)
throws java.lang.IllegalArgumentException
- Description copied from interface:
Renderer
- Draws an image as given by
imageIndex
at the given coordinates.
- Specified by:
drawImage
in interface Renderer
- Parameters:
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
- Throws:
java.lang.IllegalArgumentException
- if objGFX
is null
Copyright © 2001-2009 Alien-Factory Ltd. All Rights Reserved.