|
-bottom | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.microedition.lcdui.Graphics | +--mmpp.microedition.lcdui.GraphicsX
GraphicsX는 Graphics의 subclass로 Graphics의 확장된 API를 제공한다. 현재 구현에서 모든 Graphics개체는 GraphicsX의 instance이다. 따라서 GraphicsX개체는Graphics개체를 GraphicsX *gx = (GraphicsX)g;와 같이 type casting을 통해서 얻을 수 있다.
Field Summary | |
static int |
DEFAULT_ALPHA
|
Fields inherited from class javax.microedition.lcdui.Graphics |
alpha, BASELINE, BOTTOM, clipX1, clipX2, clipY1, clipY2, destination, DOTTED, HCENTER, LEFT, RIGHT, SOLID, TOP, transX, transY, VCENTER, xorColor, xorMode |
Method Summary | |
javax.microedition.lcdui.Image |
capture(int x,
int y,
int width,
int height)
주어진 영역에 대하여 Graphics 객체의 내용을 Image로 만들어서 return한다. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Polygon을 그린다. (xPoints[0], yPoints[0), (xPoints[1], yPoints[1]) .... (xPoints[n-1],yPoints[n-1])의 점들로 이루어진 Polygon을 그린다. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
Polyline을 그린다. (xPoints[0], yPoints[0), (xPoints[1], yPoints[1]) .... (xPoints[n-1],yPoints[n-1])의 점들로 이루어진 Polyline을 그린다. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Polygon을 그린다. (xPoints[0], yPoints[0), (xPoints[1], yPoints[1]) .... (xPoints[n-1],yPoints[n-1])의 점들로 이루어지고 내부가 현재 color로 채워진 Polygon을 그린다. |
int |
getPixel(int x,
int y)
특정 좌표의 색상 값을 RGB로 얻어낸다. |
void |
setAlpha(int alpha)
현재의 graphics context에 alpha값을 설정한다. alpha 값은 alpha blending에 사용된다. alpha값은 0부터 256 사이의 값을 가질 수 있다. alpha가 0이면 투명이고 alpha가 256이면 불투명이다. |
void |
setPaintMode()
현재의 graphics의 context를 xor모드에 paint모드로 변경한다. |
void |
setPixel(int x,
int y,
int RGB)
특정 좌표의 색상 값을 RGB로 지정한다. |
void |
setXORMode(int RGB)
현재의 graphics의 context를 xor모드로 바꾼다. xor모드로 같은 그림이 두번 그려지게 되면 원래의 그림이 복원된다. |
Methods inherited from class javax.microedition.lcdui.Graphics |
clipRect, drawArc, drawChar, drawChars, drawImage, drawLine, drawRect, drawRoundRect, drawString, drawSubstring, fillArc, fillRect, fillRoundRect, getBlueComponent, getClipHeight, getClipWidth, getClipX, getClipY, getColor, getFont, getGrayScale, getGreenComponent, getRedComponent, getStrokeStyle, getTranslateX, getTranslateY, setClip, setColor, setColor, setFont, setGrayScale, setStrokeStyle, translate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int DEFAULT_ALPHA
Method Detail |
public javax.microedition.lcdui.Image capture(int x, int y, int width, int height)
x
- 저장할 화면 사각형의 왼쪽 좌표y
- 저장할 화면 사각형의 위쪽 좌표width
- 저장할 화면 사각형의 너비height
- 저장할 화면 사각형의 높이IllegalArgumentExcepton
- width 또는 height가 0보다 작거나 같을 때. clipping영역을 벗어난 곳을 caputre하려 할 때public void setXORMode(int RGB)
RGB
- XOR로 현재 color를 대체할 colorsetPaintMode()
,
setAlpha(int)
public void setPaintMode()
setXORMode(int)
,
setAlpha(int)
public void setAlpha(int alpha)
alpha
- 0부터 256사이의 정수 값java.lang.IllegalArgumentException
- alpha값이 0~256사이의 값이 아닐 때public int getPixel(int x, int y)
x
- pixel의 x좌표y
- pixel의 y좌표java.lang.IllegalArgumentException
- clipping영역 밖의 점을 얻으려 할 때public void setPixel(int x, int y, int RGB)
x
- pixel의 x좌표y
- pixel의 y좌표RGB
- pixel에 사용할 colorpublic void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- 점들의 x좌표 배열yPoints
- 점들의 y좌표 배열nPoints
- 점의 갯수public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- 점들의 x좌표 배열yPoints
- 점들의 y좌표 배열nPoints
- 점의 갯수public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- 점들의 x좌표 배열yPoints
- 점들의 y좌표 배열nPoints
- 점의 갯수
|
-bottom | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |