Exemplo n.º 1
0
 public DGTransformation Mix(DGTransformation other)
 {
     return new DGTransformation()
     {
         ScalingX = this.ScalingX * other.ScalingX,
         ScalingY = this.ScalingY * other.ScalingY,
         ScalingCenter = other.ScalingCenter.ClientTo(this.ScalingCenter),
         Transparency = this.Transparency * other.Transparency,
     };
 }
Exemplo n.º 2
0
 public DrawingGraphics(Graphics gr, Image canvasImage)
 {
     this.Graphics = gr;
     this.canvasImage = canvasImage;
     this.state = new DrawingHelperState(this.ValidateExtendsFromLogic);
     this.drawingExtends = new Rectangle();
     this.MaxWidth = canvasImage.Width;
     this.MaxHeight = canvasImage.Height;
     this.transformation = DGTransformation.Empty;
 }
Exemplo n.º 3
0
        public IDrawingGraphics CreateChild(Point innerlocation, DGTransformation t)
        {
            var childLocation = innerlocation.ToPixels().ToParent(this.Location);
            var childMaxWidth = this.MaxWidth - (childLocation.X - this.Location.X);

            var g = this.Graphics;
            var child = FromGraphicsLocationMaxWidth(g, this.canvasImage, childLocation.X, childLocation.Y, childMaxWidth);
            if (t != null)
                child.transformation = t;
            return child;
        }