m_hDC = hDC;
} // end of wxPMDCImpl::wxPMDCImpl
-wxPMDCImpl::~wxPMDCImpl(void)
+wxPMDCImpl::~wxPMDCImpl()
{
if ( m_hDC != 0 )
{
if (m_hOldBitmap)
{
::GpiSetBitmap(hPS, (HBITMAP) m_hOldBitmap);
- if (m_vSelectedBitmap.Ok())
+ if (m_vSelectedBitmap.IsOk())
{
m_vSelectedBitmap.SetSelectedInto(NULL);
}
DO_SET_CLIPPING_BOX()
} // end of wxPMDCImpl::DoSetDeviceClippingRegion
-void wxPMDCImpl::DestroyClippingRegion(void)
+void wxPMDCImpl::DestroyClippingRegion()
{
if (m_clipping && m_hPS)
{
}
else
{
- if (m_vSelectedBitmap.Ok())
+ if (m_vSelectedBitmap.IsOk())
{
m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
vPoint[0].y = vY1;
vPoint[1].x = vX2;
vPoint[1].y = vY2;
- if (m_pen.Ok())
+ if (m_pen.IsOk())
{
vColor = m_pen.GetColour().GetPixel();
}
POINTL vPoint;
COLORREF vColor = 0x00ffffff;
- if (m_pen.Ok())
+ if (m_pen.IsOk())
{
vColor = m_pen.GetColour().GetPixel();
}
{
POINTL vPoint;
- if (vXoffset != 0L || vXoffset != 0L)
+ if (vXoffset != 0L || vYoffset != 0L)
{
int i;
vY = OS2Y(vY,vHeight);
else
{
- if (m_vSelectedBitmap.Ok())
+ if (m_vSelectedBitmap.IsOk())
{
m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
vY = OS2Y(vY,vHeight);
else
{
- if (m_vSelectedBitmap.Ok())
+ if (m_vSelectedBitmap.IsOk())
{
m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
lColor = pWindowDC->m_pCanvas->GetBackgroundColour().GetPixel();
}
- else if (GetBrush().Ok())
+ else if (GetBrush().IsOk())
lColor = GetBrush().GetColour().GetPixel();
else
lColor = m_textBackgroundColour.GetPixel();
ULONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
ULONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
- if (m_textForegroundColour.Ok())
+ if (m_textForegroundColour.IsOk())
{
::GpiSetColor( (HPS)GetHPS()
,m_textForegroundColour.GetPixel()
);
}
- if (m_textBackgroundColour.Ok())
+ if (m_textBackgroundColour.IsOk())
{
::GpiSetBackColor( (HPS)GetHPS()
,m_textBackgroundColour.GetPixel()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
+ delete [] pucBits;
return;
}
if ((lScans = ::GpiQueryBitmapBits( hPS
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
+ delete [] pucBits;
return;
}
unsigned char cOldRedFore = (unsigned char)(lOldForeGround >> 16);
//
// Set text color attributes
//
- if (m_textForegroundColour.Ok())
+ if (m_textForegroundColour.IsOk())
{
SetTextColor( m_hPS
,(int)m_textForegroundColour.GetPixel()
);
}
- if (m_textBackgroundColour.Ok())
+ if (m_textBackgroundColour.IsOk())
{
nOldBackground = SetTextBkColor( m_hPS
,(int)m_textBackgroundColour.GetPixel()
}
else
{
- if (m_vSelectedBitmap.Ok())
+ if (m_vSelectedBitmap.IsOk())
{
m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight();
m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth();
// it never is set to anything else, but background should remain
// transparent even if we just drew an opaque string)
//
- if (m_textBackgroundColour.Ok())
+ if (m_textBackgroundColour.IsOk())
SetTextBkColor( m_hPS
,nOldBackground
);
m_hOldPalette = 0;
}
- if (m_palette.Ok())
+ if (m_palette.IsOk())
{
HPALETTE hOldPal;
m_hOldFont = 0;
}
m_palette = rPalette;
- if (!rPalette.Ok())
+ if (!rPalette.IsOk())
{
if (m_hOldFont)
{
m_hOldFont = 0;
}
m_font = rFont;
- if (!rFont.Ok())
+ if (!rFont.IsOk())
{
m_hOldFont = 0;
}
m_font.SetPS(m_hPS); // this will realize the font
- if (m_font.Ok())
+ if (m_font.IsOk())
{
HFONT hFont = m_font.GetResourceHandle();
if (hFont == (HFONT) NULL)
if (m_pen == rPen)
return;
m_pen = rPen;
- if (!m_pen.Ok())
+ if (!m_pen.IsOk())
return;
if (m_hOldPen)
m_hOldPen = 0L;
m_pen = rPen;
- if (!m_pen.Ok())
+ if (!m_pen.IsOk())
{
if (m_hOldPen)
{
m_hOldPen = 0L;
}
- if (m_pen.Ok())
+ if (m_pen.IsOk())
{
if (m_pen.GetResourceHandle())
{
if (m_hOldBrush)
m_hOldBrush = 0L;
m_brush = rBrush;
- if (!m_brush.Ok())
+ if (!m_brush.IsOk())
if (m_brush == rBrush)
return;
- if (!m_brush.Ok())
+ if (!m_brush.IsOk())
if (m_hOldBrush)
m_hOldBrush = 0L;
- if (!m_brush.Ok())
+ if (!m_brush.IsOk())
{
if (m_hOldBrush)
{
m_hOldBrush = 0L;
}
- if (m_brush.Ok())
+ if (m_brush.IsOk())
{
if (m_brush.GetResourceHandle())
{
{
m_backgroundBrush = rBrush;
- if (m_backgroundBrush.Ok())
+ if (m_backgroundBrush.IsOk())
{
(void)::GpiSetBackColor((HPS)m_hPS, m_backgroundBrush.GetColour().GetPixel());
}
const wxBitmap& rBmp = pm_impl->GetSelectedBitmap();
pMask = rBmp.GetMask();
- if (!(rBmp.Ok() && pMask && pMask->GetMaskBitmap()))
+ if (!(rBmp.IsOk() && pMask && pMask->GetMaskBitmap()))
{
bUseMask = false;
}
);
vOldTextColor = (COLORREF)vCbnd.lColor;
- if (m_textForegroundColour.Ok())
+ if (m_textForegroundColour.IsOk())
{
vCbnd.lColor = (LONG)m_textForegroundColour.GetPixel();
::GpiSetAttrs( m_hPS // presentation-space handle
,&vCbnd // buffer for attributes.
);
}
- if (m_textBackgroundColour.Ok())
+ if (m_textBackgroundColour.IsOk())
{
::GpiSetBackColor(m_hPS, (LONG)m_textBackgroundColour.GetPixel());
}