示例#1
0
        public Pen CreatePen(PenHighlightOptions options)
        {
            switch (options.Style)
            {
            case ColourStyle.Linear:
                return(this.CreateLinearPen(options.BaseColour, options.LinearEndColour));

            case ColourStyle.None:
                return(this.CreateTransparentPen());

            case ColourStyle.Default:
            case ColourStyle.Solid:
            default:
                return(this.CreateSolidPen(options.BaseColour));
            }
        }
示例#2
0
        public GeometryDrawing CreateCoveredHighlight(Geometry geometry)
        {
            var borderPenOptions = new PenHighlightOptions
            {
                BaseColour      = CoverageResultsProvider.Instance.Options.CoveredBorderColour,
                Style           = CoverageResultsProvider.Instance.Options.BorderStyle,
                LinearEndColour = CoverageResultsProvider.Instance.Options.CoveredBorderLinearEndColour,
            };

            var fillBrushOptions = new BrushHighlightOptions
            {
                BaseColour      = CoverageResultsProvider.Instance.Options.CoveredColour,
                Style           = CoverageResultsProvider.Instance.Options.HighlightStyle,
                LinearEndColour = CoverageResultsProvider.Instance.Options.CoveredLinearEndColour,
            };

            var borderPen = new PenFactory().CreatePen(borderPenOptions);
            var fillBrush = new BrushFactory().CreateBrush(fillBrushOptions);

            return(new GeometryDrawing(fillBrush, borderPen, geometry));
        }