|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IGC
| Method Summary | |
|---|---|
int |
contentsToViewX(int x)
Translates the given contents x coordinate into view x coordinate |
int |
contentsToViewY(int y)
Translates the given contents y coordinate into view y coordinate |
IColor |
createColor(int r,
int g,
int b)
Creates a color with the given RGB values |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int endAngle)
Draws the outline of a circular or elliptical arc within the specified rectangular area. |
void |
drawFocus(int x,
int y,
int width,
int height)
Draws a rectangle, based on the specified arguments, which has the appearance of the platform's focus rectangle if the platform supports such a notion, and otherwise draws a simple rectangle in the receiver's foreground color. |
void |
drawImage(IImage image,
int _x,
int _y,
int maxWith,
int maxHeight)
Copies a the source image into a (potentially different sized) rectangular area in the graphical context. |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draws a line, using the foreground color, between the points (x1, y1) and (x2, y2). |
void |
drawPolygon(int[] points)
Draws the closed polygon which is defined by the specified array of integer coordinates, using the receiver's foreground color. |
void |
drawRectangle(int x,
int y,
int width,
int height)
Draws the outline of the rectangle specified by the arguments, using the receiver's foreground color. |
void |
drawText(java.lang.String string,
int x,
int y)
Draws the given string, using the receiver's current font and foreground color. |
void |
drawText(java.lang.String string,
int x,
int y,
boolean trans)
Draws the given string, using the receiver's current font and foreground color. |
void |
drawTextTruncated(java.lang.String name,
int _x,
int _y,
int width,
int height,
boolean trans)
Draws the given string into the given rectangle (left justify) If the string cannot fit in the rectangle area, the string is truncated. |
void |
drawTextTruncatedCentred(java.lang.String name,
int _x,
int _y,
int width,
int height,
boolean trans)
Draws the given string centered into the given rectangle. |
void |
fillGradientRectangle(int x,
int y,
int width,
int height,
boolean vertical)
Fills the interior of the specified rectangle with a gradient sweeping from left to right or top to bottom progressing from the graphical context gradient color to its background color. |
void |
fillOval(int x,
int y,
int width,
int height)
Fills the interior of an oval, within the specified rectangular area, with the receiver's background color. |
void |
fillPolygon(int[] points)
Fills the interior of the closed polygon which is defined by the specified array of integer coordinates, using the receiver's background color. |
void |
fillRectangle(int x,
int y,
int width,
int height)
Fills the interior of the rectangle specified by the arguments, using the receiver's background color. |
IColor |
getBackground()
Returns current the background color used in the graphical context |
int |
getContentsX()
Returns the contents x coordinate that is at the upper left corner of the view |
int |
getContentsY()
Returns the contents y coordinate that is at the upper left corner of the view |
int |
getFontHeight(IFont font)
Returns the font height given font |
int |
getFontWidth(IFont font)
Returns the average character width for the given font |
IColor |
getForeground()
Returns current the background color used in the graphical context |
int |
getLineDashStyle()
Returns the LineDash style constant |
int |
getLineDotStyle()
Returns the LineDotD style contant |
int |
getLineSolidStyle()
Returns the LineSolid style constant |
int |
getLineStyle()
Returns current the line style used in the graphical context |
int |
getLineWidth()
Returns the current graphical context line width used for drawing |
int |
getVisibleHeight()
Returns the contents visible height |
int |
getVisibleWidth()
Returns the contents visible width |
float |
getZoom()
Returns the zoom factor applied in both x and y directions when drawing |
void |
setBackground(IColor color)
Set the graphical context foreground color |
void |
setDrawTextWithFocusStyle(boolean focus)
|
void |
setFont(IFont font)
Set the current font used in the graphical context |
void |
setForeground(IColor color)
Set the graphical context background color |
void |
setGradientColor(IColor color)
Set the color to use when filling regions using gradient. |
void |
setLineStyle(int style)
Set the current line style |
void |
setLineWidth(int width)
Set the line width to use for drawing |
int |
textExtent(java.lang.String name)
Returns the given string width in pixels |
| Method Detail |
|---|
void setLineStyle(int style)
style - the new line styleint getLineStyle()
int getContentsX()
int getContentsY()
int getVisibleWidth()
int getVisibleHeight()
int contentsToViewX(int x)
x - the x coordinate to translate
int contentsToViewY(int y)
y - the y coordinate to translate
void drawLine(int x1,
int y1,
int x2,
int y2)
x1 - the first point's x coordinatey1 - the first point's y coordinatex2 - the second point's x coordinatey2 - the second point's y coordinate
void drawRectangle(int x,
int y,
int width,
int height)
x - the x coordinate of the rectangle to be drawny - the y coordinate of the rectangle to be drawnwidth - the width of the rectangle to be drawnheight - the height of the rectangle to be drawn
void drawFocus(int x,
int y,
int width,
int height)
x - the x coordinate of the rectangley - the y coordinate of the rectanglewidth - the width of the rectangleheight - the height of the rectanglevoid fillPolygon(int[] points)
points - an array of alternating x and y values which are the vertices of the polygonvoid drawPolygon(int[] points)
points - an array of alternating x and y values which are the vertices of the polygon
void fillRectangle(int x,
int y,
int width,
int height)
x - the x coordinate of the rectangle to be filledy - the y coordinate of the rectangle to be filledwidth - the width of the rectangle to be filledheight - the height of the rectangle to be filled
void fillGradientRectangle(int x,
int y,
int width,
int height,
boolean vertical)
x - the x coordinate of the rectangle to be filledy - the y coordinate of the rectangle to be filledwidth - the width of the rectangle to be filled, may be negative (inverts direction of gradient if horizontal)height - the height of the rectangle to be filled, may be negative (inverts direction of gradient if horizontal)vertical - if true sweeps from top to bottom, else sweeps from left to rightint textExtent(java.lang.String name)
name - the string
void drawText(java.lang.String string,
int x,
int y,
boolean trans)
string - the string to be drawnx - the x coordinate of the top left corner of the rectangular area where the text is to be drawny - the y coordinate of the top left corner of the rectangular area where the text is to be drawntrans - if true the background will be transparent, otherwise it will be opaque
void drawText(java.lang.String string,
int x,
int y)
string - the string to be drawnx - the x coordinate of the top left corner of the rectangular area where the text is to be drawny - the y coordinate of the top left corner of the rectangular area where the text is to be drawn
void fillOval(int x,
int y,
int width,
int height)
x - the x coordinate of the upper left corner of the oval to be filledy - the y coordinate of the upper left corner of the oval to be filledwidth - the width of the oval to be filledheight - the width of the oval to be filledIColor getBackground()
IColor getForeground()
void setBackground(IColor color)
color - the foreground colorvoid setForeground(IColor color)
color - the background colorvoid setGradientColor(IColor color)
color - the gardiient color to usevoid setLineWidth(int width)
width - the line widthint getLineWidth()
int getLineDotStyle()
int getLineDashStyle()
int getLineSolidStyle()
void drawTextTruncatedCentred(java.lang.String name,
int _x,
int _y,
int width,
int height,
boolean trans)
name - the string to draw_x - the _x coordinate of the rectangle to draw the string_y - the _y coordinate of the rectangle to draw the stringwidth - the width of the rectangle to draw the stringheight - the height of the rectangle to draw the stringtrans - if true the background will be transparent, otherwise it will be opaque
void drawTextTruncated(java.lang.String name,
int _x,
int _y,
int width,
int height,
boolean trans)
_x - the _x coordinate of the rectangle to draw the string_y - the _y coordinate of the rectangle to draw the stringwidth - the width of the rectangle to draw the stringheight - the height of the rectangle to draw the stringtrans - if true the background will be transparent, otherwise it will be opaque
void drawImage(IImage image,
int _x,
int _y,
int maxWith,
int maxHeight)
image - the image to draw_x - the x coordinate in the destination to copy to_y - the y coordinate in the destination to copy tomaxWith - the width in pixels of the destination rectanglemaxHeight - the height in pixels of the destination rectangle
void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int endAngle)
x - the x coordinate of the upper-left corner of the arc to be drawny - the y coordinate of the upper-left corner of the arc to be drawnwidth - the width of the arc to be drawnheight - the height of the arc to be drawnstartAngle - the beginning angleendAngle - the ending anglevoid setFont(IFont font)
font - the font to useint getFontHeight(IFont font)
font -
int getFontWidth(IFont font)
font -
IColor createColor(int r,
int g,
int b)
r - the red componentg - the green componentb - the blue component
float getZoom()
void setDrawTextWithFocusStyle(boolean focus)
|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||