previous up next     contents index
Next: wxSnip::FindScrollStep Up: wxSnip: wxObject Previous: wxSnip::DoFont

wxSnip::Draw

void Draw (wxDC *dc, float x, float y, float left, float top, float right, float bottom, float dx, float dy, int drawCaret)

Draws the snip into the given drawing context with the snip's top left corner at location (x, y). Override this method in your own snip class.

The parameters left, top, right, and bottom define a clipping region (in drawing context coordinates) that the snip may use to optimize drawing, but it may also ignore these parameters.

dx and dy provide number which may be subtracted from x and y to obtain the snip's position in buffer view coordinates (as opposed to coordinates for this drawing context).

See Caret Ownership (section gif) for information about drawCaret.

Before Draw is called, the correct font, text color, and pen colour will have been set for this snip already (based on the style member). (The same is not true for GetExtent or PartialOffset.)



PLT