X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd1e9c12b18a09228ddfb94c386677f686ce08b4..c13cace12594b37706e9520a6fbd602c949f8127:/src/common/dcbase.cpp?ds=sidebyside diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 7eab6ec026..e625e91d07 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -30,7 +30,28 @@ #include "wx/dc.h" -void wxDCBase::DrawLines(const wxList *list, long xoffset, long yoffset) +void wxDCBase::DoDrawCheckMark(wxCoord x1, wxCoord y1, + wxCoord width, wxCoord height) +{ + wxCHECK_RET( Ok(), wxT("invalid window dc") ); + + wxCoord x2 = x1 + width, + y2 = y1 + height; + + // this is to yield width of 3 for width == height == 10 + SetPen(wxPen(GetTextForeground(), (width + height + 1) / 7, wxSOLID)); + + // we're drawing a scaled version of wx/generic/tick.xpm here + wxCoord x3 = x1 + (4*width) / 10, // x of the tick bottom + y3 = y1 + height / 2; // y of the left tick branch + DoDrawLine(x1, y3, x3, y2); + DoDrawLine(x3, y2, x2, y1); + + CalcBoundingBox(x1, y1); + CalcBoundingBox(x2, y2); +} + +void wxDCBase::DrawLines(const wxList *list, wxCoord xoffset, wxCoord yoffset) { int n = list->Number(); wxPoint *points = new wxPoint[n]; @@ -50,7 +71,7 @@ void wxDCBase::DrawLines(const wxList *list, long xoffset, long yoffset) void wxDCBase::DrawPolygon(const wxList *list, - long xoffset, long yoffset, + wxCoord xoffset, wxCoord yoffset, int fillStyle) { int n = list->Number(); @@ -73,7 +94,7 @@ void wxDCBase::DrawPolygon(const wxList *list, #if wxUSE_SPLINES // TODO: this API needs fixing (wxPointList, why (!const) "wxList *"?) -void wxDCBase::DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3) +void wxDCBase::DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord x3, wxCoord y3) { wxList point_list;