Source

wxPython / src / _pseudodc.i

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
/////////////////////////////////////////////////////////////////////////////
// Name:        
// Purpose:     Wraper definitions for the wxPseudoDC Class
// Author:      Paul Lanier 
// Modified by:
// Created:     05/25/06
// RCS-ID:      $Id: _pseudodc.i 58699 2009-02-07 07:14:23Z KO $
// Copyright:   (c) wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////


%{
#include "wx/wxPython/pseudodc.h"
%}

%newgroup;

DocStr(wxPseudoDC,
"A PseudoDC is an object that can be used as if it were a `wx.DC`.  All
commands issued to the PseudoDC are stored in a list.  You can then
play these commands back to a real DC object using the DrawToDC
method.  Commands in the command list are indexed by ID.  You can use
this to clear the operations associated with a single ID and then
re-draw the object associated with that ID.", "");

class wxPseudoDC : public wxObject
{
public:
    DocCtorStr(
        wxPseudoDC(),
        "Constructs a new Pseudo device context for recording dc operations","");
    DocDeclStr(
        void , BeginDrawing(),
        "Allows for optimization of drawing code on platforms that need it.  On
other platforms this is just an empty function and is harmless.  To
take advantage of this postential optimization simply enclose each
group of calls to the drawing primitives within calls to
`BeginDrawing` and `EndDrawing`.", "");
    
    DocDeclStr(
        void , EndDrawing(),
        "Ends the group of drawing primitives started with `BeginDrawing`, and
invokes whatever optimization is available for this DC type on the
current platform.", "");
    DocCtorStr(
        ~wxPseudoDC(),
        "Frees memory used by the operation list of the pseudo dc","");
    DocDeclStr(
        void, RemoveAll(),
        "Removes all objects and operations from the recorded list.", "");
    DocDeclStr(
        int, GetLen(),
        "Returns the number of operations in the recorded list.", "");
    DocDeclStr(
        void, SetId(int id),
        "Sets the id to be associated with subsequent operations.", "");
    DocDeclStr(
        void, ClearId(int id),
        "Removes all operations associated with id so the object can be redrawn.", "");
    DocDeclStr(
        void, RemoveId(int id),
        "Remove the object node (and all operations) associated with an id.", "");
    DocDeclStr(
        void, TranslateId(int id, wxCoord dx, wxCoord dy),
        "Translate the operations of id by dx,dy.", "");
    DocDeclStr(
        void, SetIdGreyedOut(int id, bool greyout=true),
        "Set whether an object is drawn greyed out or not.", "");
    DocDeclStr(
        bool, GetIdGreyedOut(int id),
        "Get whether an object is drawn greyed out or not.", "");
    KeepGIL(FindObjects);
    DocDeclStr(
        PyObject*, FindObjects(wxCoord x, wxCoord y, 
                               wxCoord radius=1, const wxColour& bg=*wxWHITE),
        "Returns a list of all the id's that draw a pixel with color
not equal to bg within radius of (x,y).
Returns an empty list if nothing is found.  The list is in
reverse drawing order so list[0] is the top id.","");
    KeepGIL(FindObjectsByBBox);
    DocDeclStr(
        PyObject*, FindObjectsByBBox(wxCoord x, wxCoord y),
        "Returns a list of all the id's whose bounding boxes include (x,y).
Returns an empty list if nothing is found.  The list is in
reverse drawing order so list[0] is the top id.","");
    DocDeclStr(
        void, DrawIdToDC(int id, wxDC *dc),
        "Draw recorded operations of id to dc.", "");
    DocDeclStr(
        void, SetIdBounds(int id, wxRect& rect),
        "Set the bounding rect of a given object.  This will create 
an object node if one doesn't exist.", "");
    %extend {
        DocStr(
            GetIdBounds,
            "Returns the bounding rectangle previouly set with SetIdBounds.  If
no bounds have been set, it returns wx.Rect(0,0,0,0).", "");
        wxRect GetIdBounds(int id) {
            wxRect rect;
            self->GetIdBounds(id, rect);
            return rect;
        }
    }
    DocDeclStr(
        void, DrawToDCClipped(wxDC *dc, const wxRect& rect),
        "Draws the recorded operations to dc unless the operation is known to
be outside rect.", "");
    DocDeclStr(
        void, DrawToDCClippedRgn(wxDC *dc, const wxRegion& region),
        "Draws the recorded operations to dc unless the operation is known to
be outside rect.", "");
    DocDeclStr(
        void, DrawToDC(wxDC *dc),
        "Draws the recorded operations to dc.", "");
    
    //-------------------------------------------------------------------------
    // Methods Mirrored from wxDC
    //-------------------------------------------------------------------------
//
//    DocDeclStr(
//        void , SetFont(const wxFont& font),
//        "Sets the current font for the DC. It must be a valid font, in
//particular you should not pass ``wx.NullFont`` to this method.","
//
//:see: `wx.Font`");
//    
//    DocDeclStr(
//        void , SetPen(const wxPen& pen),
//        "Sets the current pen for the DC.
//
//If the argument is ``wx.NullPen``, the current pen is selected out of the
//device context, and the original pen restored.", "
//
//:see: `wx.Pen`");
//    
//    DocDeclStr(
//        void , SetBrush(const wxBrush& brush),
//        "Sets the current brush for the DC.
//
//If the argument is ``wx.NullBrush``, the current brush is selected out
//of the device context, and the original brush restored, allowing the
//current brush to be destroyed safely.","
//
//:see: `wx.Brush`");
//    
//    DocDeclStr(
//        void , SetBackground(const wxBrush& brush),
//        "Sets the current background brush for the DC.", "");
//    
//    DocDeclStr(
//        void , SetBackgroundMode(int mode),
//        "*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
//determines whether text will be drawn with a background colour or
//not.", "");
//    
//    DocDeclStr(
//        void , SetTextForeground(const wxColour& colour),
//        "Sets the current text foreground colour for the DC.", "");
//    
//    DocDeclStr(
//        void , SetTextBackground(const wxColour& colour),
//        "Sets the current text background colour for the DC.", "");
//    DocDeclStr(
//        void , DrawLabel(const wxString& text, const wxRect& rect,
//                         int alignment = wxALIGN_LEFT | wxALIGN_TOP,
//                         int indexAccel = -1),
//        "Draw *text* within the specified rectangle, abiding by the alignment
//flags.  Will additionally emphasize the character at *indexAccel* if
//it is not -1.", "
//
//:see: `DrawImageLabel`");
//    DocStr(
//        DrawText,
//        "Draws a text string at the specified point, using the current text
//font, and the current text foreground and background colours.
//
//The coordinates refer to the top-left corner of the rectangle bounding
//the string. See `GetTextExtent` for how to get the dimensions of a
//text string, which can be used to position the text more precisely.
//
//**NOTE**: under wxGTK the current logical function is used by this
//function but it is ignored by wxMSW. Thus, you should avoid using
//logical functions with this function in portable programs.", "
//
//:see: `DrawRotatedText`");
//    void DrawText(const wxString& text, wxCoord x, wxCoord y);
//    DocStr(
//        DrawLine,
//        "Draws a line from the first point to the second. The current pen is
//used for drawing the line. Note that the second point is *not* part of
//the line and is not drawn by this function (this is consistent with
//the behaviour of many other toolkits).", "");
//    void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
//    DocDeclStr(
//        void, DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height),
//        "Draws a rectangle with the given top left corner, and with the given
//size. The current pen is used for the outline and the current brush
//for filling the shape.", "");
//    DocDeclStr(
//        void , Clear(),
//        "Clears the device context using the current background brush.", "");

    DocStr(
        FloodFill,
        "Flood fills the device context starting from the given point, using
the current brush colour, and using a style:

    - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
      the given colour is encountered.

    - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
      colour.

Returns False if the operation failed.

Note: The present implementation for non-Windows platforms may fail to
find colour borders if the pixels do not match the colour
exactly. However the function will still return true.", "");
    void FloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE);
    %Rename(FloodFillPoint, void, FloodFill(const wxPoint& pt, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE));

    
    DocStr(
        DrawLine,
        "Draws a line from the first point to the second. The current pen is
used for drawing the line. Note that the second point is *not* part of
the line and is not drawn by this function (this is consistent with
the behaviour of many other toolkits).", "");
    void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
    %Rename(DrawLinePoint, void, DrawLine(const wxPoint& pt1, const wxPoint& pt2));


    DocStr(
        CrossHair,
        "Displays a cross hair using the current pen. This is a vertical and
horizontal line the height and width of the window, centred on the
given point.", "");
    void CrossHair(wxCoord x, wxCoord y);
    %Rename(CrossHairPoint, void, CrossHair(const wxPoint& pt));


    DocStr(
        DrawArc,
        "Draws an arc of a circle, centred on the *center* point (xc, yc), from
the first point to the second. The current pen is used for the outline
and the current brush for filling the shape.

The arc is drawn in an anticlockwise direction from the start point to
the end point.", "");
    void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc);
    %Rename(DrawArcPoint, void, DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& center));


    DocStr(
        DrawCheckMark,
        "Draws a check mark inside the given rectangle.", "");
    void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
    %Rename(DrawCheckMarkRect, void, DrawCheckMark(const wxRect& rect));

    DocStr(
        DrawEllipticArc,
        "Draws an arc of an ellipse, with the given rectangle defining the
bounds of the ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie.

The *start* and *end* parameters specify the start and end of the arc
relative to the three-o'clock position from the center of the
rectangle. Angles are specified in degrees (360 is a complete
circle). Positive values mean counter-clockwise motion. If start is
equal to end, a complete ellipse will be drawn.", "");
    void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double start, double end);
    %Rename(DrawEllipticArcPointSize, void, DrawEllipticArc(const wxPoint& pt, const wxSize& sz, double start, double end));


    DocStr(
        DrawPoint,
        "Draws a point using the current pen.", "");
    void DrawPoint(wxCoord x, wxCoord y);
    %Rename(DrawPointPoint, void, DrawPoint(const wxPoint& pt));


    DocStr(
        DrawRectangle,
        "Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.", "");
    void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
    %Rename(DrawRectangleRect,void, DrawRectangle(const wxRect& rect));
    %Rename(DrawRectanglePointSize, void, DrawRectangle(const wxPoint& pt, const wxSize& sz));


    DocStr(
        DrawRoundedRectangle,
        "Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.

If radius is positive, the value is assumed to be the radius of the
rounded corner. If radius is negative, the absolute value is assumed
to be the proportion of the smallest dimension of the rectangle. This
means that the corner can be a sensible size relative to the size of
the rectangle, and also avoids the strange effects X produces when the
corners are too big for the rectangle.", "");
    void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius);
    %Rename(DrawRoundedRectangleRect, void, DrawRoundedRectangle(const wxRect& r, double radius));
    %Rename(DrawRoundedRectanglePointSize, void, DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, double radius));


    DocStr(
        DrawCircle,
        "Draws a circle with the given center point and radius.  The current
pen is used for the outline and the current brush for filling the
shape.", "

:see: `DrawEllipse`");
    void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
    %Rename(DrawCirclePoint, void, DrawCircle(const wxPoint& pt, wxCoord radius));


    DocStr(
        DrawEllipse,
        "Draws an ellipse contained in the specified rectangle. The current pen
is used for the outline and the current brush for filling the shape.", "

:see: `DrawCircle`");
    void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
    %Rename(DrawEllipseRect, void, DrawEllipse(const wxRect& rect));
    %Rename(DrawEllipsePointSize, void, DrawEllipse(const wxPoint& pt, const wxSize& sz));


    DocStr(
        DrawIcon,
        "Draw an icon on the display (does nothing if the device context is
PostScript). This can be the simplest way of drawing bitmaps on a
window.", "");
    void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
    %Rename(DrawIconPoint, void, DrawIcon(const wxIcon& icon, const wxPoint& pt));


    DocStr(
        DrawBitmap,
        "Draw a bitmap on the device context at the specified point. If
*transparent* is true and the bitmap has a transparency mask, (or
alpha channel on the platforms that support it) then the bitmap will
be drawn transparently.", "

When drawing a mono-bitmap, the current text foreground colour will be
used to draw the foreground of the bitmap (all bits set to 1), and the
current text background colour to draw the background (all bits set to
0).

:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
    void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false);
    %Rename(DrawBitmapPoint, void, DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false));


    DocStr(
        DrawText,
        "Draws a text string at the specified point, using the current text
font, and the current text foreground and background colours.

The coordinates refer to the top-left corner of the rectangle bounding
the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
a text string, which can be used to position the text more precisely,
(you will need to use a real DC with GetTextExtent as wx.PseudoDC does
not implement it.)

**NOTE**: under wxGTK the current logical function is used by this
function but it is ignored by wxMSW. Thus, you should avoid using
logical functions with this function in portable programs.", "

:see: `DrawRotatedText`");
    void DrawText(const wxString& text, wxCoord x, wxCoord y);
    %Rename(DrawTextPoint, void, DrawText(const wxString& text, const wxPoint& pt));


    DocStr(
        DrawRotatedText,
        "Draws the text rotated by *angle* degrees, if supported by the platform.

**NOTE**: Under Win9x only TrueType fonts can be drawn by this
function. In particular, a font different from ``wx.NORMAL_FONT``
should be used as the it is not normally a TrueType
font. ``wx.SWISS_FONT`` is an example of a font which is.","

:see: `DrawText`");
    void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
    %Rename(DrawRotatedTextPoint, void, DrawRotatedText(const wxString& text, const wxPoint& pt, double angle));


//    DocDeclStr(
//        bool , Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
//                    wxDC *source, wxCoord xsrc, wxCoord ysrc,
//                    int rop = wxCOPY, bool useMask = false,
//                    wxCoord xsrcMask = -1, wxCoord ysrcMask = -1),
//        "Copy from a source DC to this DC.  Parameters specify the destination
//coordinates, size of area to copy, source DC, source coordinates,
//logical function, whether to use a bitmap mask, and mask source
//position.", "
//
//    :param xdest:       Destination device context x position.
//    :param ydest:       Destination device context y position.
//    :param width:       Width of source area to be copied.
//    :param height:      Height of source area to be copied.
//    :param source:      Source device context.
//    :param xsrc:        Source device context x position.
//    :param ysrc:        Source device context y position.
//    :param rop:         Logical function to use: see `SetLogicalFunction`.
//    :param useMask:     If true, Blit does a transparent blit using the mask
//                        that is associated with the bitmap selected into the
//                        source device context.
//    :param xsrcMask:    Source x position on the mask. If both xsrcMask and
//                        ysrcMask are -1, xsrc and ysrc will be assumed for
//                        the mask source position.
//    :param ysrcMask:    Source y position on the mask. 
//");
    
//    DocDeclStrName(
//        bool , Blit(const wxPoint& destPt, const wxSize& sz,
//                    wxDC *source, const wxPoint& srcPt,
//                    int rop = wxCOPY, bool useMask = false,
//                    const wxPoint& srcPtMask = wxDefaultPosition),
//        "Copy from a source DC to this DC.  Parameters specify the destination
//coordinates, size of area to copy, source DC, source coordinates,
//logical function, whether to use a bitmap mask, and mask source
//position.", "
//
//    :param destPt:      Destination device context position.
//    :param sz:          Size of source area to be copied.
//    :param source:      Source device context.
//    :param srcPt:       Source device context position.
//    :param rop:         Logical function to use: see `SetLogicalFunction`.
//    :param useMask:     If true, Blit does a transparent blit using the mask
//                        that is associated with the bitmap selected into the
//                        source device context.
//    :param srcPtMask:   Source position on the mask. 
//",
//        BlitPointSize);
    

    DocDeclAStr(
        void , DrawLines(int points, wxPoint* points_array,
                         wxCoord xoffset = 0, wxCoord yoffset = 0),
        "DrawLines(self, List points, int xoffset=0, int yoffset=0)",
        "Draws lines using a sequence of `wx.Point` objects, adding the
optional offset coordinate. The current pen is used for drawing the
lines.", "");
    

    DocDeclAStr(
        void , DrawPolygon(int points, wxPoint* points_array,
                     wxCoord xoffset = 0, wxCoord yoffset = 0,
                           wxPolygonFillMode fillStyle = wxODDEVEN_RULE),
        "DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
    wxPolygonFillMode fillStyle=ODDEVEN_RULE)",
        "Draws a filled polygon using a sequence of `wx.Point` objects, adding
the optional offset coordinate.  The last argument specifies the fill
rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.

The current pen is used for drawing the outline, and the current brush
for filling the shape. Using a transparent brush suppresses
filling. Note that wxWidgets automatically closes the first and last
points.", "");
    

    // TODO:  Figure out a good typemap for this...
    //        Convert the first 3 args from a sequence of sequences?
//     void DrawPolyPolygon(int n, int count[], wxPoint points[],
//                           wxCoord xoffset = 0, wxCoord yoffset = 0,
//                           int fillStyle = wxODDEVEN_RULE);

    
    DocDeclStr(
        void , DrawLabel(const wxString& text, const wxRect& rect,
                         int alignment = wxALIGN_LEFT | wxALIGN_TOP,
                         int indexAccel = -1),
        "Draw *text* within the specified rectangle, abiding by the alignment
flags.  Will additionally emphasize the character at *indexAccel* if
it is not -1.", "

:see: `DrawImageLabel`");

    DocDeclStrName(
        void, DrawLabel(const wxString& text,
                              const wxBitmap& image,
                              const wxRect& rect,
                              int alignment = wxALIGN_LEFT | wxALIGN_TOP,
                              int indexAccel = -1),
       "Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
drawing it) within the specified rectangle, abiding by the alignment
flags.  Will additionally emphasize the character at *indexAccel* if
it is not -1.", "", DrawImageLabel);

    
    DocDeclAStr(
        void , DrawSpline(int points, wxPoint* points_array),
        "DrawSpline(self, List points)",
        "Draws a spline between all given control points, (a list of `wx.Point`
objects) using the current pen. The spline is drawn using a series of
lines, using an algorithm taken from the X drawing program 'XFIG'.", "");


    DocDeclStr(
        virtual void , Clear(),
        "Clears the device context using the current background brush.", "");
    

    // set objects to use for drawing
    // ------------------------------

    DocDeclStr(
        virtual void , SetFont(const wxFont& font),
        "Sets the current font for the DC. It must be a valid font, in
particular you should not pass ``wx.NullFont`` to this method.","

:see: `wx.Font`");
    
    DocDeclStr(
        virtual void , SetPen(const wxPen& pen),
        "Sets the current pen for the DC.

If the argument is ``wx.NullPen``, the current pen is selected out of the
device context, and the original pen restored.", "

:see: `wx.Pen`");
    
    DocDeclStr(
        virtual void , SetBrush(const wxBrush& brush),
        "Sets the current brush for the DC.

If the argument is ``wx.NullBrush``, the current brush is selected out
of the device context, and the original brush restored, allowing the
current brush to be destroyed safely.","

:see: `wx.Brush`");
    
    DocDeclStr(
        virtual void , SetBackground(const wxBrush& brush),
        "Sets the current background brush for the DC.", "");
    
    DocDeclStr(
        virtual void , SetBackgroundMode(int mode),
        "*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
determines whether text will be drawn with a background colour or
not.", "");
    
    DocDeclStr(
        virtual void , SetPalette(const wxPalette& palette),
        "If this is a window DC or memory DC, assigns the given palette to the
window or bitmap associated with the DC. If the argument is
``wx.NullPalette``, the current palette is selected out of the device
context, and the original palette restored.", "

:see: `wx.Palette`");
    

    DocDeclStr(
        virtual void , SetTextForeground(const wxColour& colour),
        "Sets the current text foreground colour for the DC.", "");
    
    DocDeclStr(
        virtual void , SetTextBackground(const wxColour& colour),
        "Sets the current text background colour for the DC.", "");
    
    DocDeclStr(
        virtual void , SetLogicalFunction(wxRasterOperationMode function),
        "Sets the current logical function for the device context. This
determines how a source pixel (from a pen or brush colour, combines
with a destination pixel in the current device context.

The possible values and their meaning in terms of source and
destination pixel values are as follows:

    ================       ==========================
    wx.AND                 src AND dst
    wx.AND_INVERT          (NOT src) AND dst
    wx.AND_REVERSE         src AND (NOT dst)
    wx.CLEAR               0
    wx.COPY                src
    wx.EQUIV               (NOT src) XOR dst
    wx.INVERT              NOT dst
    wx.NAND                (NOT src) OR (NOT dst)
    wx.NOR                 (NOT src) AND (NOT dst)
    wx.NO_OP               dst
    wx.OR                  src OR dst
    wx.OR_INVERT           (NOT src) OR dst
    wx.OR_REVERSE          src OR (NOT dst)
    wx.SET                 1
    wx.SRC_INVERT          NOT src
    wx.XOR                 src XOR dst
    ================       ==========================

The default is wx.COPY, which simply draws with the current
colour. The others combine the current colour and the background using
a logical operation. wx.INVERT is commonly used for drawing rubber
bands or moving outlines, since drawing twice reverts to the original
colour.
", "");

    
    %property(IdBounds, GetIdBounds, SetIdBounds, doc="See `GetIdBounds` and `SetIdBounds`");
    %property(Len, GetLen, doc="See `GetLen`");
};