void wxDC::DoSetClippingRegion(wxCoord cx, wxCoord cy, wxCoord cw, wxCoord ch)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxRect rect(XLOG2DEV(cx), YLOG2DEV(cy), XLOG2DEVREL(cw), YLOG2DEVREL(ch));
void wxDC::DoSetDeviceClippingRegion(const wxRegion& region)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( region.IsEmpty() )
{
void wxDC::DestroyClippingRegion()
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( !m_globalClippingRegion.IsNull() )
{
void wxDC::Clear()
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
m_MGLDC->makeCurrent(); // will go away with MGL6.0
if ( m_backgroundBrush.GetStyle() != wxTRANSPARENT )
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::DoCrossHair(wxCoord x, wxCoord y)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( m_pen.GetStyle() != wxTRANSPARENT )
{
void wxDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( m_pen.GetStyle() != wxTRANSPARENT )
{
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxCoord xx1 = XLOG2DEV(x1);
wxCoord yy1 = YLOG2DEV(y1);
void wxDC::DoDrawPoint(wxCoord x, wxCoord y)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( m_pen.GetStyle() != wxTRANSPARENT )
{
void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,wxPolygonFillMode WXUNUSED(fillStyle))
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxCoord xxoffset = XLOG2DEVREL(xoffset),
yyoffset = YLOG2DEVREL(yoffset);
void wxDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( m_pen.GetStyle() != wxTRANSPARENT )
{
void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxCoord xx = XLOG2DEV(x);
wxCoord yy = YLOG2DEV(y);
void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
if ( radius < 0.0 )
radius = -radius * ((width < height) ? width : height);
void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxCoord x2 = (x+width);
wxCoord y2 = (y+height);
void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxCoord x2 = (x+w);
wxCoord y2 = (y+h);
void wxDC::DrawAnyText(const wxString& text, wxCoord x, wxCoord y)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
SelectMGLFont();
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);
void wxDC::SelectPen()
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxColour& clr = m_pen.GetColour();
m_MGLDC->makeCurrent(); // will go away with MGL6.0
void wxDC::SelectBrush()
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
wxColour fg, bg;
m_MGLDC->makeCurrent(); // will go away with MGL6.0
void wxDC::SetPen(const wxPen& pen)
{
- if ( !pen.Ok() ) return;
+ if ( !pen.IsOk() ) return;
if ( m_pen == pen ) return;
m_pen = pen;
m_penSelected = false;
void wxDC::SetBrush(const wxBrush& brush)
{
- if ( !brush.Ok() ) return;
+ if ( !brush.IsOk() ) return;
if ( m_brush == brush ) return;
m_brush = brush;
m_brushSelected = false;
void wxDC::SetPalette(const wxPalette& palette)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
- if ( !palette.Ok() )
+ if ( !palette.IsOk() )
{
- if ( m_oldPalette.Ok() )
+ if ( m_oldPalette.IsOk() )
SetPalette(m_oldPalette);
return;
}
void wxDC::SetFont(const wxFont& font)
{
- if ( font.Ok() )
+ if ( font.IsOk() )
{
m_font = font;
m_mglFont = NULL;
void wxDC::SetBackground(const wxBrush& brush)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
- if (!brush.Ok()) return;
+ if (!brush.IsOk()) return;
m_backgroundBrush = brush;
wxColour &clr = m_backgroundBrush.GetColour();
void wxDC::SetLogicalFunction(wxRasterOperationMode function)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
m_logicalFunction = function;
wxRasterOperationMode rop, bool useMask,
wxCoord xsrcMask, wxCoord ysrcMask)
{
- wxCHECK_MSG( Ok(), false, wxT("invalid dc") );
+ wxCHECK_MSG( IsOk(), false, wxT("invalid dc") );
wxCHECK_MSG( source, false, wxT("invalid source dc") );
// transform the source DC coords to the device ones
void wxDC::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxCHECK_RET( bmp.Ok(), wxT("invalid bitmap") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
+ wxCHECK_RET( bmp.IsOk(), wxT("invalid bitmap") );
wxCoord w = bmp.GetWidth();
wxCoord h = bmp.GetHeight();
wxCoord x, wxCoord y, wxCoord w, wxCoord h,
wxCoord destx, wxCoord desty, int rop, bool useMask)
{
- wxCHECK_RET( Ok(), wxT("invalid dc") );
- wxCHECK_RET( bmp.Ok(), wxT("invalid bitmap") );
+ wxCHECK_RET( IsOk(), wxT("invalid dc") );
+ wxCHECK_RET( bmp.IsOk(), wxT("invalid bitmap") );
CalcBoundingBox(x, y);
CalcBoundingBox(x + w, y + h);