public void Init(int outputWidth, int outputHeight, Style.LayerStyle layerStyle, Metrics metrics)
        {
            _metrics    = metrics;
            _width      = outputWidth;
            _height     = outputHeight;
            _layerStyle = layerStyle;


            _bmp = new Bitmap(_width, _height);
            if (_layerStyle == null)
            {
                _layerStyle = new LayerStyle(Color.OrangeRed, Color.White, 1);
            }

            _graphics               = Graphics.FromImage(_bmp);
            _graphics.Clip          = new Region(new Rectangle(0, 0, _width, _height));
            _graphics.SmoothingMode = _smoothingMode;             // existe aussi HighSpeed ou HighQuality


            _gpFill    = new GraphicsPath();
            _gpStroke  = new GraphicsPath();
            _fillBrush = new SolidBrush(_layerStyle.FillColor);
            _strokePen = new Pen(_layerStyle.StrokeColor, _layerStyle.StrokeThickness);
        }
Esempio n. 2
0
 public void Init(CoordinateConverters.CoordinateConverterBase coordConverter, int outputWidth, int outputHeight, Style.LayerStyle layerStyle, Metrics metrics)
 {
     _coordConverter = coordConverter;
 }