Support Board
Date/Time: Mon, 13 Jan 2025 05:42:45 +0000
Post From: DRAWING_TEXT not refreshed
[2017-03-30 17:51:45] |
User53601 - Posts: 105 |
void TextDrawing (SCStudyInterfaceRef sc, float Div1, float BeginValue, int LineNumber, int Offset, int VerOffset) { // UseTool1 SCString Text01; sc.FormatString(Text01, "%.0f ", Div1 ); s_UseTool Line01; Line01.Clear(); Line01.LineNumber = LineNumber; Line01.DrawingType = DRAWING_TEXT; // Color and width if ( Div1 > 0 ) { // Line01.LineWidth = 4 ; Line01.Color = RGB(128,255,0); } else { // Line01.LineWidth = 1 ; Line01.Color = RGB(255,0,255); } Line01.Text = Text01 ; Line01.BeginDateTime = sc.BaseDateTimeIn[sc.Index-Offset]; Line01.EndDateTime = sc.BaseDateTimeIn[sc.Index-Offset]; Line01.BeginValue = BeginValue + VerOffset*sc.TickSize ; Line01.EndValue = BeginValue * VerOffset*sc.TickSize; Line01.AddMethod = UTAM_ADD_OR_ADJUST; Line01.AddAsUserDrawnDrawing = 1; sc.UseTool(Line01); }; |