aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Indicator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Indicator.cxx')
-rw-r--r--src/Indicator.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index bd02a01d1..cb7d5deba 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -252,7 +252,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
case IndicatorStyle::CompositionThick: {
const PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom);
- surface->FillRectangle(rcComposition, sacDraw.fore);
+ surface->FillRectangle(rcComposition, ColourRGBA(sacDraw.fore, outlineAlpha));
}
break;
@@ -269,7 +269,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
const XYPOSITION x = (sacDraw.style == IndicatorStyle::Point) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2);
// 0.5f is to hit midpoint of pixels:
const XYPOSITION ix = std::round(x) + 0.5f;
- const XYPOSITION iy = std::floor(rc.top + 1.0f) + 0.5f;
+ const XYPOSITION iy = std::floor(rc.top) + 0.5f;
const Point pts[] = {
Point(ix - pixelHeight, iy + pixelHeight), // Left
Point(ix + pixelHeight, iy + pixelHeight), // Right
@@ -279,6 +279,22 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
}
break;
+ case IndicatorStyle::PointTop:
+ if (rcCharacter.Width() >= 0.1) {
+ const XYPOSITION pixelHeight = std::floor(rc.Height() - 1.0f); // 1 pixel onto previous line if multiphase
+ const XYPOSITION x = rcCharacter.left;
+ // 0.5f is to hit midpoint of pixels:
+ const XYPOSITION ix = std::round(x) + 0.5f;
+ const XYPOSITION iy = std::floor(rcLine.top) + 0.5f;
+ const Point pts[] = {
+ Point(ix - pixelHeight, iy), // Left
+ Point(ix + pixelHeight, iy), // Right
+ Point(ix, iy + pixelHeight) // Bottom
+ };
+ surface->Polygon(pts, std::size(pts), FillStroke(sacDraw.fore));
+ }
+ break;
+
default:
// Either IndicatorStyle::Plain or unknown
surface->FillRectangle(PRectangle(rcAligned.left, ymid,