|
Copyright 2011-09-18 Werner Randelshofer | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Graphics java.awt.Graphics2D ch.randelshofer.awt.graphics.Pipe ch.randelshofer.awt.graphics.AbstractPipe
public abstract class AbstractPipe
AbstractPipe is used as an abstract super class for Pipes with basic capabilities.
Field Summary | |
---|---|
protected int |
background
The background color used for clearRect. |
protected static double |
flatness
Flatness is used for flattening general paths. |
protected java.awt.image.BufferedImage |
mis
The buffered image which holds the pixel data. |
protected int[] |
pixels
The pixel data array. |
protected java.awt.Shape |
previousClip
This is used to quickly test, if the same clip is set again. |
protected java.awt.geom.AffineTransform |
previousTransform
This is used to quickly test, if the same Transform is set again. |
protected java.awt.image.WritableRaster |
ras
The raster holding the pixels of the image data. |
protected int |
tx
Translation on X- and Y-axis. |
protected int |
ty
Translation on X- and Y-axis. |
protected float |
u1
LiangBarsky clip test variables. |
protected float |
u2
LiangBarsky clip test variables. |
Fields inherited from class ch.randelshofer.awt.graphics.Pipe |
---|
cx1, cx2, cy1, cy2, gh, gw |
Constructor Summary | |
---|---|
AbstractPipe(java.awt.image.BufferedImage image)
Creates a new instance. |
Method Summary | |
---|---|
protected static void |
arrayfill(int[] array,
int from,
int to,
int value)
A faster array fill implementation than the one found in java.util.Arrays. |
void |
clearRect(int x,
int y,
int width,
int height)
|
void |
clipRect(int x,
int y,
int width,
int height)
|
protected boolean |
clipTest(float p,
float q)
LiangBarsky clip test. |
protected boolean |
clipTest(int p,
float q)
LiangBarsky clip test. |
void |
flush()
Flushes all pending graphics operations of the rendering pipe into its underlying image. |
java.awt.Color |
getBackground()
|
void |
setBackground(java.awt.Color c)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setClip(java.awt.Shape clip)
|
void |
setComposite(java.awt.Composite comp)
|
void |
setTransform(java.awt.geom.AffineTransform Tx)
|
void |
transform(java.awt.geom.AffineTransform Tx)
|
void |
translate(double tx,
double ty)
|
void |
translate(int tx,
int ty)
|
Methods inherited from class ch.randelshofer.awt.graphics.Pipe |
---|
addRenderingHints, clip, copyArea, create, dispose, draw, drawArc, drawGlyphVector, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawOval, drawPolygon, drawPolyline, drawRenderableImage, drawRenderedImage, drawRoundRect, drawString, drawString, drawString, drawString, fill, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, getClip, getClipBounds, getColor, getComposite, getDeviceConfiguration, getFont, getFontMetrics, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, rotate, rotate, scale, setColor, setFont, setPaint, setPaintMode, setRenderingHint, setRenderingHints, setStroke, setXORMode, shear, toString |
Methods inherited from class java.awt.Graphics2D |
---|
draw3DRect, fill3DRect |
Methods inherited from class java.awt.Graphics |
---|
create, drawBytes, drawChars, drawLine, drawPolygon, drawRect, fillPolygon, finalize, getClipBounds, getClipRect, getFontMetrics, hitClip |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int tx
protected int ty
protected java.awt.Shape previousClip
protected java.awt.geom.AffineTransform previousTransform
protected java.awt.image.BufferedImage mis
protected java.awt.image.WritableRaster ras
protected int[] pixels
protected int background
protected static final double flatness
protected float u1
protected float u2
Constructor Detail |
---|
public AbstractPipe(java.awt.image.BufferedImage image)
Method Detail |
---|
public void flush()
Pipe
flush
in class Pipe
public void clearRect(int x, int y, int width, int height)
clearRect
in class java.awt.Graphics
public void clipRect(int x, int y, int width, int height)
clipRect
in class Pipe
public void setClip(int x, int y, int width, int height)
setClip
in class Pipe
public void setClip(java.awt.Shape clip)
setClip
in class Pipe
protected final boolean clipTest(int p, float q)
protected final boolean clipTest(float p, float q)
public void setBackground(java.awt.Color c)
setBackground
in class Pipe
public java.awt.Color getBackground()
getBackground
in class Pipe
public void setComposite(java.awt.Composite comp)
setComposite
in class Pipe
public void transform(java.awt.geom.AffineTransform Tx)
transform
in class Pipe
public void translate(double tx, double ty)
translate
in class Pipe
public void translate(int tx, int ty)
translate
in class java.awt.Graphics2D
public void setTransform(java.awt.geom.AffineTransform Tx)
setTransform
in class Pipe
protected static final void arrayfill(int[] array, int from, int to, int value)
|
Copyright 2011-09-18 Werner Randelshofer | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |