X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c3ebf8be5f192f23d8266603a72d19a7267c7c5..097b868b5a88879b1575b74883f736ae83444908:/src/common/dcbase.cpp diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 34b410ab11..ef8918bbb5 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/dcbase.cpp +// Name: src/common/dcbase.cpp // Purpose: generic methods of the wxDC Class // Author: Vadim Zeitlin // Modified by: @@ -25,10 +25,15 @@ #endif #include "wx/dc.h" -#include "wx/math.h" + +#ifndef WX_PRECOMP + #include "wx/math.h" +#endif // bool wxDCBase::sm_cacheing = false; +IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject) + // ============================================================================ // implementation // ============================================================================ @@ -412,7 +417,7 @@ bool wxDCBase::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) { int totalWidth = 0; - const size_t len = text.Length(); + const size_t len = text.length(); widths.Empty(); widths.Add(0, len); @@ -817,9 +822,9 @@ void wxDCBase::GradientFillConcentric(const wxRect& rect, nGradient = 0; //get dest colors - nR = nR1 + ((nR2 - nR1) * nGradient / 100); - nG = nG1 + ((nG2 - nG1) * nGradient / 100); - nB = nB1 + ((nB2 - nB1) * nGradient / 100); + nR = (wxUint8)(nR1 + ((nR2 - nR1) * nGradient / 100)); + nG = (wxUint8)(nG1 + ((nG2 - nG1) * nGradient / 100)); + nB = (wxUint8)(nB1 + ((nB2 - nB1) * nGradient / 100)); //set the pixel m_pen.SetColour(wxColour(nR,nG,nB)); @@ -1141,4 +1146,3 @@ void wxDCBase::CalculateEllipticPoints( wxList* points, } // CalculateEllipticPoints #endif -