aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r--src/LineMarker.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index df8c3d55a..9794f523c 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -514,6 +514,37 @@ void LineMarker::Draw(Surface *surface, const PRectangle &rcWhole, const Font *f
}
break;
+ case MarkerSymbol::Bar: {
+ PRectangle rcBar = rcWhole;
+ const XYPOSITION widthBar = std::floor(rcWhole.Width() / 3.0);
+ rcBar.left = centreX - std::floor(widthBar / 2.0);
+ rcBar.right = rcBar.left + widthBar;
+ surface->SetClip(rcWhole);
+ switch (part) {
+ case LineMarker::FoldPart::headWithTail:
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::head:
+ rcBar.bottom += 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::tail:
+ rcBar.top -= 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ case LineMarker::FoldPart::body:
+ rcBar.top -= 5;
+ rcBar.bottom += 5;
+ surface->RectangleDraw(rcBar, FillStroke(back, fore, strokeWidth));
+ break;
+ default:
+ break;
+ }
+ surface->PopClip();
+ }
+ break;
+
+
case MarkerSymbol::Bookmark: {
const XYPOSITION halfHeight = std::floor(minDim / 3);
Point pts[] = {