|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Graphics
java.awt.Graphics2D
com.jmex.awt.swingui.ImageGraphics
public abstract class ImageGraphics
This abstract class provides methods to paint on a Image
via the awt Graphics2D
.
Field Summary | |
---|---|
protected Image |
image
where painting in update() goes to. |
Constructor Summary | |
---|---|
protected |
ImageGraphics(Image image)
Protected ctor for subclasses. |
Method Summary | |
---|---|
static ImageGraphics |
createInstance(int width,
int height,
int paintedMipMapCount)
|
Image |
getImage()
|
abstract boolean |
isDirty()
|
boolean |
isExpandDirtyRegion()
|
void |
setExpandDirtyRegion(boolean expand)
|
abstract void |
update()
Updates the image data. |
void |
update(Texture texture)
Update a texture that contains the image from getImage() . |
abstract void |
update(Texture texture,
boolean clean)
Update a texture that contains the image from getImage() . |
Methods inherited from class java.awt.Graphics2D |
---|
addRenderingHints, clip, draw, draw3DRect, drawGlyphVector, drawImage, drawImage, drawRenderableImage, drawRenderedImage, drawString, drawString, drawString, drawString, fill, fill3DRect, getBackground, getComposite, getDeviceConfiguration, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, rotate, rotate, scale, setBackground, setComposite, setPaint, setRenderingHint, setRenderingHints, setStroke, setTransform, shear, transform, translate, translate |
Methods inherited from class java.awt.Graphics |
---|
clearRect, clipRect, copyArea, create, create, dispose, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Image image
update()
goes to.
Constructor Detail |
---|
protected ImageGraphics(Image image)
image
- where painting in update()
goes to.Method Detail |
---|
public static ImageGraphics createInstance(int width, int height, int paintedMipMapCount)
width
- of the imageheight
- of the imagepaintedMipMapCount
- number of mipmaps that are painted, rest is drawn by image copying, 0 for no mipmaps,
1 for a single image painted and mipmaps copied, higher values respective
public Image getImage()
update()
goes toupdate()
public void update(Texture texture)
getImage()
. Only dirty areas are updated. The texture must
have mipmapping turned off (Texture#MM_NONE
). The whole area is cleaned (dirty markers removed).
texture
- texture to be updatedpublic abstract void update(Texture texture, boolean clean)
getImage()
. Only dirty areas are updated. The texture must
have mipmapping turned off (Texture#MM_NONE
).
texture
- texture to be updatedclean
- true to mark whole area as clean after updating, false to keep dirty area for updating more texturespublic abstract void update()
getImage()
public abstract boolean isDirty()
public void setExpandDirtyRegion(boolean expand)
expand
- if true, dirty region grow by 2x2 to prevent antialiasing problempublic boolean isExpandDirtyRegion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |