|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--danger.ui.Pen
Basic drawing primitives. This class implements the basic drawing primitives that would normally be found in the abstract windowing toolbox.
| Constructor Summary | |
Pen()
|
|
| Method Summary | |
abstract Pen |
clonePen()
Clone the current pen. |
protected abstract void |
copy(Pen from)
|
abstract void |
drawBitmap(int x,
int y,
Bitmap bm)
Draw a bitmap. |
abstract void |
drawBitmap(int x,
int y,
Bitmap inBitmap,
boolean inInverted)
Draw a bitmap that may be inverted. |
abstract void |
drawBitmap(int x,
int y,
Bitmap a,
int wa,
Bitmap b,
int wb)
|
abstract void |
drawBitmap(int x,
int y,
Bitmap bm,
int left,
int top,
int right,
int bottom)
Draw a portion of a bitmap. |
void |
drawBitmap(int x,
int y,
Bitmap bm,
Rect r)
|
abstract int |
drawChar(int x,
int y,
char c)
Draw a character. |
abstract void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line. |
abstract void |
drawOval(int left,
int top,
int right,
int bottom)
Draw an oval. |
void |
drawOval(Rect r)
Draw an oval. |
abstract void |
drawPoint(int x,
int y)
Draw a point. |
abstract void |
drawPoly(int[] x,
int[] y)
Draw a convex polygon. |
abstract void |
drawRect(int left,
int top,
int right,
int bottom)
Draw a rectangle. |
void |
drawRect(Rect r)
Draw a rectangle. |
abstract void |
drawRoundRect(int left,
int top,
int right,
int bottom,
int arcWidth,
int arcHeight)
Draw a round-cornered rectangle. |
void |
drawRoundRect(Rect r,
int arcWidth,
int arcHeight)
Draw a round-cornered rectangle. |
int |
drawText(int x,
int y,
byte[] data,
int offset,
int length)
Draw a string. |
int |
drawText(int x,
int y,
char[] data,
int offset,
int length)
Draw a string. |
abstract int |
drawText(int x,
int y,
java.lang.String str)
Draw a string. |
int |
drawText(int x,
int y,
java.lang.String s,
int offset,
int len)
|
abstract void |
fillOval(int left,
int top,
int right,
int bottom)
Fill an oval. |
void |
fillOval(Rect r)
Fill an oval. |
abstract void |
fillPoly(int[] x,
int[] y)
Fill a convex polygon. |
abstract void |
fillRect(int left,
int top,
int right,
int bottom)
Fill a rectangle. |
void |
fillRect(Rect r)
Fill a rectangle. |
abstract void |
fillRoundRect(int left,
int top,
int right,
int bottom,
int arcWidth,
int arcHeight)
Fill a round-cornered rectangle. |
void |
fillRoundRect(Rect r,
int arcWidth,
int arcHeight)
Fill a round-cornered rectangle. |
abstract Rect |
getClip()
Get the clipping rectangle in local coordinates. |
abstract Rect |
getClipGlobal()
Get the clipping rectangle in global coordinates. |
abstract int |
getColor()
|
abstract Font |
getFont()
Get the current font. |
protected abstract int |
getLeft()
Get the horizontal offset of the pen. |
abstract int |
getTextOutlineColor()
|
protected abstract int |
getTop()
Get the vertical offset of the pen. |
abstract int |
getVisibleBottom()
return the last visible line (in local coordinates) |
abstract void |
getVisibleRect(Rect r)
return a rectangle that encloses all the visible points (in local coordinates) |
abstract int |
getVisibleTop()
return the first visible line (in local coordinates) |
boolean |
isClipEmpty()
returns true if *nothing* will be drawn with this pen |
int |
maxStack()
|
abstract void |
offset(int dx,
int dy)
Offset coordinate space. |
void |
pop()
Restores the last copy of this pen saved on the statestack. |
void |
popAll()
Pops all saved state off the statestack |
void |
push()
Saves a copy of this pen on the statestack. |
void |
setClip(int l,
int t,
int r,
int b)
Adjust the clip-rect of the Pen using local coordinates. |
abstract void |
setClipGlobal(int l,
int t,
int r,
int b)
Adjust the clip-rect of the Pen using global coordinates. |
void |
setColor(Color c)
|
void |
setColor(int color)
|
void |
setColor(int r,
int g,
int b)
|
void |
setColor(int r,
int g,
int b,
int a)
|
abstract void |
setColorAlpha(int color)
Set the pen drawing color. |
abstract void |
setFont(Font f)
Set the current font. |
abstract void |
setSize(int inWidth,
int inHeight)
Set the current pen size. |
void |
setTextOutlineColor(Color c)
|
abstract void |
setTextOutlineColor(int color)
Set the current outline text color. |
void |
setTextOutlineColor(int r,
int g,
int b)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Pen()
| Method Detail |
public abstract void drawPoint(int x,
int y)
public abstract void drawLine(int x1,
int y1,
int x2,
int y2)
x1 - An integer specifying the beginning x location in pixels.x2 - An integer specifying the ending x location in pixels.y1 - An integer specifying the beginning y location in pixels.y2 - An integer specifying the ending y location in pixels.
public abstract void drawRect(int left,
int top,
int right,
int bottom)
left - An integer specifying the left coordinate of the rectangle.top - An integer specifying the top coordinate of the rectangle.right - An integer specifying the right coordinate of the rectangle.bottom - An integer specifying the bottom coordinate of the rectangle.
public abstract void fillRect(int left,
int top,
int right,
int bottom)
left - An integer specifying the left coordinate of the rectangle.top - An integer specifying the top coordinate of the rectangle.right - An integer specifying the right coordinate of the rectangle.bottom - An integer specifying the bottom coordinate of the rectangle.
public abstract void drawOval(int left,
int top,
int right,
int bottom)
left - An integer specifying the left coordinate of the oval.top - An integer specifying the top coordinate of the oval.right - An integer specifying the right coordinate of the oval.bottom - An integer specifying the bottom coordinate of the oval.
public abstract void fillOval(int left,
int top,
int right,
int bottom)
left - An integer specifying the left coordinate of the oval.top - An integer specifying the top coordinate of the oval.right - An integer specifying the right coordinate of the oval.bottom - An integer specifying the bottom coordinate of the oval.
public abstract int drawChar(int x,
int y,
char c)
x - An integer specifying the x location for the character in pixels.y - An integer specifying the y location for the character in pixels.c - A char specifying the Unicode character to be drawn.
public abstract int drawText(int x,
int y,
java.lang.String str)
x - An integer specifying the x location for the string in pixels.y - An integer specifying the y location for the string in pixels.str - A String specifying the Unicode character string to be drawn.
public int drawText(int x,
int y,
java.lang.String s,
int offset,
int len)
public int drawText(int x,
int y,
byte[] data,
int offset,
int length)
x - An integer specifying the x location for the string in pixels.y - An integer specifying the y location for the string in pixels.data - Array of UTF-8 encoded Unicode chars to drawoffset - Offset into chars arraylength - Number of chars in chars array to draw
public int drawText(int x,
int y,
char[] data,
int offset,
int length)
x - An integer specifying the x location for the string in pixels.y - An integer specifying the y location for the string in pixels.data - Array of Unicode chars to drawoffset - Offset into chars arraylength - Number of chars in chars array to draw
public abstract void drawBitmap(int x,
int y,
Bitmap bm)
x - An integer specifying the x location for the bitmap in pixels.y - An integer specifying the y location for the bitmap in pixels.bm - A Bitmap specifying the bitmap to be drawn.
public abstract void drawBitmap(int x,
int y,
Bitmap bm,
int left,
int top,
int right,
int bottom)
x - An integer specifying the x location for the bitmap in pixels.y - An integer specifying the y location for the bitmap in pixels.bm - A Bitmap specifying the bitmap to be drawn.left - An integer specifying the left coordinate of the source rectangle.top - An integer specifying the top coordinate of the source rectangle.right - An integer specifying the right coordinate of the source rectangle.bottom - An integer specifying the bottom coordinate of the source rectangle.
public void drawBitmap(int x,
int y,
Bitmap bm,
Rect r)
public abstract void drawBitmap(int x,
int y,
Bitmap inBitmap,
boolean inInverted)
x - An integer specifying the x location for the bitmap in pixels.y - An integer specifying the y location for the bitmap in pixels.inBitmap - A Bitmap specifying the bitmap to be drawn.inInverted - A boolean specifying whether or not to invert the bitmap.
public abstract void drawBitmap(int x,
int y,
Bitmap a,
int wa,
Bitmap b,
int wb)
public abstract void drawRoundRect(int left,
int top,
int right,
int bottom,
int arcWidth,
int arcHeight)
left - An integer specifying the left coordinate of the rectangle.top - An integer specifying the top coordinate of the rectangle.right - An integer specifying the right coordinate of the rectangle.bottom - An integer specifying the bottom coordinate of the rectangle.arcWidth - An integer specifying the width of the arc to be used for the corners.arcHeight - An integer specifying the height of the arc to be used for the corners.
public abstract void fillRoundRect(int left,
int top,
int right,
int bottom,
int arcWidth,
int arcHeight)
left - An integer specifying the left coordinate of the rectangle.top - An integer specifying the top coordinate of the rectangle.right - An integer specifying the right coordinate of the rectangle.bottom - An integer specifying the bottom coordinate of the rectangle.arcWidth - An integer specifying the width of the arc to be used for the corners.arcHeight - An integer specifying the height of the arc to be used for the corners.public void drawRect(Rect r)
r - A Rect specifying the coordinates of the rectangle.public void fillRect(Rect r)
r - A Rect specifying the coordinates of the rectangle.public void drawOval(Rect r)
r - A Rect specifying the coordinates of the rectangle.public void fillOval(Rect r)
r - A Rect specifying the coordinates of the rectangle.
public void drawRoundRect(Rect r,
int arcWidth,
int arcHeight)
r - A Rect specifying the coordinates of the rectangle.arcWidth - An integer specifying the width of the arc to be used for the corners.arcHeight - An integer specifying the height of the arc to be used for the corners.
public void fillRoundRect(Rect r,
int arcWidth,
int arcHeight)
r - A Rect specifying the coordinates of the rectangle.arcWidth - An integer specifying the width of the arc to be used for the corners.arcHeight - An integer specifying the height of the arc to be used for the corners.
public abstract void drawPoly(int[] x,
int[] y)
x - An integer array of x coordinates.y - An integer array of y coordinates.
public abstract void fillPoly(int[] x,
int[] y)
x - An integer array of x coordinates.y - An integer array of y coordinates.
public abstract void offset(int dx,
int dy)
dx - An integer specifying the delta for the x origin.dy - An integer specifying the delta for the y origin.public abstract Rect getClipGlobal()
public abstract Rect getClip()
public abstract void setColorAlpha(int color)
color - A packed RGB integer specifying the color.public void setColor(int color)
public void setColor(int r,
int g,
int b)
public void setColor(int r,
int g,
int b,
int a)
public void setColor(Color c)
public abstract int getColor()
public abstract void setTextOutlineColor(int color)
public void setTextOutlineColor(int r,
int g,
int b)
public void setTextOutlineColor(Color c)
public abstract int getTextOutlineColor()
public abstract void setFont(Font f)
f - A Font specifying the font to be used.public abstract Font getFont()
public abstract void setSize(int inWidth,
int inHeight)
inWidth - An int specifying the width for the pen.inHeight - An int specifying the height for the pen.
public abstract void setClipGlobal(int l,
int t,
int r,
int b)
public boolean isClipEmpty()
public void setClip(int l,
int t,
int r,
int b)
protected abstract int getTop()
protected abstract int getLeft()
public abstract Pen clonePen()
public abstract void getVisibleRect(Rect r)
public abstract int getVisibleTop()
public abstract int getVisibleBottom()
protected abstract void copy(Pen from)
public void push()
public void pop()
public int maxStack()
public void popAll()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||