vBmpHdr.cx = nWidth;
vBmpHdr.cy = nHeight;
vBmpHdr.cPlanes = 1;
- vBmpHdr.cBitCount = nDepth;
+ vBmpHdr.cBitCount = (USHORT)nDepth;
pEntry->m_hBitmap = (WXHBITMAP) ::GpiCreateBitmap( hPS
,&vBmpHdr
vBmpHdr.cx = nWidth;
vBmpHdr.cy = nHeight;
vBmpHdr.cPlanes = 1;
- vBmpHdr.cBitCount = nDepth;
+ vBmpHdr.cBitCount = (USHORT)nDepth;
WXHBITMAP hBitmap = (WXHBITMAP) ::GpiCreateBitmap( hPS
,&vBmpHdr
if ((lHits = ::GpiFloodFill(m_hPS, lOptions, lColor)) != GPI_ERROR)
bSuccess = true;
- return true;
+ return bSuccess;
} // end of wxDC::DoFloodFill
bool wxDC::DoGetPixel(
vPoint.x = vX;
vPoint.y = OS2Y(vY,0);
- lColor = ::GpiSetPel(m_hPS, &vPoint);
-
- //
- // Get the color of the pen
- //
- LONG lPencolor = 0x00ffffff;
-
- if (m_pen.Ok())
- {
- lPencolor = m_pen.GetColour().GetPixel();
- }
+ lColor = ::GpiQueryPel(m_hPS, &vPoint);
//
// return the color of the pixel
,GetGValue(lColor)
,GetBValue(lColor)
);
- return(lColor == lPencolor);
+ return true;
} // end of wxDC::DoGetPixel
void wxDC::DoCrossHair(
vPtlArc[0].y = vYm;
vPtlArc[1].x = vX2;
vPtlArc[1].y = vY2;
+#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
+// Open Watcom 1.3 had incomplete headers
+// that's reported and should be fixed for OW 1.4
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
+#endif
CalcBoundingBox( (wxCoord)(vXc - dRadius)
,(wxCoord)(vYc - dRadius)
);
, bool bUseMask
)
{
+#if wxUSE_PRINTING_ARCHITECTURE
if (!IsKindOf(CLASSINFO(wxPrinterDC)))
+#endif
{
HBITMAP hBitmap = (HBITMAP)rBmp.GetHBITMAP();
- HBITMAP hBitmapOld = NULLHANDLE;;
+ HBITMAP hBitmapOld = NULLHANDLE;
POINTL vPoint[4];
vY = OS2Y(vY,rBmp.GetHeight());
lColor = m_textBackgroundColour.GetPixel();
//
- // Bitmap must be ina double-word alligned address so we may
+ // Bitmap must be in a double-word aligned address so we may
// have some padding to worry about
//
if (nLineBoundary > 0)
// set GDI objects
// ---------------------------------------------------------------------------
-void wxDC::DoSelectPalette(
- bool bRealize
-)
+void wxDC::DoSelectPalette( bool WXUNUSED(bRealize) )
{
//
// Set the old object temporarily, in case the assignment deletes an object
::GpiSetMix((HPS)hDC, lCRop);
} // end of wxDC::SetRop
-bool wxDC::StartDoc(
- const wxString& rsMessage
-)
+bool wxDC::StartDoc( const wxString& WXUNUSED(rsMessage) )
{
// We might be previewing, so return true to let it continue.
return true;
// ????
}; // end of wxDC::SetMapMode
-void wxDC::SetUserScale(
- double dX
-, double dY
-)
+void wxDC::SetUserScale( double dX,
+ double dY )
{
m_userScaleX = dX;
m_userScaleY = dY;
SetMapMode(m_mappingMode);
} // end of wxDC::SetUserScale
-void wxDC::SetAxisOrientation(
- bool bXLeftRight
-, bool bYBottomUp
-)
+void wxDC::SetAxisOrientation( bool bXLeftRight,
+ bool bYBottomUp )
{
m_signX = bXLeftRight ? 1 : -1;
m_signY = bYBottomUp ? -1 : 1;
// bit blit
// ---------------------------------------------------------------------------
-bool wxDC::DoBlit(
- wxCoord vXdest
-, wxCoord vYdest
-, wxCoord vWidth
-, wxCoord vHeight
-, wxDC* pSource
-, wxCoord vXsrc
-, wxCoord vYsrc
-, int nRop
-, bool bUseMask
-, wxCoord vXsrcMask
-, wxCoord vYsrcMask
-)
+bool wxDC::DoBlit( wxCoord vXdest,
+ wxCoord vYdest,
+ wxCoord vWidth,
+ wxCoord vHeight,
+ wxDC* pSource,
+ wxCoord vXsrc,
+ wxCoord vYsrc,
+ int nRop,
+ bool bUseMask,
+ wxCoord WXUNUSED(vXsrcMask),
+ wxCoord WXUNUSED(vYsrcMask) )
{
wxMask* pMask = NULL;
CHARBUNDLE vCbnd;
vBmpHdr.cBitCount = 24;
#if wxUSE_DC_CACHEING
- if (true)
{
//
// create a temp buffer bitmap and DCs to access it and the mask
hPSMask = pDCCacheEntry1->m_hPS;
hDCBuffer = (HDC)pDCCacheEntry2->m_hPS;
hBufBitmap = (HBITMAP)pBitmapCacheEntry->m_hBitmap;
+ wxUnusedVar(hDCMask);
}
- else
-#endif
+#else
{
hDCMask = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDOP, NULLHANDLE);
hDCBuffer = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDOP, NULLHANDLE);
hPSBuffer = ::GpiCreatePS(vHabmain, hDCBuffer, &vSize, PU_PELS | GPIT_MICRO | GPIA_ASSOC);
hBufBitmap = ::GpiCreateBitmap(GetHPS(), &vBmpHdr, 0L, NULL, NULL);
}
+#endif
POINTL aPoint1[4] = { {0, 0}
,{vWidth, vHeight}
}
}; // end of wxDC::DoGetSize(
-void wxDC::DoGetSizeMM(
- int* pnWidth
-, int* pnHeight
-) const
+void wxDC::DoGetSizeMM( int* pnWidth,
+ int* pnHeight ) const
{
LONG lArray[CAPS_VERTICAL_RESOLUTION];
,lArray
))
{
- int nWidth;
- int nHeight;
- int nHorzRes;
- int nVertRes;
+ if(pnWidth)
+ {
+ int nWidth = lArray[CAPS_WIDTH];
+ int nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
+ *pnWidth = (nHorzRes/1000) * nWidth;
+ }
- nWidth = lArray[CAPS_WIDTH];
- nHeight = lArray[CAPS_HEIGHT];
- nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
- nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
- nWidth = (nHorzRes/1000) * nWidth;
- nHeight = (nVertRes/1000) * nHeight;
+ if(pnHeight)
+ {
+ int nHeight = lArray[CAPS_HEIGHT];
+ int nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
+ *pnHeight = (nVertRes/1000) * nHeight;
+ }
}
}; // end of wxDC::DoGetSizeMM
nWidth = (int)((nHorzRes/39.3) * nPelWidth);
nHeight = (int)((nVertRes/39.3) * nPelHeight);
}
- return (wxSize(nWidth,nHeight));
+ wxSize ppisize(nWidth, nHeight);
+ return ppisize;
} // end of wxDC::GetPPI
void wxDC::SetLogicalScale(
m_logicalScaleX = dX;
m_logicalScaleY = dY;
}; // end of wxDC::SetLogicalScale
-
-
-