I am using RenderTarget.DrawGeometry() in my indicator to paint a custom shape in OnRender(). Works great and no problem. Today I added a method to draw text using RenderTarget.DrawTextLayout() and I am getting Access Violation errors relating to writing to protected memory. Huh?
Is this a device context issue or a factory issue or something altogether that I am missing? If I get rid of the text writing method, all is good. The moment I add the text writing method, I get the error. I call the text method from inside the shape drawing method during OnRender().
Any suggestions how to debug this would be greatly appreciated. Thank you.
EDIT: I wonder if this occurs because I have multiple Render targets: the shape and the text.How should I handle multiple Render targets?
Comment