Control drawing functions

Starting/stopping

You can draw in a number of different modes.

In the default mode, you draw directly to the control on screen.

startSetPixel - Start drawing on an OWNERDRAW

endSetPixel - Stop drawing

The buffer mode lets you draw off-screen without a control. Use this mode if you want to use these functions to draw to something other than a control and use (getPixel)? to transfer information between the buffer and your target.

(startSetPixelBuffer)?- Start drawing in buffered mode

(endSetPixelBuffer)? - Stop drawing buffered mode. This destroys the buffer.

In SuperSampling mode, you draw at a scaled up resolution off-screen, after ending the result is scaled down and smoothed.

(startSetPixelSS)? - Start drawing in SuperSampling mode

(endSetPixelSS)? - Stop drawing SuperSampling mode

Meta

(getSetPixelHeight)? - Returns the height of the control canvas or buffer in pixels. Only works between a startSetPixel* and endSetPixel* pair.

(getSetPixelWidth)? - Returns the width of the control canvas or buffer in pixels. Only works between a startSetPixel* and endSetPixel* pair.

Pixels

(getPixel)? - Read single pixel

setPixel - Set single pixel

Text

setFont - lets you choose the font name, its size, angle, boldness, and italics

setText - lets you draw a certain text with the chosen font, color and alignment (Available alignment constants: TA_BASELINE, TA_BOTTOM, TA_TOP, TA_CENTER, TA_LEFT, TA_RIGHT, TA_NOUPDATECP, TA_RTLREADING, TA_UPDATECP, VTA_BASELINE, VTA_CENTER)

(setTextv)? - Identical to setText but with support for formatted text.

Shapes

(setAngleArc)? - Draws the outlines of a pie segment of a circle.

(setAngleArcFill)? - Draws a filled pie segment of a circle.

(setEllipse)? - draws an ellipse

(setEllipseFill)? - draws a filled ellipse

(setEndCaps)? - sets the method used to cap the ends of lines with the constants PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE and PS_ENDCAP_FLAT.

(setFill)? - fills the whole ownerdraw control with a certain color e.g. setFill(getCtlColor(n))

(setInsideFrame)? - determines whether the pen lines of shapes are drawn on the edge or inside the edge.

(setJoin)? - sets the method used to join thick lines at corners of shapes with the constants PS_JOIN_ROUND, PS_JOIN_BEVEL and PS_JOIN_MITER.

setLine - draws a line

(setPenWidth)? - lets you change the broadness of drawn lines.

(setRectFrame)? - draws a rectangle

setRectFill - draws a filled rectangle

setRectGradient - draws a gradient into the rectangle

Anti-aliased shapes

If you only need these shapes or non-anti-aliased shapes, these functions will be both faster and better quality than using SuperSampling mode.

(setThinLineAA)? - Draw anti-aliased line of one pixel width

(setThinEllipseAA)? - draw anti-aliased lines and ellipses