|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CDasherScreen
Defines a screen which Dasher can use to draw graphics primitives.
| Method Summary | |
|---|---|
void |
Blank()
Signals the beginning of a new frame. |
void |
Display()
Signals the end of a frame. |
void |
DrawCircle(int iCX,
int iCY,
int iR,
int iColour,
boolean bFill)
Draw a circle |
void |
DrawRectangle(int x1,
int y1,
int x2,
int y2,
int Color,
int iOutlineColour,
EColorSchemes ColorScheme,
boolean bDrawOutline,
boolean bFill,
int iThickness)
Draw a filled rectangle |
void |
DrawString(java.lang.String string,
int x1,
int y1,
long Size)
Draws a string |
int |
GetHeight()
Gets the height, and hence maximum Y screen co-ordinate. |
int |
GetWidth()
Gets the width, and hence maximum X screen co-ordinate. |
void |
Polygon(CDasherView.Point[] Points,
int Number,
int Color)
Draw a filled polygon - given vertices and color id. |
void |
Polygon(CDasherView.Point[] Points,
int Number,
int Color,
int iWidth)
Draw a filled polygon - given vertices, width and color id. |
void |
Polyline(CDasherView.Point[] Points,
int Number,
int iWidth)
Draws a sequence of lines in a fixed colour, usually black. |
void |
Polyline(CDasherView.Point[] Points,
int Number,
int iWidth,
int Colour)
Draws a sequence of lines. |
void |
SendMarker(int iMarker)
Informs the screen of certain drawing phases. |
void |
SetColourScheme(CCustomColours ColourScheme)
Sets the colour scheme to use |
CDasherView.Point |
TextSize(java.lang.String string,
int Size)
Determines / guesses the size of a given string as drawn on this screen. |
| Method Detail |
|---|
int GetWidth()
int GetHeight()
CDasherView.Point TextSize(java.lang.String string,
int Size)
This is used in determining how much to displace other drawn strings in order to prevent them from overlapping.
This must be carried out by the screen because only the actual drawing surface can know how fonts appear when rendered.
string - String whose size we wish to determineSize - Font size in points
void DrawString(java.lang.String string,
int x1,
int y1,
long Size)
string - String to drawx1 - Top-left hand corner x co-ordinatey1 - Top-left hand corner y co-ordinateSize - Font size in pointsvoid SendMarker(int iMarker)
A '0' will be sent when beginning to draw persistent features (ie. those which should remain the same from frame to frame), and a '1' will be sent prior to drawing ephemeral details which should vanish if not redrawn next frame.
iMarker - Marker number
void DrawRectangle(int x1,
int y1,
int x2,
int y2,
int Color,
int iOutlineColour,
EColorSchemes ColorScheme,
boolean bDrawOutline,
boolean bFill,
int iThickness)
x1 - top left of rectangle (x coordinate)y1 - top left corner of rectangle (y coordinate)x2 - bottom right of rectangle (x coordinate)y2 - bottom right of rectangle (y coordinate)Color - the colour to be used (numeric)ColorScheme - Which colourscheme is to be usedbDrawOutline - Whether to draw an outline or notbFill - Whether to fill or notiThickness - Line thickness for outline
void DrawCircle(int iCX,
int iCY,
int iR,
int iColour,
boolean bFill)
iCX - X co-ordinate of the centreiCY - Y co-ordinate of the centreiR - Radius in pixelsiColour - Colour numberbFill - Fill or outline?
void Polyline(CDasherView.Point[] Points,
int Number,
int iWidth)
Points - Array of Points describing the vertices of the line.Number - Number of pointsiWidth - Line width
void Polyline(CDasherView.Point[] Points,
int Number,
int iWidth,
int Colour)
Points - Array of Points describing the vertices of the line.Number - Number of pointsiWidth - Line widthColour - Colour number
void Polygon(CDasherView.Point[] Points,
int Number,
int Color)
Points - array of points defining the edge of the polygonNumber - number of points in the arrayColor - colour of the polygon (numeric)
void Polygon(CDasherView.Point[] Points,
int Number,
int Color,
int iWidth)
Points - array of points defining the edge of the polygonNumber - number of points in the arrayColor - colour of the polygon (numeric)iWidth - Width of the polygon border to drawvoid Blank()
void Display()
void SetColourScheme(CCustomColours ColourScheme)
ColourScheme - New colour scheme
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||