|
Public Member Functions |
| | CDrawContext (CFrame *pFrame, void *pSystemContext, void *pWindow=0) |
| virtual | ~CDrawContext () |
| void | moveTo (const CPoint &point) |
| | move line position to point
|
| void | lineTo (const CPoint &point) |
| | draw a line from current position to point
|
| void | drawLines (const CPoint *points, const long &numberOfLines) |
| | draw multiple lines at once
|
| void | drawPolygon (const CPoint *pPoints, long numberOfPoints, const CDrawStyle drawStyle=kDrawStroked) |
| | draw a polygon
|
| void | polyLine (const CPoint *pPoint, long numberOfPoints) |
| | draw a stroked polygon
|
| void | fillPolygon (const CPoint *pPoint, long numberOfPoints) |
| | draw a filled polygon
|
| void | drawRect (const CRect &rect, const CDrawStyle drawStyle=kDrawStroked) |
| | draw a stroked rect
|
| void | fillRect (const CRect &rect) |
| | draw a filled rect
|
| void | drawArc (const CRect &rect, const float startAngle1, const float endAngle2, const CDrawStyle drawStyle=kDrawStroked) |
| | draw a stroked arc, where the angles are in degree
|
| void | drawArc (const CRect &rect, const CPoint &point1, const CPoint &point2) |
| | draw a stroked arc between point1 and point2
|
| void | fillArc (const CRect &rect, const CPoint &point1, const CPoint &point2) |
| | draw a filled arc between point1 and point2
|
| void | drawEllipse (const CRect &rect, const CDrawStyle drawStyle=kDrawStroked) |
| | draw an ellipse
|
| void | fillEllipse (const CRect &rect) |
| | draw a filled ellipse
|
| void | drawPoint (const CPoint &point, CColor color) |
| | draw a point
|
| CColor | getPoint (const CPoint &point) |
| void | floodFill (const CPoint &start) |
| void | setLineStyle (CLineStyle style) |
| | set the current line style
|
| CLineStyle | getLineStyle () const |
| | get the current line style
|
| void | setLineWidth (CCoord width) |
| | set the current line width
|
| CCoord | getLineWidth () const |
| | get the current line width
|
| void | setDrawMode (CDrawMode mode) |
| | set the current draw mode, see CDrawMode
|
| CDrawMode | getDrawMode () const |
| | get the current draw mode, see CDrawMode
|
| void | setClipRect (const CRect &clip) |
| | set the current clip
|
| CRect & | getClipRect (CRect &clip) const |
| | get the current clip
|
| void | resetClipRect () |
| | reset the clip to the default state
|
| void | setFillColor (const CColor color) |
| | set current fill color
|
| CColor | getFillColor () const |
| | get current fill color
|
| void | setFrameColor (const CColor color) |
| | set current stroke color
|
| CColor | getFrameColor () const |
| | get current stroke color
|
| void | setFontColor (const CColor color) |
| | set current font color
|
| CColor | getFontColor () const |
| | get current font color
|
| void | setFont (CFont fontID, const long size=0, long style=0) |
| | set current font
|
| CFont | getFont () const |
| | get current font
|
| long | getFontSize () const |
| | get current font size
|
| CCoord | getStringWidth (const char *pStr) |
| | get the width of a string
|
| void | drawString (const char *pString, const CRect &rect, const short opaque=false, const CHoriTxtAlign hAlign=kCenterText) |
| | draw a string
|
| long | getMouseButtons () |
| | get current mouse buttons
|
| void | getMouseLocation (CPoint &point) |
| | get current mouse location. should not be used, see CView::getMouseLocation
|
| bool | waitDoubleClick () |
| | check if another mouse click occurs in the near future
|
| bool | waitDrag () |
| | check if the mouse will be dragged
|
| void * | getWindow () |
| void | setWindow (void *ptr) |
| void | getLoc (CPoint &where) const |
| CFrame * | getFrame () const |
| void * | getSystemContext () const |
| virtual void | forget () |
Public Attributes |
| CPoint | offsetScreen |
| CPoint | offset |
Protected Attributes |
| void * | pSystemContext |
| void * | pWindow |
| CFrame * | pFrame |
| long | fontSize |
| long | fontStyle |
| CFont | fontId |
| CColor | fontColor |
| CPoint | penLoc |
| CCoord | frameWidth |
| CColor | frameColor |
| CColor | fillColor |
| CLineStyle | lineStyle |
| CDrawMode | drawMode |
| CRect | clipRect |
Friends |
| class | CBitmap |
| class | COffscreenContext |