DO_SET_CLIPPING_BOX(m_currentClippingRegion)
}
-void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region)
+void wxDC::DoSetDeviceClippingRegion(const wxRegion& region)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
}
extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
- const wxColour & col, int style);
+ const wxColour & col, wxFloodFillStyle style);
bool wxDC::DoFloodFill(wxCoord x, wxCoord y,
- const wxColour& col, int style)
+ const wxColour& col, wxFloodFillStyle style)
{
return wxDoFloodFill(this, x, y, col, style);
}
bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
{
- wxCHECK_MSG( col, false, _T("NULL colour parameter in wxDC::GetPixel"));
+ wxCHECK_MSG( col, false, wxT("NULL colour parameter in wxDC::GetPixel"));
uchar r, g, b;
m_MGLDC->unpackColorFast(m_MGLDC->getPixel(XLOG2DEV(x), YLOG2DEV(y)),
}
}
-void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,int WXUNUSED(fillStyle))
+void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,wxPolygonFillMode WXUNUSED(fillStyle))
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
pixPattern->p[x][y][2]);
break;
default:
- wxFAIL_MSG(_T("invalid DC depth"));
+ wxFAIL_MSG(wxT("invalid DC depth"));
break;
}
m_MGLDC->setPenPixmapPattern(slot, &pix);
m_MGLDC->setBackMode(MGL_TRANSPARENT_BACKGROUND);
}
-void wxDC::SetLogicalFunction(int function)
+void wxDC::SetLogicalFunction(wxRasterOperationMode function)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
if ( x )
// VS: YDEV is corrent, it should *not* be XDEV, because font's are
// only scaled according to m_scaleY
- *x = YDEV2LOGREL(m_MGLDC->textWidth(string.c_str()));
+ *x = YDEV2LOGREL(m_MGLDC->textWidth(string.wc_str()));
if ( y )
*y = YDEV2LOGREL(m_MGLDC->textHeight());
if ( descent )
}
-
// ---------------------------------------------------------------------------
// mapping modes
// ---------------------------------------------------------------------------
m_scaleX = newX, m_scaleY = newY;
}
-void wxDC::SetMapMode(int mode)
-{
- switch (mode)
- {
- case wxMM_TWIPS:
- SetLogicalScale(twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y);
- break;
- case wxMM_POINTS:
- SetLogicalScale(pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y);
- break;
- case wxMM_METRIC:
- SetLogicalScale(m_mm_to_pix_x, m_mm_to_pix_y);
- break;
- case wxMM_LOMETRIC:
- SetLogicalScale(m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0);
- break;
- default:
- case wxMM_TEXT:
- SetLogicalScale(1.0, 1.0);
- break;
- }
- m_mappingMode = mode;
-}
-
-void wxDC::SetUserScale( double x, double y )
-{
- // allow negative ? -> no
- m_userScaleX = x;
- m_userScaleY = y;
- ComputeScaleAndOrigin();
-}
-
-void wxDC::SetLogicalScale( double x, double y )
-{
- // allow negative ?
- m_logicalScaleX = x;
- m_logicalScaleY = y;
- ComputeScaleAndOrigin();
-}
-
-void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y )
-{
- m_logicalOriginX = x * m_signX; // is this still correct ?
- m_logicalOriginY = y * m_signY;
- ComputeScaleAndOrigin();
-}
-
-void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y )
-{
- // only wxPostScripDC has m_signX = -1, we override SetDeviceOrigin there
- m_deviceOriginX = x;
- m_deviceOriginY = y;
- ComputeScaleAndOrigin();
-}
-
-void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
-{
- // only wxPostScripDC has m_signX = -1, we override SetAxisOrientation there
- m_signX = (xLeftRight ? 1 : -1);
- m_signY = (yBottomUp ? -1 : 1);
- ComputeScaleAndOrigin();
-}
-
-// ---------------------------------------------------------------------------
-// coordinates transformations
-// ---------------------------------------------------------------------------
-
-wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
-{
- return ((wxDC *)this)->XDEV2LOG(x);
-}
-
-wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
-{
- return ((wxDC *)this)->YDEV2LOG(y);
-}
-
-wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
-{
- return ((wxDC *)this)->XDEV2LOGREL(x);
-}
-
-wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
-{
- return ((wxDC *)this)->YDEV2LOGREL(y);
-}
-
-wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
-{
- return ((wxDC *)this)->XLOG2DEV(x);
-}
-
-wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
-{
- return ((wxDC *)this)->YLOG2DEV(y);
-}
-
-wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
-{
- return ((wxDC *)this)->XLOG2DEVREL(x);
-}
-
-wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
-{
- return ((wxDC *)this)->YLOG2DEVREL(y);
-}
-
-
void wxDC::DoGetSize(int *w, int *h) const
{
if (w) *w = m_MGLDC->sizex()+1;
bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop, bool useMask,
+ wxRasterOperationMode rop, bool useMask,
wxCoord xsrcMask, wxCoord ysrcMask)
{
wxCHECK_MSG( Ok(), false, wxT("invalid dc") );