Пример #1
0
 public DXCanvasState(float dpi, RenderTarget renderTarget)
 {
     _dpi          = dpi;
     _renderTarget = renderTarget;
     _parentState  = null;
     SetToDefaults();
 }
Пример #2
0
        public DXCanvasState(DXCanvasState prototype) : base(prototype)
        {
            _dpi         = prototype.Dpi;
            _parentState = prototype;

            _renderTarget = prototype._renderTarget;

            _strokeBrush = prototype._strokeBrush;
            _fillBrush   = prototype._fillBrush;
            _fontBrush   = prototype._fontBrush;
            _shadowColor = prototype._shadowColor;

            _sourceStrokeColor = prototype._sourceStrokeColor;
            _sourceFillpaint   = prototype._sourceFillpaint;
            _sourceFillColor   = prototype._sourceFillColor;
            _sourceFontColor   = prototype._sourceFontColor;
            _sourceShadowColor = prototype._sourceShadowColor;

            _strokeBrushValid = prototype._strokeBrushValid;
            _fillBrushValid   = prototype._fillBrushValid;
            _fontBrushValid   = prototype._fontBrushValid;
            _shadowColorValid = prototype._shadowColorValid;

            _dashes                = prototype._dashes;
            _strokeStyle           = prototype._strokeStyle;
            _strokeStyleProperties = prototype._strokeStyleProperties;
            _needsStrokeStyle      = prototype._needsStrokeStyle;

            IsShadowed   = prototype.IsShadowed;
            ShadowOffset = prototype.ShadowOffset;
            ShadowBlur   = prototype.ShadowBlur;

            Matrix = new Matrix3x2(prototype.Matrix.ToArray());

            FontName   = prototype.FontName;
            FontSize   = prototype.FontSize;
            FontWeight = prototype.FontWeight;
            FontStyle  = prototype.FontStyle;

            _alpha = prototype._alpha;
            _scale = prototype._scale;

            IsBlurred  = prototype.IsBlurred;
            BlurRadius = prototype.BlurRadius;
        }