diff options
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r-- | src/LineMarker.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index cf44928b4..708e6a320 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -14,6 +14,8 @@ #include "Platform.h" #include "Scintilla.h" + +#include "StringCopy.h" #include "XPM.h" #include "LineMarker.h" @@ -141,8 +143,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(centreX - dimOn4, centreY + dimOn2), Point(centreX + dimOn2 - dimOn4, centreY), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_ARROWDOWN) { Point pts[] = { @@ -150,8 +151,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(centreX + dimOn2, centreY - dimOn4), Point(centreX, centreY + dimOn2 - dimOn4), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_PLUS) { Point pts[] = { @@ -168,8 +168,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(centreX - 1, centreY + 1), Point(centreX - armSize, centreY + 1), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_MINUS) { Point pts[] = { @@ -178,8 +177,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(centreX + armSize, centreY +1), Point(centreX - armSize, centreY + 1), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_SMALLRECT) { PRectangle rcSmall; @@ -374,8 +372,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(centreX, centreY + dimOn4), Point(centreX, centreY + dimOn2), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_LEFTRECT) { PRectangle rcLeft = rcWhole; rcLeft.right = rcLeft.left + 4; @@ -389,8 +386,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point(rc.right-3, centreY+halfHeight), Point(rc.left, centreY+halfHeight), }; - surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), - fore, back); + surface->Polygon(pts, ELEMENTS(pts), fore, back); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back); } |