X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3454ecd508f3d5a2a31f1c1d9048de80763135d1..b388e8cdec4f45124f31525e651a5e335965e4be:/contrib/src/ogl/drawn.cpp diff --git a/contrib/src/ogl/drawn.cpp b/contrib/src/ogl/drawn.cpp index 9764c11ab1..72130a6759 100644 --- a/contrib/src/ogl/drawn.cpp +++ b/contrib/src/ogl/drawn.cpp @@ -1363,7 +1363,7 @@ wxPseudoMetaFile::wxPseudoMetaFile() m_outlineOp = -1; } -wxPseudoMetaFile::wxPseudoMetaFile(wxPseudoMetaFile& mf) +wxPseudoMetaFile::wxPseudoMetaFile(wxPseudoMetaFile& mf):wxObject() { mf.Copy(*this); } @@ -1613,9 +1613,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle) { int penWidth = (int)expr->Nth(1)->IntegerValue(); int penStyle = (int)expr->Nth(2)->IntegerValue(); - int penRed = (int)expr->Nth(3)->IntegerValue(); - int penGreen = (int)expr->Nth(4)->IntegerValue(); - int penBlue = (int)expr->Nth(5)->IntegerValue(); + unsigned char penRed = (unsigned char)expr->Nth(3)->IntegerValue(); + unsigned char penGreen = (unsigned char)expr->Nth(4)->IntegerValue(); + unsigned char penBlue = (unsigned char)expr->Nth(5)->IntegerValue(); wxColour col(penRed, penGreen, penBlue); wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle); if (!p) @@ -1626,9 +1626,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle) case gyTYPE_BRUSH: { int brushStyle = (int)expr->Nth(1)->IntegerValue(); - int brushRed = (int)expr->Nth(2)->IntegerValue(); - int brushGreen = (int)expr->Nth(3)->IntegerValue(); - int brushBlue = (int)expr->Nth(4)->IntegerValue(); + unsigned char brushRed = (unsigned char)expr->Nth(2)->IntegerValue(); + unsigned char brushGreen = (unsigned char)expr->Nth(3)->IntegerValue(); + unsigned char brushBlue = (unsigned char)expr->Nth(4)->IntegerValue(); wxColour col(brushRed, brushGreen, brushBlue); wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle); if (!b) @@ -2187,6 +2187,7 @@ void wxPseudoMetaFile::GetBounds(double *boundMinX, double *boundMinY, double *b case DRAWOP_DRAW_RECT: case DRAWOP_DRAW_ROUNDED_RECT: case DRAWOP_DRAW_ELLIPSE: + case DRAWOP_DRAW_ELLIPTIC_ARC: case DRAWOP_DRAW_POINT: case DRAWOP_DRAW_TEXT: { @@ -2204,7 +2205,8 @@ void wxPseudoMetaFile::GetBounds(double *boundMinX, double *boundMinY, double *b } else if (op->GetOp() == DRAWOP_DRAW_RECT || op->GetOp() == DRAWOP_DRAW_ROUNDED_RECT || - op->GetOp() == DRAWOP_DRAW_ELLIPSE) + op->GetOp() == DRAWOP_DRAW_ELLIPSE || + op->GetOp() == DRAWOP_DRAW_ELLIPTIC_ARC) { if ((opDraw->m_x1 + opDraw->m_x2) < minX) minX = (opDraw->m_x1 + opDraw->m_x2); if ((opDraw->m_x1 + opDraw->m_x2) > maxX) maxX = (opDraw->m_x1 + opDraw->m_x2);