Question 1
How can I retrieve the Color of a Stroke when defined by:
State.Defaults
MyStroke = new Stroke(Brushes.Blue);
Properties
{Display(ResourceType = typeof(Custom.Resource), Name = "NinjaSCriptDrawingToolTextOutLineStroke", GroupName = "NinjaScriptGeneral", Order = 6)]
Stroke MyStroke {get; set;}
EDIT:
Or convert the Hex to RGB so that I can define a Brush using
Brush myBrush = new Brush(Color.FromRgb(number, number, number));
myBrush.Freeze();
I found "A" solution. But I have no idea if I am flirting with disaster.
In OnRender
fillBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(myStroke.Brush.ToString()));
fillBrush.Opacity = fillOpacity / 100d;
fillBrush,Freeze();
fillBrushDevice.Brush = null;
fillBrushDevice.Brush = fillBrush;
RenderTarget.FillRectangle(rect, fillBrushDevice.BrushDX);
Question 2
When drawing a NT standard Rectangle, in the Editing Window is it possible to change the display "OutLine" to something else like "My Super Secret Outline"? If so, how? Any sample code, snippet, or other drawing tools that do that?
Thanks.
Comment