How-To: Define highlight style

The default highlight style is defined with the name “highlight_style”. But you can define your highlight style.

HPS.SegmentKey highlightStyle = HPS.Database.CreateRootSegment();
highlightStyle.GetMaterialMappingControl().
              SetFaceColor(new RGBAColor(1, 0, 0)).
              SetEdgeColor(new RGBAColor(1, 0, 0)).
              SetVertexColor(new RGBAColor(1, 0, 0)).
              SetMarkerColor(new RGBAColor(1, 0, 0)).
              SetLineColor(new RGBAColor(1, 0, 0)).
              SetTextColor(new RGBAColor(1, 0, 0));

HPS.PortfolioKey portfolio = GetSprocketsControl().Canvas.GetPortfolioKey();
portfolio.DefineNamedStyle("my_highlight_style", highlightStyle);

HPS.HighlightOptionsKit highlight_options = HPS.HighlightOptionsKit.GetDefault();
highlight_options.SetStyleName("my_highlight_style");