コード例 #1
0
        public Canvas(System.Windows.Media.DrawingContext drawingContext, IRenderTarget target, ImageLoader imageLoader)
        {
            _drawingContext = drawingContext;
            _target         = target;
            _imageLoader    = imageLoader;

            _transform = new Transform();

            _strokeColor = new System.Windows.Media.SolidColorBrush();
            _stroke      = new System.Windows.Media.Pen(_strokeColor, 1);

            _fillColor   = new System.Windows.Media.SolidColorBrush();
            _fontStyle   = FontStyles.Normal;
            _fontWeight  = FontWeights.Normal;
            _fontStretch = FontStretches.Normal;

            _groups      = new Dictionary <string, Group>();
            _activeGroup = new Group(Rect.Empty, new Transform());
        }