프로젝트

일반

사용자정보

개정판 025ebf74

ID025ebf74a8d164298bf2a7c44fd6636dca5aba3e
상위 277df14f
하위 57906f93

백흠경이(가) 5년 이상 전에 추가함

issue #923: fixed a problem text control doesn't rotate

Change-Id: I0a45f13948b9aa2966639ec47c48d685afd11c09

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
1121 1121
        {
1122 1122
            double scale = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ContentScale;
1123 1123
            var tmp = Mouse.GetPosition(Window.GetWindow((DependencyObject)sender));
1124
            
1125
            var horzChange = Math.Round(tmp.X - this.CurrentMousePoint.X) / scale;
1126
            var vertChange = Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale;
1124

  
1125
            var horzChange = (tmp.X - this.CurrentMousePoint.X) / scale;/// Math.Round(tmp.X - this.CurrentMousePoint.X) / scale;
1126
            var vertChange = (tmp.Y - this.CurrentMousePoint.Y) / scale;///Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale;
1127 1127
            try
1128 1128
            {
1129 1129
                DragThumb.Cursor = Cursors.SizeAll;
......
1215 1215
                        case ControlType.TextControl:
1216 1216
                            (member.DrawingData as CommentUserInfo).Angle = AngleValue;
1217 1217

  
1218
                            //RectangleGeometry Data = new RectangleGeometry
1219
                            //{
1220
                            //    Rect = new Rect()
1221
                            //    {
1222
                            //        X = Canvas.GetLeft((member.DrawingData as TextControl)),
1223
                            //        Y = Canvas.GetTop((member.DrawingData as TextControl)),
1224
                            //        Width = (member.DrawingData as TextControl).Base_TextBlock.ActualWidth / 2,
1225
                            //        Height = (member.DrawingData as TextControl).Base_TextBlock.ActualHeight / 2,
1226
                            //    }
1227
                            //};
1228

  
1229
                            //Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom);
1230
                            //Point middle = MathSet.getMiddlePoint((member.DrawingData as TextControl).StartPoint, endPointV);
1231

  
1232 1218
                            DragThumb.RenderTransformOrigin = new Point(0, 0);
1233 1219
                            DragThumb.RenderTransform = new RotateTransform()
1234 1220
                            {
......
1239 1225
                            AdornerBorder.RenderTransformOrigin = new Point(0, 0);
1240 1226
                            AdornerBorder.RenderTransform = new RotateTransform()
1241 1227
                            {
1242
                                //Angle = (member.DrawingData as TextControl).Angle,
1243 1228
                                Angle = (member.DrawingData as CommentUserInfo).Angle
1244 1229
                            };
1245 1230

  
1246
                            //(member.DrawingData as TextControl).Base_Grid.RenderTransform = new RotateTransform()
1247
                            //{
1248
                            //    //Angle = (member.DrawingData as TextControl).Angle,
1249
                            //    Angle = (member.DrawingData as CommentUserInfo).Angle
1250
                            //};
1251

  
1252 1231
                            (member.DrawingData as TextControl).Angle = AngleValue;
1253 1232

  
1254 1233
                            (member.DrawingData as CommentUserInfo).UpdateControl();
KCOM/Events/PasteCommand.cs
109 109
                }
110 110
                Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet);
111 111

  
112
                double realPointX = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
113
                double realPointY = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
114
                final.TranslateItems(realPointX, realPointY);
115

  
116
                if (final.Members.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
117
                {
118
                    final.TranslateItems(0.001, 0.001); //dummy
119
                }
112
                /// place controls at current mouse position
113
                var diff = Point.Subtract(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.getCurrentPoint, final.Centeroid);
114
                final.TranslateItems(diff.X, diff.Y);
115

  
116
                //if (final.Members.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
117
                //{
118
                //    final.TranslateItems(0.001, 0.001); //dummy
119
                //}
120 120

  
121 121
                Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
122 122
            }
KCOM/Views/MainMenu.xaml.cs
634 634
            inkBoard.Height = zoomAndPanCanvas.Height;
635 635

  
636 636

  
637

  
638 637
            if (!testPanel2.IsHidden)
639 638
            {
640 639
                Logger.sendCheckLog("pageNavigator_PageChanging_!testPanel2.IsHidden 일 때", 1);
......
732 731

  
733 732
        }
734 733

  
735

  
736
        
737

  
738 734
        private void SetCommentPages(bool onlyMe = false)
739 735
        {
740 736
            Logger.sendCheckLog("pageNavigator_PageChanging_SetCommentPages Setting", 1);
MarkupToPDF/Controls/Shape/TriControl.cs
445 445
        /// <param name="delta"></param>
446 446
        public override void OnMoveCtrlPoint(Point pt, double dx, double dy)
447 447
        {
448
            Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt);
448
            Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt);    ///TODO: 위험 요소를 가지고 있음.
449 449
            selected.X += dx;
450 450
            selected.Y += dy;
451 451
            for (int i = 0; i < (this as IPath).PointSet.Count; i++)
MarkupToPDF/Controls/Text/TextControl.cs
922 922
            }
923 923
        }
924 924

  
925
        public double Angle
925
        public override double Angle
926 926
        {
927 927
            get { return (double)GetValue(AngleProperty); }
928 928
            set

내보내기 Unified diff

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