Support Board
Date/Time: Sun, 25 Oct 2026 03:42:27 +0000
Post From: v2960 Cannot set Horizontal Ray TextColor from s_UseTool
| [2026-09-27 19:43:56] |
| User719512 - Posts: 513 |
|
Wrote a sample to create a new ray when at bar index scArraySize-10 and immediately read it back. I stepped through my code from when sc.UseTool was first called thru the next several lines. Code snippet constexpr uint32_t kTextColor = 0xeeddcc;
const int beginIndex = sc.ArraySize - 10; s_UseTool newRay; newRay.ChartNumber = sc.ChartNumber; newRay.DrawingType = DRAWING_HORIZONTAL_RAY; newRay.LineNumber = kDrawingLineNumber; newRay.AddMethod = UTAM_ADD_OR_ADJUST; newRay.Region = 0; newRay.BeginIndex = beginIndex; newRay.BeginValue = sc.Close[beginIndex]; newRay.Color = kLineColor; newRay.LineWidth = 1; newRay.Text = "TextColor probe"; newRay.TextColor = kTextColor; newRay.FontSize = 12; newRay.TransparentLabelBackground = 1; sc.UseTool(newRay); } s_UseTool chartDrawing; const int found = sc.GetACSDrawingByLineNumber( sc.ChartNumber, kDrawingLineNumber, chartDrawing ); // Breakpoint: chartDrawing.TextColor should be 0xeeddcc if Sierra kept it. found is 1 when the ray exists. const uint32_t readbackTextColor = chartDrawing.TextColor; (void)found; (void)readbackTextColor; Debugger watch newRay.TextColor 0x00eeddcc unsigned int readbackTextColor 0x00ffffff const unsigned int found 0x00000001 const int |
