프로젝트

일반

사용자정보

개정판 ab7fe8c0

IDab7fe8c0b83f154298a3e83f937c7f7e21525bd0
상위 403b1956
하위 206e2c45

백흠경이(가) 9달 전에 추가함

Fix: Sign, Image Control에서 AxisLock이 설정되어 있으면 혹은 Shift Key를 누르면 크기를 정비율로 수정되도록 수정

Change-Id: I2f4b32afd4792e40bc896de780751c4680c9deee

차이점 보기:

MarkupToPDF/Controls/Etc/ImgControl.cs
391 391
                }
392 392
            }
393 393

  
394
            var ReverseP = (i + path.PointSet.Count() / 2) % path.PointSet.Count();
395
            var PreviousP = (i + (path.PointSet.Count() - 1)) % path.PointSet.Count();
396
            var NextP = (i + 1) % path.PointSet.Count();
394
            var OppositeP = (i + path.PointSet.Count / 2) % path.PointSet.Count;
395
            var PreviousP = (i + (path.PointSet.Count - 1)) % path.PointSet.Count;
396
            var NextP = (i + 1) % path.PointSet.Count;
397
            if (bAxisLocked)
398
            {
399
                double _dx = path.PointSet[i].X - path.PointSet[OppositeP].X;
400
                double _dy = path.PointSet[i].Y - path.PointSet[OppositeP].Y;
401
                double distance = Math.Max(Math.Abs(_dx), Math.Abs(_dy));
397 402

  
398
            var distance = MathSet.DistanceTo(path.PointSet[ReverseP], path.PointSet[i]);
403
                var PreviousV = path.PointSet[PreviousP] - path.PointSet[OppositeP];
404
                PreviousV.Normalize();
405
                path.PointSet[PreviousP] = path.PointSet[OppositeP] + PreviousV * distance;
399 406

  
400
            var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[PreviousP]);
401
            var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X,
402
                path.PointSet[i].Y - path.PointSet[ReverseP].Y);
403
            path.PointSet[PreviousP] = new Point(path.PointSet[ReverseP].X + PreviousV.X * l, path.PointSet[ReverseP].Y + PreviousV.Y * l);
407
                var NextV = path.PointSet[NextP] - path.PointSet[OppositeP];
408
                NextV.Normalize();
409
                path.PointSet[NextP] = path.PointSet[OppositeP] + NextV * distance;
404 410

  
405
            var NextV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[NextP]);
406
            l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X, path.PointSet
407
                [i].Y - path.PointSet[ReverseP].Y);
408
            path.PointSet[NextP] = new Point(path.PointSet[ReverseP].X + NextV.X * l, path.PointSet[ReverseP].Y + NextV.Y * l);
411
                path.PointSet[i] = path.PointSet[OppositeP] + PreviousV * distance + NextV * distance;
412
            }
413
            else
414
            {
415
                var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[PreviousP]);
416
                var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X,
417
                    path.PointSet[i].Y - path.PointSet[OppositeP].Y);
418
                path.PointSet[PreviousP] = new Point(path.PointSet[OppositeP].X + PreviousV.X * l, path.PointSet[OppositeP].Y + PreviousV.Y * l);
419

  
420
                var NextV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[NextP]);
421
                l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X, path.PointSet
422
                    [i].Y - path.PointSet[OppositeP].Y);
423
                path.PointSet[NextP] = new Point(path.PointSet[OppositeP].X + NextV.X * l, path.PointSet[OppositeP].Y + NextV.Y * l);
424
            }
409 425

  
410 426
            this.UpdateControl();
411 427
        }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)