コード例 #1
0
        private IPaint CreateScaleBarPaint(Color color, float strokeWidth, Style style)
        {
            IPaint paint = this.graphicFactory.CreatePaint();

            paint.Color       = color;
            paint.StrokeWidth = strokeWidth * this.displayModel.ScaleFactor;
            paint.Style       = style;
            paint.StrokeCap   = Cap.SQUARE;
            return(paint);
        }
コード例 #2
0
        /// <summary>
        /// Fills the area outside the specificed rectangle with color. Use this method when
        /// overpainting with a transparent color as it sets the PorterDuff mode.
        /// This method is used to blank out areas that fall outside the map area. </summary>
        /// <param name="color"> the fill color for the outside area </param>
        /// <param name="insideArea"> the inside area on which not to draw </param>
        internal virtual void FillOutsideAreas(Color color, Rectangle insideArea)
        {
            if (canvas == null)
            {
                return;
            }

            this.canvas.SetClipDifference((int)insideArea.Left, (int)insideArea.Top, (int)insideArea.Width, (int)insideArea.Height);
            this.canvas.FillColor(color);
            this.canvas.ResetClip();
        }
コード例 #3
0
        private IPaint CreateTextPaint(Color color, float strokeWidth, Style style)
        {
            IPaint paint = this.graphicFactory.CreatePaint();

            paint.Color       = color;
            paint.StrokeWidth = strokeWidth * this.displayModel.ScaleFactor;
            paint.Style       = style;
            paint.SetTypeface(FontFamily.DEFAULT, FontStyle.BOLD);
            paint.TextSize = 12 * this.displayModel.ScaleFactor;

            return(paint);
        }