コード例 #1
0
 public InteractiveImage(Bitmap image, int x, int y)
     : this(image)
 {
     this.position         = new Point(x, y, 0);
     this.originalPosition = new Point(x, y, 0);
     this.originalSize     = new Size(image.Width / 3, image.Height / 3);
     this.SetSize(this.originalSize);
 }
コード例 #2
0
 public InteractiveImage(Bitmap image, int x, int y)
     : this(image)
 {
     this.position = new Point(x, y, 0);
     this.originalPosition = new Point(x, y, 0);
     this.originalSize = new Size(image.Width / 3, image.Height / 3);
     this.SetSize(this.originalSize);
 }
コード例 #3
0
ファイル: InteractiveImage.cs プロジェクト: an83/KinectTouch2
        public void Resize(Point startDragPoint, Point startDragPoint2, Point center1, Point center2)
        {
            this.transformation.FindTransformation(startDragPoint, startDragPoint2, center1, center2);
            var newSize = new Size(this.size.Width * transformation.Scale, this.size.Height * transformation.Scale);
            if (transformation.Scale > 1.4 || transformation.Scale < 0.6)
            {
                return;
            }

            this.position.X -= (newSize.Width - this.size.Width) / 2;
            this.position.Y -= (newSize.Height - this.size.Height) / 2;
            this.SetSize(newSize);
        }
コード例 #4
0
        public void Resize(Point startDragPoint, Point startDragPoint2, Point center1, Point center2)
        {
            this.transformation.FindTransformation(startDragPoint, startDragPoint2, center1, center2);
            var newSize = new Size(this.size.Width * transformation.Scale, this.size.Height * transformation.Scale);

            if (transformation.Scale > 1.4 || transformation.Scale < 0.6)
            {
                return;
            }

            this.position.X -= (newSize.Width - this.size.Width) / 2;
            this.position.Y -= (newSize.Height - this.size.Height) / 2;
            this.SetSize(newSize);
        }
コード例 #5
0
 private void SetSize(Size size)
 {
     this.size = size;
     this.bitmap = (Bitmap) ImageOperations.FastResize(this.originalImage, (int)size.Width, (int)size.Height);
 }
コード例 #6
0
 public InteractiveImage(Bitmap image)
 {
     this.originalImage = image;
     this.bitmap = image;
     this.size = new Size(image.Width, image.Height);
 }
コード例 #7
0
 private void SetSize(Size size)
 {
     this.size   = size;
     this.bitmap = (Bitmap)ImageOperations.FastResize(this.originalImage, (int)size.Width, (int)size.Height);
 }
コード例 #8
0
 public InteractiveImage(Bitmap image)
 {
     this.originalImage = image;
     this.bitmap        = image;
     this.size          = new Size(image.Width, image.Height);
 }