Support Board
Date/Time: Sat, 18 Jan 2025 05:17:48 +0000
Forcing lines to have square edges
View Count: 1099
[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 |
[2018-01-12 19:13:20] |
Sierra Chart Engineering - Posts: 104368 |
Yes. We do use these types of lines in some cases. Regarding the attached screenshot, we have never seen that type of appearance with the order line. The left edge of it is always clean and against the X button for the order. If we had seen that, we would have taken care of it many years ago. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2018-01-12 19:57:55] |
gomifromparis - Posts: 244 |
Ah OK sorry, so I tried on my WServer 2012 it's OK, on my Surface it's OK, but for some reason on my main computer the horizontal lines all want to have rounded edges... Maybe some GDI driver issue, but lines aren't accelerated any more and are software rendered so that's strange.. |
[2018-01-13 12:30:17] |
gomifromparis - Posts: 244 |
Did a little more investigation and found the culprit. The text on the order line does not use any of Sierra's defined fonts , but one of the system fonts, which usually is Segoe UI. I hate this blurry font which makes my eyes bleed, my default system font is good'ol Tahoma from XP/Windows 2000 days... I happens that the GDI Windows metric gives a 14 width bounding box for Segoe, but only 12 for Tahoma, so the box is shorter, and the rounded edge of the order line appears (see pic) Also wanted to note the rounded edge appear on the study lines (see other pic). No biggie, I'll live with it, but wanted to find the cause of this... |
segoesierra.png / V - Attached On 2018-01-13 12:27:21 UTC - Size: 5.4 KB - 342 views studylines.png / V - Attached On 2018-01-13 12:27:27 UTC - Size: 10.15 KB - 334 views |
[2018-01-15 10:15:25] |
Sierra Chart Engineering - Posts: 104368 |
In the next release these lines will have square edges.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: