Support Board
Date/Time: Sat, 18 Jan 2025 04:51:50 +0000
Post From: Forcing lines to have square edges
[2018-01-12 09:16:32] |
gomifromparis - Posts: 244 |
Default GDI lines have rounded edges by default. It gives unpleasant artefacts on 2 pixel width lines (see attached pic of the order lines on a chart) I've had this issue on my custom studies for some time, finally decided to tackle it. Dunno if you're interested, but here's how you can force square edges. LOGBRUSH LogBrush; LogBrush.lbStyle = BS_SOLID; LogBrush.lbColor = sc.Subgraph[0].PrimaryColor; LogBrush.lbHatch = NULL; hLinePen = ExtCreatePen(PS_GEOMETRIC| PS_SOLID| PS_ENDCAP_SQUARE, sc.Subgraph[0].LineWidth, &LogBrush, sc.Subgraph[0].LineStyle,NULL); Date Time Of Last Edit: 2018-01-12 09:36:20
|
squareedges.png / V - Attached On 2018-01-12 09:36:17 UTC - Size: 2.78 KB - 277 views |