Support Board
Date/Time: Sat, 18 Jan 2025 04:58:31 +0000
DrawOutlineOnly non-functional
View Count: 1065
[2018-01-10 17:37:38] |
binaryduke - Posts: 375 |
Hi SC I have conducted some quick and dirty testing on the DrawOutlineOnly member of the s_UseTool structure. It appears to be non-functional unless I'm missing something in the code below: #include "sierrachart.h" SCDLLName("Outline Test") SCSFExport scsf_Outline_Test(SCStudyInterfaceRef sc) { sc.GraphName = "Outline Test"; if (sc.SetDefaults) { sc.StudyDescription = "Test of sc.DrawOutline"; sc.GraphRegion = 0; sc.FreeDLL = 0; //TODO CHANGE TO 0 BEFORE RELEASE } if (sc.Index == (sc.ArraySize - 1)) { s_UseTool FilledRectangle; FilledRectangle.Clear(); FilledRectangle.ChartNumber = sc.ChartNumber; FilledRectangle.Region = sc.GraphRegion; FilledRectangle.AddMethod = UTAM_ADD_ALWAYS; FilledRectangle.DrawingType = DRAWING_RECTANGLEHIGHLIGHT; FilledRectangle.BeginIndex = sc.Index - 5; FilledRectangle.EndIndex = sc.Index - 2; FilledRectangle.BeginValue = sc.High[sc.Index - 2] + 1; FilledRectangle.EndValue = sc.High[sc.Index - 2] + 2; FilledRectangle.Color = RGB(255,0,0); FilledRectangle.SecondaryColor = RGB(255,0,0); FilledRectangle.TransparencyLevel = 0; FilledRectangle.LineWidth = 2; FilledRectangle.DrawOutlineOnly = 0; sc.UseTool(FilledRectangle); s_UseTool OutlineRectangle1; OutlineRectangle1.Clear(); OutlineRectangle1.ChartNumber = sc.ChartNumber; OutlineRectangle1.Region = sc.GraphRegion; OutlineRectangle1.AddMethod = UTAM_ADD_ALWAYS; OutlineRectangle1.DrawingType = DRAWING_RECTANGLEHIGHLIGHT; OutlineRectangle1.BeginIndex = sc.Index - 5; OutlineRectangle1.EndIndex = sc.Index - 2; OutlineRectangle1.BeginValue = sc.Low[sc.Index - 2] - 1; OutlineRectangle1.EndValue = sc.Low[sc.Index - 2] - 2; OutlineRectangle1.Color = RGB(255,0,0); OutlineRectangle1.SecondaryColor = RGB(255,0,0); OutlineRectangle1.TransparencyLevel = 0; OutlineRectangle1.LineWidth = 2; OutlineRectangle1.DrawOutlineOnly = 1; sc.UseTool(OutlineRectangle1); s_UseTool OutlineRectangle2; OutlineRectangle2.Clear(); OutlineRectangle2.ChartNumber = sc.ChartNumber; OutlineRectangle2.Region = sc.GraphRegion; OutlineRectangle2.AddMethod = UTAM_ADD_ALWAYS; OutlineRectangle2.DrawingType = DRAWING_RECTANGLEHIGHLIGHT; OutlineRectangle2.BeginIndex = sc.Index - 5; OutlineRectangle2.EndIndex = sc.Index - 2; OutlineRectangle2.BeginValue = sc.Low[sc.Index - 2] - 2; OutlineRectangle2.EndValue = sc.Low[sc.Index - 2] - 3; OutlineRectangle2.Color = RGB(255,0,0); //OutlineRectangle.SecondaryColor = RGB(255,0,0); OutlineRectangle2.TransparencyLevel = 0; OutlineRectangle2.LineWidth = 2; OutlineRectangle2.DrawOutlineOnly = 1; sc.UseTool(OutlineRectangle2); s_UseTool OutlineRectangle3; OutlineRectangle3.Clear(); OutlineRectangle3.ChartNumber = sc.ChartNumber; OutlineRectangle3.Region = sc.GraphRegion; OutlineRectangle3.AddMethod = UTAM_ADD_ALWAYS; OutlineRectangle3.DrawingType = DRAWING_RECTANGLEHIGHLIGHT; OutlineRectangle3.BeginIndex = sc.Index - 5; OutlineRectangle3.EndIndex = sc.Index - 2; OutlineRectangle3.BeginValue = sc.Low[sc.Index - 2] - 3; OutlineRectangle3.EndValue = sc.Low[sc.Index - 2] - 4; OutlineRectangle3.Color = RGB(255,0,0); //OutlineRectangle.SecondaryColor = RGB(255,0,0); OutlineRectangle3.TransparencyLevel = 100; OutlineRectangle3.LineWidth = 2; OutlineRectangle3.DrawOutlineOnly = 1; sc.UseTool(OutlineRectangle3); } return; } The first rectangle is filled as expected. The second rectangle I would expect to be only an outline as DrawOutlineOnly = 1, but it is filled with the SecondaryColor value. The third rectangle is a test to see whetner the SecondaryColor value was the problem but it is not the case. Null value for SecondaryColor fills with black. The fourth rectangle is an outline but this is because of TransparencyLevel = 100. I am cautious of this parameter because of possible effects on performance. Am I missing something here or is DrawOutlineOnly non-functional currently? Thx Lee. |
[2018-01-15 07:43:27] |
Sierra Chart Engineering - Posts: 104368 |
This is still pending.
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-16 09:47:17] |
Sierra Chart Engineering - Posts: 104368 |
This will be resolved in the next release. The way this is currently implemented is that you also have to specify the transparency to 100 to prevent the fill. The fourth rectangle is an outline but this is because of TransparencyLevel = 100. I am cautious of this parameter because of possible effects on performance. 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: