|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Graphics
com.wirefusion.player.WfGraphics
public final class WfGraphics
This object contains methods for painting. The graphics objects sent to Wob.paint(Graphics g) are of this type.
WfGraphics is a subclass of java.awt.Graphics, and has support for most of the methods in Graphics. In addition to these standard Graphics methods, a range of WireFusion specific methods have been added to WfGraphics; the drawWfImage methods and drawTiledWfImage. These methods draws WfImage images and are very fast, regardless of the Java version.
If you use the standard Graphics methods for drawing and the graphics often changes (i.e. new graphics in each frame), then you may get bad performance under Java 1.1. If you on the other hand perform the same graphics operations several times in a row (int "paint"), only the first time you draw the operations will be slow.
Important: It is currently not recommended that you combine the use of drawWfImage methods and the other drawing methods in a WfGraphics object, since the result may be unexpected.
The following Graphics methods are currently not implemented/has no effect:
create(), create(int, int, int, int), dispose(),
draw3DRect(int, int, int, int, boolean), drawBytes(byte[], int, int, int, int),
drawChars(char[], int, int, int, int), drawString(AttributedCharacterIterator iterator, int x, int y),
fill3DRect(int x, int y, int width, int height, boolean raised), drawPolygon(Polygon p),
fillPolygon(Polygon p), finalize(), getClip(), getClipBounds(), getClipBounds(Rectangle r),
getClipRect(), getFontMetrics(),
| Method Summary | |
|---|---|
void |
clearRect(int x,
int y,
int width,
int height)
|
void |
clipRect(int x,
int y,
int width,
int height)
|
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
|
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x,
int y,
int width,
int height)
|
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
void |
drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y)
This method is not implemented. |
void |
drawString(java.lang.String str,
int x,
int y)
|
void |
drawTiledWfImage(WfImage img,
double x,
double y,
double width,
double height,
double opacity)
Tiles an image within the specified rectangular area. |
void |
drawWfImage(WfImage img,
double x,
double y)
The image is drawn with its top-left corner at (x, y) in this graphics context's coordinate space. |
void |
drawWfImage(WfImage img,
double x,
double y,
double width,
double height)
The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. |
void |
drawWfImage(WfImage img,
double dx1,
double dy1,
double dx2,
double dy2,
double sx1,
double sy1,
double sx2,
double sy2,
double opacity)
Draws the specified area of the image inside the specified area of the destination drawable surface. |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
fillOval(int x,
int y,
int width,
int height)
|
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
java.awt.Color |
getColor()
|
java.awt.Font |
getFont()
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
|
void |
setAntiAliasing(boolean antiAliasing)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setClip(java.awt.Shape clip)
|
void |
setColor(java.awt.Color c)
|
void |
setFont(java.awt.Font font)
|
void |
setPaintMode()
|
void |
setXORMode(java.awt.Color c1)
|
void |
translate(int x,
int y)
|
| Methods inherited from class java.awt.Graphics |
|---|
create, create, dispose, draw3DRect, drawBytes, drawChars, drawPolygon, drawRect, fill3DRect, fillPolygon, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getFontMetrics, hitClip, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void setAntiAliasing(boolean antiAliasing)
antiAliasing - if true, anti aliasing is enabled, otherwise disabled
Note: Anti aliasing is disabled by default (faster drawing). Anti aliasing
will only be used if the presentation is running in Java 2.
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 java.awt.Graphics
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
copyArea in class java.awt.Graphics
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
drawArc in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public boolean drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
drawImage in class java.awt.Graphics
public void drawLine(int x1,
int y1,
int x2,
int y2)
drawLine in class java.awt.Graphics
public void drawOval(int x,
int y,
int width,
int height)
drawOval in class java.awt.Graphics
public void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolygon in class java.awt.Graphics
public void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
drawPolyline in class java.awt.Graphics
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
drawRoundRect in class java.awt.Graphics
public void drawString(java.lang.String str,
int x,
int y)
drawString in class java.awt.Graphics
public void drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y)
drawString in class java.awt.Graphics
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
fillArc in class java.awt.Graphics
public void fillOval(int x,
int y,
int width,
int height)
fillOval in class java.awt.Graphics
public void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
fillPolygon in class java.awt.Graphics
public void fillRect(int x,
int y,
int width,
int height)
fillRect in class java.awt.Graphics
public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
fillRoundRect in class java.awt.Graphicspublic java.awt.Color getColor()
getColor in class java.awt.Graphicspublic java.awt.Font getFont()
getFont in class java.awt.Graphicspublic java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics in class java.awt.Graphicspublic void setClip(java.awt.Shape clip)
setClip in class java.awt.Graphics
public void setClip(int x,
int y,
int width,
int height)
setClip in class java.awt.Graphicspublic void setColor(java.awt.Color c)
setColor in class java.awt.Graphicspublic void setFont(java.awt.Font font)
setFont in class java.awt.Graphicspublic void setPaintMode()
setPaintMode in class java.awt.Graphicspublic void setXORMode(java.awt.Color c1)
setXORMode in class java.awt.Graphics
public void translate(int x,
int y)
translate in class java.awt.Graphics
public void drawTiledWfImage(WfImage img,
double x,
double y,
double width,
double height,
double opacity)
img - the image to be tiledx - y - width - height - opacity - the image opacity (a value between 0 and 100).
public void drawWfImage(WfImage img,
double dx1,
double dy1,
double dx2,
double dy2,
double sx1,
double sy1,
double sx2,
double sy2,
double opacity)
img - the specified image to be drawndx1 - the x coordinate of the first corner of the destination rectangle.dy1 - the y coordinate of the first corner of the destination rectangle.dx2 - the x coordinate of the second corner of the destination rectangle.dy2 - the y coordinate of the second corner of the destination rectangle.sx1 - the x coordinate of the first corner of the source rectangle.sy1 - the y coordinate of the first corner of the source rectangle.sx2 - the x coordinate of the second corner of the source rectangle.sy2 - the y coordinate of the second corner of the source rectangle.opacity - the image opacity (a value between 0 and 100).
public void drawWfImage(WfImage img,
double x,
double y)
img - img the specified image to be drawn.x - the x coordinate.y - the y coordinate.
public void drawWfImage(WfImage img,
double x,
double y,
double width,
double height)
img - the specified image to be drawn.x - the x coordinate.y - the y coordinate.width - the width of the rectangle.height - the height of the rectangle.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||