+ bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width,
+ wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc,
+ wxRasterOperationMode logicalFunc = wxCOPY, bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+
+ /**
+ Copy from a source DC to this DC possibly changing the scale.
+
+ Unlike Blit(), this method allows to specify different source and
+ destination region sizes, meaning that it can stretch or shrink it
+ while copying. The same can be achieved by changing the scale of the
+ source or target DC but calling this method is simpler and can also be
+ more efficient if the platform provides a native implementation of it.
+
+ The meaning of its other parameters is the same as with Blit(), in
+ particular all source coordinates are interpreted using the source DC
+ coordinate system, i.e. are affected by its scale, origin translation
+ and axis direction.
+
+ @param xdest
+ Destination device context x position.
+ @param ydest
+ Destination device context y position.
+ @param dstWidth
+ Width of destination area.
+ @param dstHeight
+ Height of destination area.
+ @param source
+ Source device context.
+ @param xsrc
+ Source device context x position.
+ @param ysrc
+ Source device context y position.
+ @param srcWidth
+ Width of source area to be copied.
+ @param srcHeight
+ Height of source area to be copied.
+ @param logicalFunc
+ 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.
+ The Windows implementation does the following if MaskBlt cannot be
+ used:
+ <ol>
+ <li>Creates a temporary bitmap and copies the destination area into
+ it.</li>
+ <li>Copies the source area into the temporary bitmap using the
+ specified logical function.</li>
+ <li>Sets the masked area in the temporary bitmap to BLACK by ANDing
+ the mask bitmap with the temp bitmap with the foreground colour
+ set to WHITE and the bg colour set to BLACK.</li>
+ <li>Sets the unmasked area in the destination area to BLACK by
+ ANDing the mask bitmap with the destination area with the
+ foreground colour set to BLACK and the background colour set to
+ WHITE.</li>
+ <li>ORs the temporary bitmap with the destination area.</li>
+ <li>Deletes the temporary bitmap.</li>
+ </ol>
+ This sequence of operations ensures that the source's transparent
+ area need not be black, and logical functions are supported.
+ @n @b Note: on Windows, blitting with masks can be speeded up
+ considerably by compiling wxWidgets with the wxUSE_DC_CACHEING option
+ enabled. You can also influence whether MaskBlt or the explicit
+ mask blitting code above is used, by using wxSystemOptions and
+ setting the @c no-maskblt option to 1.
+ @param xsrcMask
+ Source x position on the mask. If both xsrcMask and ysrcMask are
+ wxDefaultCoord, @a xsrc and @a ysrc will be assumed for the mask
+ source position. Currently only implemented on Windows.
+ @param ysrcMask
+ Source y position on the mask. If both xsrcMask and ysrcMask are
+ wxDefaultCoord, @a xsrc and @a ysrc will be assumed for the mask
+ source position. Currently only implemented on Windows.
+
+ There is partial support for Blit() in wxPostScriptDC, under X.
+
+ See wxMemoryDC for typical usage.
+
+ @since 2.9.0
+
+ @see Blit(), wxMemoryDC, wxBitmap, wxMask
+ */
+ bool StretchBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord dstWidth, wxCoord dstHeight,
+ wxDC* source, wxCoord xsrc, wxCoord ysrc,
+ wxCoord srcWidth, wxCoord srcHeight,
+ wxRasterOperationMode logicalFunc = wxCOPY,
+ bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord,
+ wxCoord ysrcMask = wxDefaultCoord);
+ //@}
+
+
+ /**
+ @name Background/foreground brush and pen
+ */
+ //@{
+
+ /**
+ Gets the brush used for painting the background.
+
+ @see wxDC::SetBackground()
+ */
+ const wxBrush& GetBackground() const;
+
+ /**
+ Gets the current brush.
+
+ @see wxDC::SetBrush()
+ */
+ const wxBrush& GetBrush() const;
+
+ /**
+ Gets the current pen.
+
+ @see SetPen()
+ */
+ const wxPen& GetPen() const;
+
+ /**
+ Sets the current background brush for the DC.
+ */
+ void SetBackground(const wxBrush& brush);
+
+ /**
+ Sets the current brush for the DC.
+
+ If the argument is ::wxNullBrush (or another invalid brush; see wxBrush::IsOk),
+ the current brush is selected out of the device context (leaving wxDC without
+ any valid brush), allowing the current brush to be destroyed safely.
+
+ @see wxBrush, wxMemoryDC (for the interpretation of colours when
+ drawing into a monochrome bitmap)
+ */
+ void SetBrush(const wxBrush& brush);
+
+ /**
+ Sets the current pen for the DC.
+
+ If the argument is ::wxNullPen (or another invalid pen; see wxPen::IsOk),
+ the current pen is selected out of the device context (leaving wxDC without any
+ valid pen), allowing the current pen to be destroyed safely.
+
+ @see wxMemoryDC for the interpretation of colours when drawing into a
+ monochrome bitmap.
+ */
+ void SetPen(const wxPen& pen);
+