프로젝트

일반

사용자정보

개정판 fdab8f9c

IDfdab8f9c07078c0f86cf7f574c82da2f5a37cc5f
상위 24da769b
하위 e6c46927, 1f112f94

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

Fix: 페이지가 회전되었을때 꺽인점 오류 수정

Change-Id: Ib1f59ce6e1ea93fe375f5ead8eac77f47297acb0

차이점 보기:

KCOM/Events/Implementation/TopMenuEvent.cs
1495 1495
        {
1496 1496
            var instanceMain = this.ParentOfType<MainWindow>();
1497 1497

  
1498
            //if (rotateOffSet > 3)
1499
            //    rotateOffSet = 0;
1500

  
1501
            //if (rotateOffSet < 0)
1502
            //    rotateOffSet = 3;
1503

  
1504 1498
            if(Flag)
1505 1499
            {
1506 1500
                if (instanceMain.dzMainMenu.rotate.Angle == 270)
......
1591 1585
                instanceMain.dzMainMenu.pageNavigator.GotoPage(data.PageNumber);
1592 1586

  
1593 1587
                //rotation page add or update
1594
                var rotationdoc = ViewerDataModel.Instance.RotationDocs.Where(d => d.ID == instance.ID).FirstOrDefault();
1588
                var rotationdoc = ViewerDataModel.Instance.RotationDocs.Find(d => d.ID == instance.ID);
1595 1589
                if (rotationdoc != null)
1596 1590
                {
1597 1591
                    rotationdoc.PAGE_ANGLE = instance.PAGE_ANGLE;
MarkupToPDF/Controls/Text/ArrowTextControl.cs
1036 1036
        private List<Point> GetConnectionPointList()
1037 1037
        {
1038 1038
            List<Point> res = new List<Point>();
1039
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox))); //상단
1040
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth / 2, Canvas.GetTop(Base_TextBox) + this.BoxHeight)); // 하단
1041
            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxHeight / 2)); //좌단
1042
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxWidth, Canvas.GetTop(Base_TextBox) + this.BoxHeight / 2));  //우단
1039

  
1040
            double AxisX = 1;
1041
            double AxisY = 1;
1042
            double _BoxWidth = this.BoxWidth;
1043
            double _BoxHeight = this.BoxHeight;
1044

  
1045
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox))); //상단
1046
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight)); // 하단
1047
            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + AxisY * this.BoxHeight * 0.5)); //좌단
1048
            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5));  //우단
1043 1049

  
1044 1050
            if (isTrans)
1045 1051
            {
......
1047 1053
                {
1048 1054
                    case "90":
1049 1055
                        {
1050
                            res.Clear();
1051

  
1052
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽
1053
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth / 2)); // 위 중간
1054
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth)); // 위 오른쪽
1055

  
1056
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox))); //왼쪽 중간
1057
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox))); //왼쪽 하단
1056
                            _BoxWidth = this.BoxHeight;
1057
                            _BoxHeight = this.BoxWidth;
1058
                            AxisX = 1;
1059
                            AxisY = -1;
1058 1060

  
1059
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) - this.BoxWidth / 2)); //중간 하단
1060
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) - this.BoxWidth)); //오른쪽 하단
1061
                            res.Clear();
1061 1062

  
1062
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) - this.BoxWidth)); //오른쪽 중간
1063
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight)); ///상단
1064
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox))); /// 하단
1065
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); /// 좌단
1066
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); /// 우단
1063 1067
                        }
1064 1068
                        break;
1065 1069
                    case "270":
1066 1070
                        {
1067
                            res.Clear();
1068

  
1069
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽
1070
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); // 위 중간
1071
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth)); // 위 오른쪽
1072

  
1073
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight / 2, Canvas.GetTop(Base_TextBox))); //왼쪽 중간
1074
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox))); //왼쪽 하단
1071
                            _BoxWidth = this.BoxHeight;
1072
                            _BoxHeight = this.BoxWidth;
1073
                            AxisX = -1;
1074
                            AxisY = 1;
1075 1075

  
1076
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); //중간 하단
1077
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 하단
1076
                            res.Clear();
1078 1077

  
1079
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 중간
1078
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox))); //상단
1079
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight)); // 하단
1080
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth , Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); //왼쪽 아래
1081
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5));
1080 1082
                        }
1081 1083
                        break;
1082 1084
                    default:
......
1089 1091
                {
1090 1092
                    case "90":
1091 1093
                        {
1092
                            res.Clear();
1093

  
1094
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽
1095
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth / 2)); // 위 중간
1096
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) - this.BoxWidth)); // 위 오른쪽
1094
                            _BoxWidth = this.BoxHeight;
1095
                            _BoxHeight = this.BoxWidth;
1096
                            AxisX = 1;
1097
                            AxisY = -1;
1097 1098

  
1098
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox))); //왼쪽 중간
1099
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox))); //왼쪽 하단
1099
                            res.Clear();
1100 1100

  
1101
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) - this.BoxWidth / 2)); //중간 하단
1102
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight, Canvas.GetTop(Base_TextBox) - this.BoxWidth)); //오른쪽 하단
1103
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) - this.BoxWidth)); //오른쪽 중간 
1101
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight)); ///상단
1102
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox))); /// 하단
1103
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); /// 좌단
1104
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); /// 우단
1104 1105
                        }
1105 1106
                        break;
1106 1107
                    case "270":
1107 1108
                        {
1108
                            res.Clear();
1109
                            _BoxWidth = this.BoxHeight;
1110
                            _BoxHeight = this.BoxWidth;
1111
                            AxisX = -1;
1112
                            AxisY = 1;
1109 1113

  
1110
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox))); //위 왼쪽
1111
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); // 위 중간
1112
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + this.BoxWidth)); // 위 오른쪽
1113

  
1114
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight / 2, Canvas.GetTop(Base_TextBox))); //왼쪽 중간
1115
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox))); //왼쪽 하단
1116

  
1117
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth / 2)); //중간 하단
1118
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 하단
1114
                            res.Clear();
1119 1115

  
1120
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) - this.BoxHeight / 2, Canvas.GetTop(Base_TextBox) + this.BoxWidth)); //오른쪽 중간 
1116
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox))); //상단
1117
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth * 0.5, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight)); // 하단
1118
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox) + AxisX * _BoxWidth, Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5)); //왼쪽 아래
1119
                            res.Add(new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox) + AxisY * _BoxHeight * 0.5));
1121 1120
                        }
1122 1121
                        break;
1123 1122
                    default:
......
1150 1149
                        {
1151 1150
                            if (ConnectionPointList[0] == connection) //상단
1152 1151
                            {
1153
                                Vector dir = new Vector(0, 1);
1152
                                Vector dir = new Vector(0, -1);
1154 1153
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1155 1154
                                BendingPoint = connection + dir * BendingLength;
1156 1155
                            }
1157 1156
                            else if (ConnectionPointList[1] == connection) //하단
1158 1157
                            {
1159
                                Vector dir = new Vector(0, -1);
1158
                                Vector dir = new Vector(0, 1);
1160 1159
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1161 1160
                                BendingPoint = connection + dir * BendingLength;
1162 1161
                            }
......
1195 1194
                            }
1196 1195
                            else if (ConnectionPointList[2] == connection) //좌단
1197 1196
                            {
1198
                                Vector dir = new Vector(1, 0);
1197
                                Vector dir = new Vector(-1, 0);
1199 1198
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1200 1199
                                BendingPoint = connection + dir * BendingLength;
1201 1200
                            }
1202 1201
                            else if (ConnectionPointList[3] == connection) //우단
1203 1202
                            {
1204
                                Vector dir = new Vector(-1, 0);
1203
                                Vector dir = new Vector(1, 0);
1205 1204
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1206 1205
                                BendingPoint = connection + dir * BendingLength;
1207 1206
                            }
......
1257 1256
                        {
1258 1257
                            if (ConnectionPointList[0] == connection) //상단
1259 1258
                            {
1260
                                Vector dir = new Vector(-1, 0);
1259
                                Vector dir = new Vector(0, -1);
1261 1260
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1262 1261
                                BendingPoint = connection + dir * BendingLength;
1263 1262
                            }
1264 1263
                            else if (ConnectionPointList[1] == connection) //하단
1265 1264
                            {
1266
                                Vector dir = new Vector(1, 0);
1265
                                Vector dir = new Vector(0, 1);
1267 1266
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1268 1267
                                BendingPoint = connection + dir * BendingLength;
1269 1268
                            }
......
1290 1289
                        {
1291 1290
                            if (ConnectionPointList[0] == connection) //상단
1292 1291
                            {
1293
                                Vector dir = new Vector(1, 0);
1292
                                Vector dir = new Vector(0, -1);
1294 1293
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1295 1294
                                BendingPoint = connection + dir * BendingLength;
1296 1295
                            }
1297 1296
                            else if (ConnectionPointList[1] == connection) //하단
1298 1297
                            {
1299
                                Vector dir = new Vector(-1, 0);
1298
                                Vector dir = new Vector(0, 1);
1300 1299
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1301 1300
                                BendingPoint = connection + dir * BendingLength;
1302 1301
                            }
1303 1302
                            else if (ConnectionPointList[2] == connection) //좌단
1304 1303
                            {
1305
                                Vector dir = new Vector(1, 0);
1304
                                Vector dir = new Vector(-1, 0);
1306 1305
                                double BendingLength = offset.Length == 0 ? _BendingLineLength : Math.Abs(dir.Dot(offset));
1307 1306
                                BendingPoint = connection + dir * BendingLength;
1308 1307
                            }
......
1399 1398

  
1400 1399
                    //20180910 LJY 각도에 따라.
1401 1400
                    this.MidPoint = BendingPoint.Value;
1401
                    instanceGroup.Children.Add(DrawSet.DrawArrow(BendingPoint.Value, this.StartPoint, this.LineSize));
1402 1402
                }
1403
                instanceGroup.Children.Add(DrawSet.DrawArrow(BendingPoint.Value, this.StartPoint, this.LineSize));
1404 1403
                instanceGroup.FillRule = FillRule.Nonzero;
1405 1404
                this.Base_ArrowPath.Fill = this.StrokeColor;
1406 1405
                this.Base_ArrowSubPath.Fill = this.StrokeColor;

내보내기 Unified diff

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