]>
git.saurik.com Git - wxWidgets.git/blob - src/dfb/dc.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/dfb/dc.cpp
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2006 REA Elektronik GmbH
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ===========================================================================
13 // ===========================================================================
15 // ---------------------------------------------------------------------------
17 // ---------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
31 #include "wx/dfb/private.h"
33 // ===========================================================================
35 // ===========================================================================
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxDCBase
)
43 // Default constructor
49 wxDC::wxDC(const wxIDirectFBSurfacePtr
& surface
)
54 void wxDC::Init(const wxIDirectFBSurfacePtr
& surface
)
56 m_ok
= (surface
!= NULL
);
57 wxCHECK_RET( surface
!= NULL
, _T("invalid surface") );
61 m_mm_to_pix_x
= (double)wxGetDisplaySize().GetWidth() /
62 (double)wxGetDisplaySizeMM().GetWidth();
63 m_mm_to_pix_y
= (double)wxGetDisplaySize().GetHeight() /
64 (double)wxGetDisplaySizeMM().GetHeight();
66 SetFont(*wxNORMAL_FONT
);
68 SetBrush(*wxWHITE_BRUSH
);
72 // ---------------------------------------------------------------------------
74 // ---------------------------------------------------------------------------
77 #define DO_SET_CLIPPING_BOX(rg) \
79 wxRect rect = rg.GetBox(); \
80 m_clipX1 = (wxCoord) XDEV2LOG(rect.GetLeft()); \
81 m_clipY1 = (wxCoord) YDEV2LOG(rect.GetTop()); \
82 m_clipX2 = (wxCoord) XDEV2LOG(rect.GetRight()); \
83 m_clipY2 = (wxCoord) YDEV2LOG(rect.GetBottom()); \
86 void wxDC::DoSetClippingRegion(wxCoord cx
, wxCoord cy
, wxCoord cw
, wxCoord ch
)
88 wxCHECK_RET( Ok(), wxT("invalid dc") );
93 r
.x2
= r
.x1
+ XLOG2DEVREL(cw
) - 1;
94 r
.y2
= r
.y1
+ XLOG2DEVREL(ch
) - 1;
96 if ( !m_surface
->SetClip(&r
) )
101 m_clipX2
= cx
+ cw
- 1;
102 m_clipY2
= cy
+ ch
-1;
106 void wxDC::DoSetClippingRegionAsRegion(const wxRegion
& region
)
108 // NB: this can be done because wxDFB only supports
109 // rectangular regions
110 SetClippingRegion(region
.AsRect());
113 void wxDC::DestroyClippingRegion()
115 wxCHECK_RET( Ok(), wxT("invalid dc") );
117 m_surface
->SetClip(NULL
);
122 // ---------------------------------------------------------------------------
123 // query capabilities
124 // ---------------------------------------------------------------------------
126 int wxDC::GetDepth() const
128 return wxDfbGetSurfaceDepth(m_surface
);
131 // ---------------------------------------------------------------------------
133 // ---------------------------------------------------------------------------
137 wxCHECK_RET( Ok(), wxT("invalid dc") );
139 if ( m_backgroundBrush
.GetStyle() == wxTRANSPARENT
)
142 wxColour clr
= m_backgroundBrush
.GetColour();
143 m_surface
->Clear(clr
.Red(), clr
.Green(), clr
.Blue(), clr
.Alpha());
146 extern bool wxDoFloodFill(wxDC
*dc
, wxCoord x
, wxCoord y
,
147 const wxColour
& col
, int style
);
149 bool wxDC::DoFloodFill(wxCoord x
, wxCoord y
,
150 const wxColour
& col
, int style
)
152 return wxDoFloodFill(this, x
, y
, col
, style
);
155 bool wxDC::DoGetPixel(wxCoord x
, wxCoord y
, wxColour
*col
) const
157 wxCHECK_MSG( col
, false, _T("NULL colour parameter in wxDC::GetPixel"));
159 wxFAIL_MSG( _T("GetPixel not implemented") );
163 void wxDC::DoCrossHair(wxCoord x
, wxCoord y
)
165 wxCHECK_RET( Ok(), wxT("invalid dc") );
167 wxFAIL_MSG( _T("CrossHair not implemented") );
170 void wxDC::DoDrawLine(wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
)
172 wxCHECK_RET( Ok(), wxT("invalid dc") );
174 if ( m_pen
.GetStyle() == wxTRANSPARENT
)
177 m_surface
->DrawLine(XLOG2DEV(x1
), YLOG2DEV(y1
),
178 XLOG2DEV(x2
), YLOG2DEV(y2
));
180 CalcBoundingBox(x1
, y1
);
181 CalcBoundingBox(x2
, y2
);
184 // Draws an arc of a circle, centred on (xc, yc), with starting point (x1, y1)
185 // and ending at (x2, y2)
186 void wxDC::DoDrawArc(wxCoord x1
, wxCoord y1
,
187 wxCoord x2
, wxCoord y2
,
188 wxCoord xc
, wxCoord yc
)
190 wxCHECK_RET( Ok(), wxT("invalid dc") );
192 wxFAIL_MSG( _T("DrawArc not implemented") );
195 void wxDC::DoDrawPoint(wxCoord x
, wxCoord y
)
197 wxCHECK_RET( Ok(), wxT("invalid dc") );
199 wxFAIL_MSG( _T("DrawPoint not implemented") );
202 void wxDC::DoDrawPolygon(int n
, wxPoint points
[], wxCoord xoffset
, wxCoord yoffset
,int WXUNUSED(fillStyle
))
204 wxCHECK_RET( Ok(), wxT("invalid dc") );
206 wxFAIL_MSG( _T("DrawPolygon not implemented") );
209 void wxDC::DoDrawLines(int n
, wxPoint points
[], wxCoord xoffset
, wxCoord yoffset
)
211 wxCHECK_RET( Ok(), wxT("invalid dc") );
213 // TODO: impl. using DirectDB's DrawLines
214 wxFAIL_MSG( _T("DrawLines not implemented") );
217 void wxDC::DoDrawRectangle(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
219 wxCHECK_RET( Ok(), wxT("invalid dc") );
221 wxCoord xx
= XLOG2DEV(x
);
222 wxCoord yy
= YLOG2DEV(y
);
223 wxCoord ww
= m_signX
* XLOG2DEVREL(width
);
224 wxCoord hh
= m_signY
* YLOG2DEVREL(height
);
226 if ( ww
== 0 || hh
== 0 ) return;
239 if ( m_brush
.GetStyle() != wxTRANSPARENT
)
241 SelectColour(m_brush
.GetColour());
242 m_surface
->FillRectangle(xx
, yy
, ww
, hh
);
243 // restore pen's colour
244 SelectColour(m_pen
.GetColour());
247 if ( m_pen
.GetStyle() != wxTRANSPARENT
)
249 m_surface
->DrawRectangle(xx
, yy
, ww
, hh
);
252 CalcBoundingBox(x
, y
);
253 CalcBoundingBox(x
+ width
, y
+ height
);
256 void wxDC::DoDrawRoundedRectangle(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
, double radius
)
258 wxCHECK_RET( Ok(), wxT("invalid dc") );
260 wxFAIL_MSG( _T("DrawRoundedRectangle not implemented") );
263 void wxDC::DoDrawEllipse(wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
)
265 wxCHECK_RET( Ok(), wxT("invalid dc") );
267 wxFAIL_MSG( _T("DrawElipse not implemented") );
270 void wxDC::DoDrawEllipticArc(wxCoord x
,wxCoord y
,wxCoord w
,wxCoord h
,double sa
,double ea
)
272 wxCHECK_RET( Ok(), wxT("invalid dc") );
274 wxFAIL_MSG( _T("DrawElipticArc not implemented") );
277 void wxDC::DoDrawText(const wxString
& text
, wxCoord x
, wxCoord y
)
279 wxCHECK_RET( Ok(), wxT("invalid dc") );
281 wxCoord xx
= XLOG2DEV(x
);
282 wxCoord yy
= XLOG2DEV(y
);
284 // update the bounding box
286 CalcBoundingBox(x
, y
);
287 GetTextExtent(text
, &w
, &h
);
288 CalcBoundingBox(x
+ w
, y
+ h
);
290 // if background mode is solid, DrawText must paint text's background:
291 if ( m_backgroundMode
== wxSOLID
)
293 wxCHECK_RET( m_backgroundBrush
.Ok(), wxT("invalid background brush") );
295 SelectColour(m_backgroundBrush
.GetColour());
296 m_surface
->FillRectangle(xx
, yy
, XLOG2DEVREL(w
), YLOG2DEVREL(h
));
297 // restore pen's colour
298 SelectColour(m_pen
.GetColour());
301 // finally draw the text itself:
302 m_surface
->DrawString(wxSTR_TO_DFB(text
), -1, xx
, yy
, DSTF_LEFT
| DSTF_TOP
);
305 void wxDC::DoDrawRotatedText(const wxString
& text
,
306 wxCoord x
, wxCoord y
,
309 wxCHECK_RET( Ok(), wxT("invalid dc") );
311 wxFAIL_MSG( _T("DrawRotatedText not implemented") );
314 // ---------------------------------------------------------------------------
316 // ---------------------------------------------------------------------------
318 void wxDC::SetPen(const wxPen
& pen
)
320 if ( !pen
.Ok() ) return;
323 SelectColour(m_pen
.GetColour());
326 void wxDC::SetBrush(const wxBrush
& brush
)
328 if ( !brush
.Ok() ) return;
332 void wxDC::SelectColour(const wxColour
& clr
)
334 m_surface
->SetColor(clr
.Red(), clr
.Green(), clr
.Blue(), clr
.Alpha());
335 #warning "use SetColorIndex?"
339 void wxDC::SetPalette(const wxPalette
& WXUNUSED(palette
))
341 wxCHECK_RET( Ok(), wxT("invalid dc") );
343 wxFAIL_MSG( _T("SetPalette not implemented") );
345 #endif // wxUSE_PALETTE
347 void wxDC::SetFont(const wxFont
& font
)
349 wxCHECK_RET( Ok(), wxT("invalid dc") );
354 if ( !m_surface
->SetFont(font
.GetDirectFBFont()) )
360 void wxDC::SetBackground(const wxBrush
& brush
)
362 wxCHECK_RET( Ok(), wxT("invalid dc") );
364 if (!brush
.Ok()) return;
366 m_backgroundBrush
= brush
;
369 void wxDC::SetBackgroundMode(int mode
)
371 m_backgroundMode
= mode
;
374 void wxDC::SetLogicalFunction(int function
)
376 wxCHECK_RET( Ok(), wxT("invalid dc") );
378 wxFAIL_MSG( _T("SetLogicalFunction not implemented") );
380 m_logicalFunction
= function
;
383 bool wxDC::StartDoc(const wxString
& WXUNUSED(message
))
385 // We might be previewing, so return true to let it continue.
393 void wxDC::StartPage()
401 // ---------------------------------------------------------------------------
403 // ---------------------------------------------------------------------------
405 wxCoord
wxDC::GetCharHeight() const
407 wxCHECK_MSG( Ok(), -1, wxT("invalid dc") );
408 wxCHECK_MSG( m_font
.Ok(), -1, wxT("no font selected") );
411 m_font
.GetDirectFBFont()->GetHeight(&h
);
412 return YDEV2LOGREL(h
);
415 wxCoord
wxDC::GetCharWidth() const
417 wxCHECK_MSG( Ok(), -1, wxT("invalid dc") );
418 wxCHECK_MSG( m_font
.Ok(), -1, wxT("no font selected") );
421 m_font
.GetDirectFBFont()->GetStringWidth("H", 1, &w
);
422 // VS: YDEV is corrent, it should *not* be XDEV, because font's are only
423 // scaled according to m_scaleY
424 return YDEV2LOGREL(w
);
427 void wxDC::DoGetTextExtent(const wxString
& string
, wxCoord
*x
, wxCoord
*y
,
428 wxCoord
*descent
, wxCoord
*externalLeading
,
429 wxFont
*theFont
) const
431 wxCHECK_RET( Ok(), wxT("invalid dc") );
432 wxCHECK_RET( m_font
.Ok(), wxT("no font selected") );
433 wxCHECK_RET( !theFont
|| theFont
->Ok(), wxT("invalid font") );
436 if ( theFont
!= NULL
)
439 wxConstCast(this, wxDC
)->SetFont(*theFont
);
442 wxCoord xx
= 0, yy
= 0;
444 wxIDirectFBFontPtr f
= m_font
.GetDirectFBFont();
446 if ( f
->GetStringExtents(wxSTR_TO_DFB(string
), -1, &rect
, NULL
) )
448 // VS: YDEV is corrent, it should *not* be XDEV, because font's are
449 // only scaled according to m_scaleY
450 xx
= YDEV2LOGREL(rect
.w
);
451 yy
= YDEV2LOGREL(rect
.h
);
456 if ( f
->GetDescender(&d
) )
457 *descent
= YDEV2LOGREL(-d
);
465 if ( externalLeading
) *externalLeading
= 0;
467 if ( theFont
!= NULL
)
468 wxConstCast(this, wxDC
)->SetFont(oldFont
);
473 // ---------------------------------------------------------------------------
475 // ---------------------------------------------------------------------------
477 void wxDC::ComputeScaleAndOrigin()
479 m_scaleX
= m_logicalScaleX
* m_userScaleX
;
480 m_scaleY
= m_logicalScaleY
* m_userScaleY
;
482 // FIXME_DFB: scaling affects pixel size of font, pens, brushes, which
483 // is not currently implemented here; probably makes sense to
484 // switch to Cairo instead of implementing everything for DFB
485 wxASSERT_MSG( m_scaleX
== 1.0 && m_scaleY
== 1.0,
486 _T("scaling is not implemented in wxDFB") );
489 void wxDC::SetMapMode(int mode
)
491 #warning "move this to common code, it's shared by almost all ports!"
495 SetLogicalScale(twips2mm
*m_mm_to_pix_x
, twips2mm
*m_mm_to_pix_y
);
498 SetLogicalScale(pt2mm
*m_mm_to_pix_x
, pt2mm
*m_mm_to_pix_y
);
501 SetLogicalScale(m_mm_to_pix_x
, m_mm_to_pix_y
);
504 SetLogicalScale(m_mm_to_pix_x
/10.0, m_mm_to_pix_y
/10.0);
508 SetLogicalScale(1.0, 1.0);
511 m_mappingMode
= mode
;
514 void wxDC::SetUserScale(double x
, double y
)
516 #warning "move this to common code?"
517 // allow negative ? -> no
520 ComputeScaleAndOrigin();
523 void wxDC::SetLogicalScale(double x
, double y
)
525 #warning "move this to common code?"
529 ComputeScaleAndOrigin();
532 void wxDC::SetLogicalOrigin( wxCoord x
, wxCoord y
)
534 #warning "move this to common code?"
535 m_logicalOriginX
= x
* m_signX
; // is this still correct ?
536 m_logicalOriginY
= y
* m_signY
;
537 ComputeScaleAndOrigin();
540 void wxDC::SetDeviceOrigin( wxCoord x
, wxCoord y
)
542 #warning "move this to common code?"
543 // only wxPostScripDC has m_signX = -1, we override SetDeviceOrigin there
546 ComputeScaleAndOrigin();
549 void wxDC::SetAxisOrientation( bool xLeftRight
, bool yBottomUp
)
551 #warning "move this to common code?"
552 // only wxPostScripDC has m_signX = -1, we override SetAxisOrientation there
553 m_signX
= (xLeftRight
? 1 : -1);
554 m_signY
= (yBottomUp
? -1 : 1);
555 ComputeScaleAndOrigin();
558 // ---------------------------------------------------------------------------
559 // coordinates transformations
560 // ---------------------------------------------------------------------------
562 wxCoord
wxDCBase::DeviceToLogicalX(wxCoord x
) const
564 return ((wxDC
*)this)->XDEV2LOG(x
);
567 wxCoord
wxDCBase::DeviceToLogicalY(wxCoord y
) const
569 return ((wxDC
*)this)->YDEV2LOG(y
);
572 wxCoord
wxDCBase::DeviceToLogicalXRel(wxCoord x
) const
574 return ((wxDC
*)this)->XDEV2LOGREL(x
);
577 wxCoord
wxDCBase::DeviceToLogicalYRel(wxCoord y
) const
579 return ((wxDC
*)this)->YDEV2LOGREL(y
);
582 wxCoord
wxDCBase::LogicalToDeviceX(wxCoord x
) const
584 return ((wxDC
*)this)->XLOG2DEV(x
);
587 wxCoord
wxDCBase::LogicalToDeviceY(wxCoord y
) const
589 return ((wxDC
*)this)->YLOG2DEV(y
);
592 wxCoord
wxDCBase::LogicalToDeviceXRel(wxCoord x
) const
594 return ((wxDC
*)this)->XLOG2DEVREL(x
);
597 wxCoord
wxDCBase::LogicalToDeviceYRel(wxCoord y
) const
599 return ((wxDC
*)this)->YLOG2DEVREL(y
);
603 void wxDC::DoGetSize(int *w
, int *h
) const
605 wxCHECK_RET( Ok(), wxT("invalid dc") );
607 m_surface
->GetSize(w
, h
);
610 void wxDC::DoGetSizeMM(int *width
, int *height
) const
612 #warning "move this to common code?"
616 if ( width
) *width
= int(double(w
) / (m_userScaleX
*m_mm_to_pix_x
));
617 if ( height
) *height
= int(double(h
) / (m_userScaleY
*m_mm_to_pix_y
));
620 wxSize
wxDC::GetPPI() const
622 #warning "move this to common code?"
623 return wxSize(int(double(m_mm_to_pix_x
) * inches2mm
),
624 int(double(m_mm_to_pix_y
) * inches2mm
));
628 // ---------------------------------------------------------------------------
630 // ---------------------------------------------------------------------------
632 bool wxDC::DoBlit(wxCoord xdest
, wxCoord ydest
,
633 wxCoord width
, wxCoord height
,
634 wxDC
*source
, wxCoord xsrc
, wxCoord ysrc
,
635 int rop
, bool useMask
,
636 wxCoord xsrcMask
, wxCoord ysrcMask
)
641 wxCHECK_MSG( Ok(), false, wxT("invalid dc") );
642 wxCHECK_MSG( source
, false, wxT("invalid source dc") );
644 // transform the source DC coords to the device ones
645 xsrc
= source
->LogicalToDeviceX(xsrc
);
646 ysrc
= source
->LogicalToDeviceY(ysrc
);
648 /* FIXME_MGL: use the mask origin when drawing transparently */
649 if (xsrcMask
== -1 && ysrcMask
== -1)
651 xsrcMask
= xsrc
; ysrcMask
= ysrc
;
655 xsrcMask
= source
->LogicalToDeviceX(xsrcMask
);
656 ysrcMask
= source
->LogicalToDeviceY(ysrcMask
);
659 CalcBoundingBox(xdest
, ydest
);
660 CalcBoundingBox(xdest
+ width
, ydest
+ height
);
662 /* scale/translate size and position */
663 wxCoord xx
= XLOG2DEV(xdest
);
664 wxCoord yy
= YLOG2DEV(ydest
);
665 wxCoord ww
= XLOG2DEVREL(width
);
666 wxCoord hh
= YLOG2DEVREL(height
);
668 if ( source
->m_isMemDC
)
670 wxMemoryDC
*memDC
= (wxMemoryDC
*) source
;
671 DoDrawSubBitmap(memDC
->GetSelectedObject(), xsrc
, ysrc
, ww
, hh
,
672 xdest
, ydest
, rop
, useMask
);
676 m_MGLDC
->makeCurrent(); // will go away with MGL6.0
677 m_MGLDC
->bitBlt(*source
->GetMGLDC(),
678 xsrc
, ysrc
, xsrc
+ ww
, ysrc
+ hh
,
679 xx
, yy
, LogicalFunctionToMGLRop(rop
));
686 void wxDC::DoDrawBitmap(const wxBitmap
&bmp
, wxCoord x
, wxCoord y
, bool useMask
)
688 wxCHECK_RET( Ok(), wxT("invalid dc") );
689 wxCHECK_RET( bmp
.Ok(), wxT("invalid bitmap") );
691 wxCoord w
= bmp
.GetWidth();
692 wxCoord h
= bmp
.GetHeight();
694 DoDrawSubBitmap(bmp
, 0, 0, w
, h
, x
, y
, m_logicalFunction
, useMask
);
697 void wxDC::DoDrawIcon(const wxIcon
& icon
, wxCoord x
, wxCoord y
)
699 // VZ: egcs 1.0.3 refuses to compile this without cast, no idea why
700 DoDrawBitmap((const wxBitmap
&)icon
, x
, y
, true);
703 void wxDC::DoDrawSubBitmap(const wxBitmap
&bmp
,
704 wxCoord x
, wxCoord y
, wxCoord w
, wxCoord h
,
705 wxCoord destx
, wxCoord desty
, int rop
, bool useMask
)
708 wxCHECK_RET( Ok(), wxT("invalid dc") );
709 wxCHECK_RET( bmp
.Ok(), wxT("invalid bitmap") );
711 CalcBoundingBox(x
, y
);
712 CalcBoundingBox(x
+ w
, y
+ h
);
714 wxCoord dx
= XLOG2DEV(destx
);
715 wxCoord dy
= YLOG2DEV(desty
);
716 wxCoord dw
= XLOG2DEVREL(w
);
717 wxCoord dh
= YLOG2DEVREL(h
);
719 m_MGLDC
->makeCurrent(); // will go away with MGL6.0
721 bool useStretching
= ((w
!= dw
) || (h
!= dh
));
722 bool putSection
= (w
!= bmp
.GetWidth() || h
!= bmp
.GetHeight());
723 MGL_writeModeType mglRop
= (MGL_writeModeType
)LogicalFunctionToMGLRop(rop
);
725 if ( bmp
.GetDepth() == 1 )
727 // Mono bitmaps are handled in special way -- all 1s are drawn in
728 // foreground colours, all 0s in background colour.
730 ((wxBitmap
&)bmp
).SetMonoPalette(m_textForegroundColour
, m_textBackgroundColour
);
733 if ( useMask
&& bmp
.GetMask() )
735 // Since MGL does not support masks directly (in MGL, mask is handled
736 // in same way as in wxImage, i.e. there is one "key" color), we
737 // simulate masked bitblt in 6 steps (same as in MSW):
739 // 1. Create a temporary bitmap and copy the destination area into it.
740 // 2. Copy the source area into the temporary bitmap using the
741 // specified logical function.
742 // 3. Set the masked area in the temporary bitmap to BLACK by ANDing
743 // the mask bitmap with the temp bitmap with the foreground colour
744 // set to WHITE and the bg colour set to BLACK.
745 // 4. Set the unmasked area in the destination area to BLACK by
746 // ANDing the mask bitmap with the destination area with the
747 // foreground colour set to BLACK and the background colour set
749 // 5. OR the temporary bitmap with the destination area.
750 // 6. Delete the temporary bitmap.
752 // This sequence of operations ensures that the source's transparent
753 // area need not be black, and logical functions are supported.
755 wxBitmap
*mask
= bmp
.GetMask()->GetBitmap();
759 if ( GetDepth() <= 8 )
761 temp
= new MGLMemoryDC(dw
, dh
, GetDepth(), NULL
);
763 tempdc
.SetMGLDC(temp
, false);
764 tempdc
.SetPalette(m_palette
);
769 m_MGLDC
->getPixelFormat(pf
);
770 temp
= new MGLMemoryDC(dw
, dh
, GetDepth(), &pf
);
773 wxCHECK_RET( temp
->isValid(), wxT("cannot create temporary dc") );
775 temp
->bitBlt(*m_MGLDC
, dx
, dy
, dx
+ dw
, dy
+ dh
, 0, 0, MGL_REPLACE_MODE
);
777 DoBitBlt(bmp
, temp
, x
, y
, w
, h
, 0, 0, dw
, dh
, mglRop
,
778 useStretching
, putSection
);
780 mask
->SetMonoPalette(wxColour(0,0,0), wxColour(255,255,255));
781 DoBitBlt(*mask
, temp
, x
, y
, w
, h
, 0, 0, dw
, dh
, MGL_R2_MASKSRC
,
782 useStretching
, putSection
);
783 DoBitBlt(*mask
, m_MGLDC
, x
, y
, w
, h
, dx
, dy
, dw
, dh
, MGL_R2_MASKNOTSRC
,
784 useStretching
, putSection
);
786 m_MGLDC
->bitBlt(*temp
, 0, 0, dw
, dh
, dx
, dy
, MGL_OR_MODE
);
793 DoBitBlt(bmp
, m_MGLDC
, x
, y
, w
, h
, dx
, dy
, dw
, dh
, mglRop
,
794 useStretching
, putSection
);