DO_SET_CLIPPING_BOX()
} // end of wxPMDCImpl::DoSetClippingRegion
-void wxPMDCImpl::DoSetClippingRegionAsRegion(
+void wxPMDCImpl::DoSetDeviceClippingRegion(
const wxRegion& rRegion
)
{
,&hRgnOld
);
DO_SET_CLIPPING_BOX()
-} // end of wxPMDCImpl::DoSetClippingRegionAsRegion
+} // end of wxPMDCImpl::DoSetDeviceClippingRegion
void wxPMDCImpl::DestroyClippingRegion(void)
{
int wxPMDCImpl::GetDepth() const
{
- LONG lArray[CAPS_COLOR_BITCOUNT];
+ LONG lCapsColorBitcount;
int nBitsPerPixel = 0;
if(::DevQueryCaps( GetHDC()
- ,CAPS_FAMILY
,CAPS_COLOR_BITCOUNT
- ,lArray
+ ,1L
+ ,&lCapsColorBitcount
))
{
- nBitsPerPixel = (int)lArray[CAPS_COLOR_BITCOUNT];
+ nBitsPerPixel = (int)lCapsColorBitcount;
}
return nBitsPerPixel;
} // end of wxPMDCImpl::GetDepth
wxCoord vX
, wxCoord vY
, const wxColour& rCol
-, int nStyle
+, wxFloodFillStyle nStyle
)
{
POINTL vPtlPos;
wxPoint vPoints[],
wxCoord vXoffset,
wxCoord vYoffset,
- int nFillStyle )
+ wxPolygonFillMode nFillStyle )
{
ULONG ulCount = 1; // Number of polygons.
POLYGON vPlgn; // polygon.
m_backgroundMode = nMode;
} // end of wxPMDCImpl::SetBackgroundMode
-void wxPMDCImpl::SetLogicalFunction(int nFunction)
+void wxPMDCImpl::SetLogicalFunction(wxRasterOperationMode nFunction)
{
m_logicalFunction = nFunction;
SetRop((WXHDC)m_hDC);
//
if (!m_hPS)
{
- (void)wxMessageBox( _T("wxWidgets core library")
- ,"Using uninitialized DC for measuring text!\n"
- ,wxICON_INFORMATION
- );
+ (void)wxMessageBox( wxT("wxWidgets core library")
+ ,"Using uninitialized DC for measuring text!\n"
+ ,wxICON_INFORMATION
+ );
}
-
+
bRc = ::GpiQueryTextBox( m_hPS
,l
,rsString.char_str()
vErrorCode = ::WinGetLastError(wxGetInstance());
sError = wxPMErrorToStr(vErrorCode);
// DEBUG
- wxSprintf(zMsg, _T("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
- (void)wxMessageBox( _T("wxWidgets core library")
+ wxSprintf(zMsg, wxT("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
+ (void)wxMessageBox( wxT("wxWidgets core library")
,zMsg
,wxICON_INFORMATION
);
}
void wxPMDCImpl::SetMapMode(
- int nMode
+ wxMappingMode nMode
)
{
int nPixelWidth = 0;
::GpiSetPS(m_hPS, &vSize, ulOptions);
}
ComputeScaleAndOrigin();
-
+
}; // end of wxPMDCImpl::SetMapMode
void wxPMDCImpl::SetUserScale( double dX,
wxDC* pSource,
wxCoord vXsrc,
wxCoord vYsrc,
- int nRop,
+ wxRasterOperationMode nRop,
bool bUseMask,
wxCoord WXUNUSED(vXsrcMask),
wxCoord WXUNUSED(vYsrcMask) )
}
void wxPMDCImpl::DoGetSize( int* pnWidth,
- int* pnHeight ) const
+ int* pnHeight ) const
{
- LONG lArray[CAPS_HEIGHT];
+ LONG lArray[CAPS_HEIGHT+1];
if(::DevQueryCaps( m_hDC
,CAPS_FAMILY
- ,CAPS_HEIGHT
+ ,CAPS_HEIGHT+1
,lArray
))
{
- *pnWidth = lArray[CAPS_WIDTH];
- *pnHeight = lArray[CAPS_HEIGHT];
+ if (pnWidth)
+ *pnWidth = lArray[CAPS_WIDTH];
+ if (pnHeight)
+ *pnHeight = lArray[CAPS_HEIGHT];
}
}; // end of wxPMDCImpl::DoGetSize(
void wxPMDCImpl::DoGetSizeMM( int* pnWidth,
int* pnHeight ) const
{
- LONG lArray[CAPS_VERTICAL_RESOLUTION];
+ LONG lArray[CAPS_VERTICAL_RESOLUTION+1];
if(::DevQueryCaps( m_hDC
,CAPS_FAMILY
- ,CAPS_VERTICAL_RESOLUTION
+ ,CAPS_VERTICAL_RESOLUTION+1
,lArray
))
{
if(pnWidth)
{
- int nWidth = lArray[CAPS_WIDTH];
- int nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
- *pnWidth = (nHorzRes/1000) * nWidth;
+ int nWidth = lArray[CAPS_WIDTH];
+ int nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
+ // use fp to avoid returning 0 if nHorzRes < 1000
+ *pnWidth = (int)((nHorzRes/1000.0) * nWidth);
}
if(pnHeight)
{
- int nHeight = lArray[CAPS_HEIGHT];
+ int nHeight = lArray[CAPS_HEIGHT];
int nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
- *pnHeight = (nVertRes/1000) * nHeight;
+ // use fp to avoid returning 0 if nVertRes < 1000
+ *pnHeight = (int)((nVertRes/1000.0) * nHeight);
}
}
}; // end of wxPMDCImpl::DoGetSizeMM
wxSize wxPMDCImpl::GetPPI() const
{
- LONG lArray[CAPS_VERTICAL_RESOLUTION];
+ LONG lArray[CAPS_VERTICAL_RESOLUTION+1];
int nWidth = 0;
int nHeight = 0;
if(::DevQueryCaps( m_hDC
,CAPS_FAMILY
- ,CAPS_VERTICAL_RESOLUTION
+ ,CAPS_VERTICAL_RESOLUTION+1
,lArray
))
{