프로젝트

일반

사용자정보

개정판 4f017ed3

ID4f017ed300546aa9269405c789f27a9b4fbadb49
상위 d2279f18
하위 324fcf3e

김태성이(가) 약 4년 전에 추가함

Final ArrowTextControl 수정

Change-Id: Ifdd9876909e6a4ce288d70acb74a00b37e88e6a0

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/Controls/Common/MathSet.cs
68 68

  
69 69
        public static Point getNearPoint(List<Point> pointList, Point setPoint)
70 70
        {
71
            Point nearPoint = pointList.Select
72
            (n => new
73
                {
74
                    n, 
75
                    distance = Math.Sqrt
76
                    (
77
                        Math.Pow(
78
                                    (n.X - setPoint.X),2
79
                                )
80

  
81
                        + System.Math.Pow
82
                        (
83
                            (n.Y - setPoint.Y), 2
84
                        )
85
                    )
71
            var points = pointList.Select
72
             (n => new
73
             {
74
                 n,
75
                 distance = Math.Sqrt
76
                     (
77
                         Math.Pow(
78
                                     (n.X - setPoint.X), 2
79
                                 )
80

  
81
                         + System.Math.Pow
82
                         (
83
                             (n.Y - setPoint.Y), 2
84
                         )
85
                     )
86

  
87
             }
88
             ).OrderBy(p => p.distance);
89

  
90
            foreach (var item in points)
91
            {
92
                System.Diagnostics.Debug.WriteLine(item.n.X.ToString() + "," + item.n.Y.ToString());
93
            }
86 94

  
87
                }
88
            ).OrderBy(p => p.distance).First().n;
95

  
96
            Point nearPoint = points.First().n;
89 97

  
90 98
            return nearPoint;
91 99
        }
......
421 429
            Point endP = new Point(data.Right, data.Bottom);
422 430
            return MathSet.getMiddlePoint(startP, endP);
423 431
        }
432

  
433
        /// <summary>
434

  
435
        /// 최단거리 구하기
436

  
437
        /// </summary>
438

  
439
        /// <param name="point">포인트</param>
440

  
441
        /// <param name="listStartPoint">직선 시작 포인트</param>
442

  
443
        /// <param name="lineEndPoint">직선 종료 포인트</param>
444

  
445
        /// <param name="closestPoint">최근접 포인트</param>
446

  
447
        /// <returns>최단거리</returns>
448

  
449
        public static double GetShortestDistance(Point point, Point listStartPoint, Point lineEndPoint, out Point closestPoint)
450
        {
451
            double dx = lineEndPoint.X - listStartPoint.X;
452
            double dy = lineEndPoint.Y - listStartPoint.Y;
453

  
454
            if ((dx == 0) && (dy == 0))
455
            {
456
                closestPoint = listStartPoint;
457

  
458
                dx = point.X - listStartPoint.X;
459
                dy = point.Y - listStartPoint.Y;
460

  
461
                return Math.Sqrt(dx * dx + dy * dy);
462

  
463
            }
464

  
465
            double t = ((point.X - listStartPoint.X) * dx + (point.Y - listStartPoint.Y) * dy) / (dx * dx + dy * dy);
466

  
467
            if (t < 0)
468
            {
469
                closestPoint = new Point(listStartPoint.X, listStartPoint.Y);
470

  
471
                dx = point.X - listStartPoint.X;
472
                dy = point.Y - listStartPoint.Y;
473
            }
474
            else if (t > 1)
475
            {
476

  
477
                closestPoint = new Point(lineEndPoint.X, lineEndPoint.Y);
478

  
479
                dx = point.X - lineEndPoint.X;
480
                dy = point.Y - lineEndPoint.Y;
481

  
482
            }
483
            else
484
            {
485

  
486
                closestPoint = new Point(listStartPoint.X + t * dx, listStartPoint.Y + t * dy);
487

  
488
                dx = point.X - closestPoint.X;
489
                dy = point.Y - closestPoint.Y;
490

  
491
            }
492

  
493
            return Math.Sqrt(dx * dx + dy * dy);
494

  
495
        }
496

  
497
  
424 498
    }
425 499
}
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/DrawSet_DrawString.cs
72 72
            contentByte.SetLineWidth((float)lineSize);
73 73

  
74 74
            System.Drawing.Drawing2D.Matrix mat = new System.Drawing.Drawing2D.Matrix();
75
            mat.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)sp.X, (float)sp.Y));
75

  
76
            if (Angle == 180)
77
            {
78
                mat.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)sp.X, (float)sp.Y));
79
                mat.Translate((float)-rect.Width, (float)rect.Height);
80
            }
81
            else
82
                mat.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)sp.X, (float)sp.Y));
76 83

  
77 84
            /// transform text border
78 85
            System.Drawing.PointF[] border = new System.Drawing.PointF[4] 
......
176 183
        /// <param name="size"></param>
177 184
        /// <param name="opac"></param>
178 185
        /// <param name="Angle"></param>
179
        public static void DrawString_ArrowText(Point sp, Point ep, Point ptHead, Point ptMid, bool bIsFixed,
186
        public static void DrawString_ArrowText(Point sp, Point ep, Point ptHead, Point ptMid,Point ptEnd, bool bIsFixed,
180 187
            double lineSize, iTextSharp.text.pdf.PdfContentByte contentByte, SolidColorBrush color, PaintSet PaintStyle, double FontSize,
181 188
                                   bool isHighlight, FontFamily fontFamilly, FontStyle fontstyle, FontWeight fontweight, TextDecorationCollection isUnderline,
182 189
                                   string text, System.Drawing.SizeF size, double opac, double Angle)
183 190
        {
184 191
            Rect rect = new Rect(sp, ep);
192

  
185 193
            List<Point> points = new List<Point>
186 194
            {
187 195
                rect.TopLeft, rect.BottomLeft,
......
189 197
            };
190 198

  
191 199
            System.Drawing.Drawing2D.Matrix mat = new System.Drawing.Drawing2D.Matrix();
200

  
192 201
            mat.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)sp.X, (float)sp.Y));
193 202

  
203
            /// up to here
204
            
205
            DrawSet_Text.DrawString(sp, ep, lineSize, contentByte, color, PaintStyle, FontSize, fontFamilly, fontstyle, fontweight, isUnderline, text, size, opac, Angle);
206

  
194 207
            /// transform text border
195 208
            System.Drawing.PointF[] border = new System.Drawing.PointF[4]
196 209
            {
......
201 214
            };
202 215
            mat.TransformPoints(border);   /// transform if given angle is not 0
203 216
            var transformed = border.Select(param => new Point(param.X, param.Y)).ToList();
204
            /// up to here
205
            
206
            DrawSet_Text.DrawString(sp, ep, lineSize, contentByte, color, PaintStyle, FontSize, fontFamilly, fontstyle, fontweight, isUnderline, text, size, opac, Angle);
207
            DrawLeaderLine(ptHead, ptMid, bIsFixed, transformed, lineSize, contentByte, color, opac);
217

  
218
            if (Angle == 270 || Angle == 90)
219
            {
220
                ptEnd = MathSet.getNearPoint(transformed, ptMid);
221
            }
222

  
223
            DrawLeaderLineNew(ptHead, ptMid, ptEnd, bIsFixed, lineSize, contentByte, color, opac);
208 224
        }
209 225

  
210 226
        /// <summary>
......
251 267
            }
252 268
        }
253 269

  
270
        /// <summary>
271
        /// Markus의 box끝에 맞는부분과 틀려 별도로 만듬 
272
        /// 
273
        /// kimteaseong
274
        /// </summary>
275
        /// <param name="start"></param>
276
        /// <param name="mid"></param>
277
        /// <param name="bIsFixed"></param>
278
        /// <param name="border"></param>
279
        /// <param name="LineSize"></param>
280
        /// <param name="contentByte"></param>
281
        /// <param name="color"></param>
282
        /// <param name="opac"></param>
283
        private static void DrawLeaderLineNew(Point start, Point mid,Point end, bool bIsFixed,  double LineSize, iTextSharp.text.pdf.PdfContentByte contentByte, SolidColorBrush color, double opac)
284
        {
285
            Controls_PDF.DrawSet_Arrow.SingleAllow(start, bIsFixed ? mid : end, LineSize, contentByte, color, opac);
286
            Controls_PDF.DrawSet_Line.DrawLine(start, bIsFixed ? mid : end, LineSize, contentByte, new DoubleCollection(9999), color, opac);
287
            if (bIsFixed)
288
            {
289
                Controls_PDF.DrawSet_Line.DrawLine(mid, end, LineSize, contentByte, new DoubleCollection(9999), color, opac);
290
            }
291
        }
292

  
254 293
        private static void PaintFill(PdfContentByte contentByte, PaintSet PaintStyle, BaseColor bs)
255 294
        {
256 295
            if ((PaintStyle & PaintSet.Highlight) == PaintSet.Highlight)
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
699 699
                                                {
700 700
                                                    using (S_LineControl control = JsonSerializerHelper.JsonDeserialize<S_LineControl>(item))
701 701
                                                    {
702
                                                        string[] InnerData = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
703
                                                        Point StartPoint = GetPdfPointSystem(control.StartPoint);
704
                                                        Point EndPoint = GetPdfPointSystem(control.EndPoint);
705
                                                        DoubleCollection DashSize = control.DashSize;
706
                                                        List<Point> PointSet = GetPdfPointSystem(control.PointSet);
707

  
708
                                                        var Opacity = control.Opac;
709
                                                        string UserID = control.UserID;
710
                                                        double Interval = control.Interval;
711
                                                        double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(InnerData.First()));
712
                                                        Controls_PDF.DrawSet_Line.DrawLine(StartPoint, EndPoint, LineSize, contentByte, control.DashSize, _SetColor, Opacity);
713
                                                        switch (control.LineStyleSet)
714
                                                        {
715
                                                            case LineStyleSet.ArrowLine:
716
                                                                Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, _SetColor, Opacity);
717
                                                                break;
718
                                                            case LineStyleSet.CancelLine:
719
                                                                {
720
                                                                    var x = Math.Abs((Math.Abs(StartPoint.X) - Math.Abs(EndPoint.X)));
721
                                                                    var y = Math.Abs((Math.Abs(StartPoint.Y) - Math.Abs(EndPoint.Y)));
722

  
723
                                                                    if (x > y)
724
                                                                    {
725
                                                                        StartPoint = new Point(StartPoint.X, StartPoint.Y - (float)(control.Interval / 3.0));
726
                                                                        EndPoint = new Point(EndPoint.X, EndPoint.Y - (float)(control.Interval / 3.0));
727
                                                                        Controls_PDF.DrawSet_Line.DrawLine(StartPoint, EndPoint, LineSize, contentByte, DashSize, _SetColor, Opacity);
728
                                                                    }
729
                                                                }
730
                                                                break;
731
                                                            case LineStyleSet.TwinLine:
732
                                                                {
733
                                                                    Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, _SetColor, Opacity);
734
                                                                    Controls_PDF.DrawSet_Arrow.SingleAllow(StartPoint, EndPoint, LineSize, contentByte, _SetColor, Opacity);
735
                                                                }
736
                                                                break;
737
                                                            case LineStyleSet.DimLine:
738
                                                                {
739
                                                                    Controls_PDF.DrawSet_Arrow.DimAllow(StartPoint, EndPoint, LineSize, contentByte, _SetColor, Opacity);
740
                                                                    Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, _SetColor, Opacity);
741
                                                                    Controls_PDF.DrawSet_Arrow.SingleAllow(StartPoint, EndPoint, LineSize, contentByte, _SetColor, Opacity);
742
                                                                }
743
                                                                break;
744
                                                            default:
745
                                                                break;
746
                                                        }
747

  
748

  
702
                                                        DrawLine(control, contentByte, delimiterChars, delimiterChars2, _SetColor);
749 703
                                                    }
750 704
                                                }
751 705
                                                break;
......
755 709
                                                {
756 710
                                                    using (S_ArrowControl_Multi control = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item))
757 711
                                                    {
758
                                                        string[] InnerData = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
759
                                                        Point StartPoint = GetPdfPointSystem(control.StartPoint);
760
                                                        Point MidPoint = GetPdfPointSystem(control.MidPoint);
761
                                                        Point EndPoint = GetPdfPointSystem(control.EndPoint);
762
                                                        DoubleCollection DashSize = control.DashSize;
763
                                                        List<Point> PointSet = GetPdfPointSystem(control.PointSet);
764
                                                        double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(InnerData.First()));
765

  
766
                                                        double Opacity = control.Opac;
767

  
768
                                                        if (EndPoint == MidPoint)
769
                                                        {
770
                                                            Controls_PDF.DrawSet_Arrow.SingleAllow(MidPoint, StartPoint, LineSize, contentByte, _SetColor, Opacity);
771
                                                        }
772
                                                        else
773
                                                        {
774
                                                            Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, MidPoint, LineSize, contentByte, _SetColor, Opacity);
775
                                                        }
776

  
777
                                                        Controls_PDF.DrawSet_Line.DrawLine(PointSet, LineSize, contentByte, DashSize, _SetColor, Opacity);
778

  
712
                                                       DrawMultiArrowLine(control, contentByte, delimiterChars, delimiterChars2, _SetColor);
779 713
                                                    }
780 714
                                                }
781 715
                                                break;
......
963 897
                                            case "TextControl":
964 898
                                                using (S_TextControl control = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item))
965 899
                                                {
966
                                                    string[] data2 = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
967
                                                    string Text = control.Text;
900
                                                    DrawTextBox(control, contentByte, delimiterChars, delimiterChars2, _SetColor);
901
                                                 }
902
                                                break;
903
                                            #endregion
904
                                            #region ArrowTextControl
905
                                            case "ArrowTextControl":
906
                                                using (S_ArrowTextControl control = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item))
907
                                                {
908
                                                    //using (S_TextControl textcontrol = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item))
909
                                                    //{
910
                                                    //    textcontrol.Angle = control.Angle;
911
                                                    //    textcontrol.BoxH = control.BoxHeight;
912
                                                    //    textcontrol.BoxW = control.BoxWidth;
913
                                                    //    textcontrol.EndPoint = control.EndPoint;
914
                                                    //    textcontrol.FontColor = "#FFFF0000";
915
                                                    //    textcontrol.Name = "TextControl";
916
                                                    //    textcontrol.Opac = control.Opac;
917
                                                    //    textcontrol.PointSet = new List<Point>();
918
                                                    //    textcontrol.SizeSet = string.Join(delimiterChars2.First(), control.SizeSet.First(), control.fontConfig[3]);
919
                                                    //    textcontrol.StartPoint = control.StartPoint;
920
                                                    //    textcontrol.Text = control.ArrowText;
921
                                                    //    textcontrol.TransformPoint = control.TransformPoint;
922
                                                    //    textcontrol.UserID = null;
923
                                                    //    textcontrol.fontConfig = control.fontConfig;
924
                                                    //    textcontrol.isHighLight = control.isHighLight;
925
                                                    //    textcontrol.paintMethod = 1;
926

  
927
                                                    //    DrawTextBox(textcontrol, contentByte, delimiterChars, delimiterChars2, _SetColor);
928
                                                    //}
929

  
930
                                                    //using (S_ArrowControl_Multi linecontrol = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item))
931
                                                    //{
932
                                                    //    linecontrol.Angle = control.Angle;
933
                                                    //    linecontrol.DashSize = new DoubleCollection(new[] {(double)999999 });
934
                                                    //    linecontrol.EndPoint = control.EndPoint;
935
                                                    //    linecontrol.MidPoint = control.MidPoint;
936
                                                    //    linecontrol.Name = "ArrowControl_Multi";
937
                                                    //    linecontrol.Opac = control.Opac;
938
                                                    //    linecontrol.PointSet = control.PointSet;
939
                                                    //    linecontrol.SizeSet = control.SizeSet;
940
                                                    //    linecontrol.StartPoint = control.StartPoint;
941
                                                    //    linecontrol.StrokeColor = control.StrokeColor;
942
                                                    //    linecontrol.TransformPoint = control.TransformPoint;
943

  
944
                                                    //    DrawMultiArrowLine(linecontrol, contentByte, delimiterChars, delimiterChars2, _SetColor);
945
                                                    //}
946
                                                string[] data2 = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
947
                                                Point tempStartPoint = GetPdfPointSystem(control.StartPoint);
948
                                                Point tempMidPoint = GetPdfPointSystem(control.MidPoint);
949
                                                Point tempEndPoint = GetPdfPointSystem(control.EndPoint);
950
                                                bool isUnderLine = false;
951
                                                string Text = "";
952
                                                double fontsize = 30;
953

  
954
                                                System.Drawing.SizeF sizeF = new System.Drawing.SizeF((float)control.BoxWidth, (float)control.BoxHeight);
955
                                                Rect rect = new Rect(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight));
956
                                                List<Point> tempPoint = new List<Point>();
957

  
958
                                                double Angle = control.Angle;
959

  
960
                                                if (Math.Abs(Angle).ToString() == "90")
961
                                                {
962
                                                    Angle = 270;
963
                                                }
964
                                                else if (Math.Abs(Angle).ToString() == "270")
965
                                                {
966
                                                    Angle = 90;
967
                                                }
968 968

  
969
                                                    bool isUnderline = false;
970
                                                    control.BoxW -= scaleWidth;
971
                                                    control.BoxH -= scaleHeight;
972
                                                    System.Drawing.SizeF sizeF = new System.Drawing.SizeF((float)control.BoxW, (float)control.BoxH);
973
                                                    Point StartPoint = GetPdfPointSystem(control.StartPoint);
974
                                                    Point EndPoint = GetPdfPointSystem(new Point(control.StartPoint.X + control.BoxW, control.StartPoint.Y + control.BoxH));
969
                                                var tempRectMidPoint = MathSet.getRectMiddlePoint(rect);
970
                                                tempPoint.Add(new Point(rect.Left, tempRectMidPoint.Y));
971
                                                tempPoint.Add(new Point(tempRectMidPoint.X, rect.Top));
972
                                                tempPoint.Add(new Point(rect.Right, tempRectMidPoint.Y));
973
                                                tempPoint.Add(new Point(tempRectMidPoint.X, rect.Bottom));
974

  
975
                                                var newStartPoint = tempStartPoint;
976
                                                var newEndPoint = MathSet.getNearPoint(tempPoint, tempMidPoint);
977
                                                var newMidPoint = MathSet.getMiddlePoint(newStartPoint, newEndPoint);
978

  
979
                                                    //Point testPoint = tempEndPoint;
980
                                                    //if (Angle != 0)
981
                                                    //{
982
                                                    //    testPoint = GetArrowTextControlTestPoint(0, newMidPoint, tempPoint, control.isFixed);
983
                                                    //   //testPoint = Test(rect, newMidPoint);
984
                                                    //}
985

  
986
                                                double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2.First()));
987
                                                SolidColorBrush FontColor = _SetColor;
988
                                                bool isHighlight = control.isHighLight;
989
                                                double Opacity = control.Opac;
990
                                                PaintSet Paint = PaintSet.None;
991

  
992
                                                switch (control.ArrowStyle)
993
                                                {
994
                                                    case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Normal:
995
                                                        {
996
                                                            Paint = PaintSet.None;
997
                                                        }
998
                                                        break;
999
                                                    case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Cloud:
1000
                                                        {
1001
                                                            Paint = PaintSet.Hatch;
1002
                                                        }
1003
                                                        break;
1004
                                                    case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Rect:
1005
                                                        {
1006
                                                            Paint = PaintSet.Fill;
1007
                                                        }
1008
                                                        break;
1009
                                                    default:
1010
                                                        break;
1011
                                                }
1012
                                                if (control.isHighLight) Paint |= PaintSet.Highlight;
975 1013

  
976
                                                    List<Point> pointSet = new List<Point>();
977
                                                    pointSet.Add(StartPoint);
978
                                                    pointSet.Add(EndPoint);
1014
                                                if (Paint == PaintSet.Hatch)
1015
                                                {
1016
                                                    Text = control.ArrowText;
1017
                                                }
1018
                                                else
1019
                                                {
1020
                                                    Text = control.ArrowText;
1021
                                                }
979 1022

  
980
                                                    PaintSet paint = PaintSet.None;
981
                                                    switch (control.paintMethod)
1023
                                                try
1024
                                                {
1025
                                                    if (control.fontConfig.Count == 4)
982 1026
                                                    {
983
                                                        case 1:
984
                                                            {
985
                                                                paint = PaintSet.Fill;
986
                                                            }
987
                                                            break;
988
                                                        case 2:
989
                                                            {
990
                                                                paint = PaintSet.Hatch;
991
                                                            }
992
                                                            break;
993
                                                        default:
994
                                                            break;
1027
                                                        fontsize = Convert.ToDouble(control.fontConfig[3]);
995 1028
                                                    }
996
                                                    if (control.isHighLight) paint |= PaintSet.Highlight;
997 1029

  
998
                                                    double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2.First()));
999
                                                    double TextSize = Convert.ToDouble(data2[1]);
1000
                                                    SolidColorBrush FontColor = _SetColor;
1001
                                                    double Angle = control.Angle;
1002
                                                    double Opacity = control.Opac;
1003
                                                    FontFamily fontfamilly = FontHelper.GetFontFamily(control.fontConfig[0]);
1030
                                                    //강인구 수정(2018.04.17)
1004 1031
                                                    var TextStyle = Common.StringToFont.ConFontStyle(control.fontConfig[1]);
1005
                                                    
1032

  
1006 1033
                                                    FontStyle fontStyle = FontStyles.Normal;
1007 1034
                                                    if (FontStyles.Italic == TextStyle)
1008 1035
                                                    {
......
1012 1039
                                                    FontWeight fontWeight = FontWeights.Black;
1013 1040

  
1014 1041
                                                    var TextWeight = Common.StringToFont.ConFontWeight(control.fontConfig[2]);
1015
                                                    //강인구 수정(2018.04.17)
1016 1042
                                                    if (FontWeights.Bold == TextWeight)
1017
                                                    //if (FontWeights.ExtraBold == TextWeight)
1018 1043
                                                    {
1019 1044
                                                        fontWeight = FontWeights.Bold;
1020 1045
                                                    }
1021 1046

  
1022 1047
                                                    TextDecorationCollection decoration = TextDecorations.Baseline;
1023
                                                    if (control.fontConfig.Count() == 4)
1048
                                                    if (control.fontConfig.Count() == 5)
1024 1049
                                                    {
1025 1050
                                                        decoration = TextDecorations.Underline;
1026 1051
                                                    }
1027 1052

  
1028
                                                    Controls_PDF.DrawSet_Text.DrawString(StartPoint, EndPoint, LineSize, contentByte, _SetColor, paint, TextSize, fontfamilly, fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1029
                                                }
1030
                                                break;
1031
                                            #endregion
1032
                                            #region ArrowTextControl
1033
                                            case "ArrowTextControl":
1034
                                                using (S_ArrowTextControl control = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item))
1035
                                                {
1036
                                                    string[] data2 = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
1037
                                                    Point tempStartPoint = GetPdfPointSystem(control.StartPoint);
1038
                                                    Point tempMidPoint = GetPdfPointSystem(control.MidPoint);
1039
                                                    Point tempEndPoint = GetPdfPointSystem(control.EndPoint);
1040
                                                    bool isUnderLine = false;
1041
                                                    string Text = "";
1042
                                                    double fontsize = 30;
1043

  
1044
                                                    System.Drawing.SizeF sizeF = new System.Drawing.SizeF((float)control.BoxWidth, (float)control.BoxHeight);
1045
                                                    Rect rect = new Rect(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight));
1046
                                                    List<Point> tempPoint = new List<Point>();
1047

  
1048
                                                    var tempRectMidPoint = MathSet.getRectMiddlePoint(rect);
1049

  
1050
                                                    tempPoint.Add(new Point(rect.Left, tempRectMidPoint.Y));
1051
                                                    tempPoint.Add(new Point(tempRectMidPoint.X, rect.Top));
1052
                                                    tempPoint.Add(new Point(rect.Right, tempRectMidPoint.Y));
1053
                                                    tempPoint.Add(new Point(tempRectMidPoint.X, rect.Bottom));
1054
                                                    double Angle = control.Angle;
1055
                                                    var newStartPoint = tempStartPoint;
1056
                                                    var newEndPoint = MathSet.getNearPoint(tempPoint, tempMidPoint);
1057
                                                    var newMidPoint = MathSet.getMiddlePoint(newStartPoint, newEndPoint);
1058

  
1059
                                                    double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2.First()));
1060
                                                    SolidColorBrush FontColor = _SetColor;
1061
                                                    bool isHighlight = control.isHighLight;
1062
                                                    double Opacity = control.Opac;
1063
                                                    PaintSet Paint = PaintSet.None;
1064

  
1065
                                                    switch (control.ArrowStyle)
1066
                                                    {
1067
                                                        case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Normal:
1068
                                                            {
1069
                                                                Paint = PaintSet.None;
1070
                                                            }
1071
                                                            break;
1072
                                                        case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Cloud:
1073
                                                            {
1074
                                                                Paint = PaintSet.Hatch;
1075
                                                            }
1076
                                                            break;
1077
                                                        case Controls.Text.ArrowTextControl.ArrowTextStyleSet.Rect:
1078
                                                            {
1079
                                                                Paint = PaintSet.Fill;
1080
                                                            }
1081
                                                            break;
1082
                                                        default:
1083
                                                            break;
1084
                                                    }
1085
                                                    if (control.isHighLight) Paint |= PaintSet.Highlight;
1086

  
1087
                                                    if (Paint == PaintSet.Hatch)
1053
                                                    if (control.isTrans)
1088 1054
                                                    {
1089
                                                        Text = control.ArrowText;
1055
                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1056
                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1057
                                                            newStartPoint, tempMidPoint, newEndPoint, control.isFixed,
1058
                                                            LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1090 1059
                                                    }
1091 1060
                                                    else
1092 1061
                                                    {
1093
                                                        Text = control.ArrowText;
1094
                                                    }
1095

  
1096
                                                    try
1097
                                                    {
1098
                                                        if (control.fontConfig.Count == 4)
1099
                                                        {
1100
                                                            fontsize = Convert.ToDouble(control.fontConfig[3]);
1101
                                                        }
1102

  
1103
                                                        //강인구 수정(2018.04.17)
1104
                                                        var TextStyle = Common.StringToFont.ConFontStyle(control.fontConfig[1]);
1105

  
1106
                                                        FontStyle fontStyle = FontStyles.Normal;
1107
                                                        if (FontStyles.Italic == TextStyle)
1108
                                                        {
1109
                                                            fontStyle = FontStyles.Italic;
1110
                                                        }
1111

  
1112
                                                        FontWeight fontWeight = FontWeights.Black;
1113

  
1114
                                                        var TextWeight = Common.StringToFont.ConFontWeight(control.fontConfig[2]);
1115
                                                        if (FontWeights.Bold == TextWeight)
1116
                                                        {
1117
                                                            fontWeight = FontWeights.Bold;
1118
                                                        }
1119

  
1120
                                                        TextDecorationCollection decoration = TextDecorations.Baseline;
1121
                                                        if (control.fontConfig.Count() == 5)
1122
                                                        {
1123
                                                            decoration = TextDecorations.Underline;
1124
                                                        }
1125

  
1126
                                                        if (control.isTrans)
1127
                                                        {
1128
                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1129
                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1130
                                                                newStartPoint, tempMidPoint, control.isFixed,
1131
                                                                LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1132
                                                        }
1133
                                                        else
1062
                                                        if (control.isFixed)
1134 1063
                                                        {
1064
                                                            var testP = new Point(0, 0);
1135 1065
                                                            if (control.isFixed)
1136 1066
                                                            {
1137
                                                                var testP = new Point(0, 0);
1138
                                                                if (control.isFixed)
1067
                                                                if (tempPoint[1] == newEndPoint)
1139 1068
                                                                {
1140
                                                                    if (tempPoint[1] == newEndPoint)
1141
                                                                    {
1142
                                                                        testP = new Point(newEndPoint.X, newEndPoint.Y - 10);
1143
                                                                    }
1144
                                                                    else if (tempPoint[3] == newEndPoint)
1145
                                                                    {
1146
                                                                        testP = new Point(newEndPoint.X, newEndPoint.Y + 10);
1147
                                                                    }
1148
                                                                    else if (tempPoint[0] == newEndPoint)
1149
                                                                    {
1150
                                                                        testP = new Point(newEndPoint.X - 10, newEndPoint.Y);
1151
                                                                    }
1152
                                                                    else if (tempPoint[2] == newEndPoint)
1153
                                                                    {
1154
                                                                        testP = new Point(newEndPoint.X + 10, newEndPoint.Y);
1155
                                                                    }
1069
                                                                    testP = new Point(newEndPoint.X, newEndPoint.Y - 10);
1070
                                                                }
1071
                                                                else if (tempPoint[3] == newEndPoint)
1072
                                                                {
1073
                                                                    testP = new Point(newEndPoint.X, newEndPoint.Y + 10);
1074
                                                                }
1075
                                                                else if (tempPoint[0] == newEndPoint)
1076
                                                                {
1077
                                                                    testP = new Point(newEndPoint.X - 10, newEndPoint.Y);
1078
                                                                }
1079
                                                                else if (tempPoint[2] == newEndPoint)
1080
                                                                {
1081
                                                                    testP = new Point(newEndPoint.X + 10, newEndPoint.Y);
1156 1082
                                                                }
1157
                                                                //인구 수정 Arrow Text Style적용 되도록 변경
1158
                                                                Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1159
                                                                    tempStartPoint, testP, control.isFixed ,
1160
                                                                    LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight,
1161
                                                                FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1162
                                                            }
1163
                                                            else
1164
                                                            {
1165
                                                                //인구 수정 Arrow Text Style적용 되도록 변경
1166
                                                                Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1167
                                                                    newStartPoint, tempMidPoint, control.isFixed,
1168
                                                                    LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1169 1083
                                                            }
1084
                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1085
                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1086
                                                                tempStartPoint, testP, tempEndPoint, control.isFixed,
1087
                                                                LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight,
1088
                                                            FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1089
                                                        }
1090
                                                        else
1091
                                                        {
1092
                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1093
                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1094
                                                                newStartPoint, tempMidPoint, tempEndPoint, control.isFixed,
1095
                                                                LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1170 1096
                                                        }
1171 1097
                                                    }
1172
                                                    catch (Exception ex)
1173
                                                    {
1174
                                                        throw ex;
1175
                                                    }
1098
                                                }
1099
                                                catch (Exception ex)
1100
                                                {
1101
                                                    throw ex;
1102
                                                }
1103

  
1176 1104
                                                }
1177 1105
                                                break;
1178 1106
                                            #endregion
......
1317 1245
            }
1318 1246
            return false;
1319 1247
        }
1248

  
1249
        /// <summary>
1250
        /// kcom의 화살표방향과 틀려 추가함
1251
        /// </summary>
1252
        /// <param name="PageAngle"></param>
1253
        /// <param name="endP"></param>
1254
        /// <param name="ps">box Points</param>
1255
        /// <param name="IsFixed"></param>
1256
        /// <returns></returns>
1257
        private Point GetArrowTextControlTestPoint(double PageAngle,Point endP,List<Point> ps,bool IsFixed)
1258
        {
1259
            Point testP = endP;
1260

  
1261
            try
1262
            {
1263
                switch (Math.Abs(PageAngle).ToString())
1264
                {
1265
                    case "90":
1266
                        testP = new Point(endP.X + 50, endP.Y);
1267
                        break;
1268
                    case "270":
1269
                        testP = new Point(endP.X - 50, endP.Y);
1270
                        break;
1271
                }
1272

  
1273
                //20180910 LJY 각도에 따라.
1274
                switch (Math.Abs(PageAngle).ToString())
1275
                {
1276
                    case "90":
1277
                        if (IsFixed)
1278
                        {
1279
                            if (ps[0] == endP) //상단
1280
                            {
1281
                                testP = new Point(endP.X, endP.Y + 50);
1282
                                //System.Diagnostics.Debug.WriteLine("상단"+ testP);
1283
                            }
1284
                            else if (ps[1] == endP) //하단
1285
                            {
1286
                                testP = new Point(endP.X, endP.Y - 50);
1287
                                //System.Diagnostics.Debug.WriteLine("하단"+ testP);
1288
                            }
1289
                            else if (ps[2] == endP) //좌단
1290
                            {
1291
                                testP = new Point(endP.X - 50, endP.Y);
1292
                                //System.Diagnostics.Debug.WriteLine("좌단"+ testP);
1293
                            }
1294
                            else if (ps[3] == endP) //우단
1295
                            {
1296
                                testP = new Point(endP.X + 50, endP.Y);
1297
                                //System.Diagnostics.Debug.WriteLine("우단"+ testP);
1298
                            }
1299
                        }
1300
                        break;
1301
                    case "270":
1302
                        if (IsFixed)
1303
                        {
1304
                            if (ps[0] == endP) //상단
1305
                            {
1306
                                testP = new Point(endP.X, endP.Y - 50);
1307
                                //System.Diagnostics.Debug.WriteLine("상단" + testP);
1308
                            }
1309
                            else if (ps[1] == endP) //하단
1310
                            {
1311
                                testP = new Point(endP.X, endP.Y + 50);
1312
                                //System.Diagnostics.Debug.WriteLine("하단" + testP);
1313
                            }
1314
                            else if (ps[2] == endP) //좌단
1315
                            {
1316
                                testP = new Point(endP.X + 50, endP.Y);
1317
                                //System.Diagnostics.Debug.WriteLine("좌단" + testP);
1318
                            }
1319
                            else if (ps[3] == endP) //우단
1320
                            {
1321
                                testP = new Point(endP.X - 50, endP.Y);
1322
                                //System.Diagnostics.Debug.WriteLine("우단" + testP);
1323
                            }
1324
                        }
1325
                        break;
1326
                    default:
1327
                        if (IsFixed)
1328
                        {
1329

  
1330
                            if (ps[0] == endP) //상단
1331
                            {
1332
                                testP = new Point(endP.X, endP.Y - 50);
1333
                                //System.Diagnostics.Debug.WriteLine("상단");
1334
                            }
1335
                            else if (ps[1] == endP) //하단
1336
                            {
1337
                                testP = new Point(endP.X, endP.Y + 50);
1338
                                //System.Diagnostics.Debug.WriteLine("하단");
1339
                            }
1340
                            else if (ps[2] == endP) //좌단
1341
                            {
1342
                                testP = new Point(endP.X - 50, endP.Y);
1343
                                //System.Diagnostics.Debug.WriteLine("좌단");
1344
                            }
1345
                            else if (ps[3] == endP) //우단
1346
                            {
1347
                                testP = new Point(endP.X + 50, endP.Y);
1348
                                //System.Diagnostics.Debug.WriteLine("우단");
1349
                            }
1350
                        }
1351
                        break;
1352
                }
1353

  
1354
            }
1355
            catch (Exception)
1356
            {
1357
            }
1358

  
1359
            return testP;
1360
        }
1361

  
1362
        private Point Test(Rect rect,Point point)
1363
        {
1364
            Point result = new Point();
1365

  
1366
            Point newPoint = new Point();
1367

  
1368
            double oldNear = 0;
1369
            double newNear = 0;
1370

  
1371
            oldNear = MathSet.GetShortestDistance(point, rect.TopLeft, rect.TopRight, out result);
1372

  
1373
            newNear = MathSet.GetShortestDistance(point, rect.TopLeft, rect.BottomLeft, out newPoint);
1374

  
1375
            if (newNear < oldNear)
1376
            {
1377
                oldNear = newNear;
1378
                result = newPoint;
1379
            }
1380

  
1381
            newNear = MathSet.GetShortestDistance(point, rect.TopRight, rect.BottomRight, out newPoint);
1382

  
1383
            if (newNear < oldNear)
1384
            {
1385
                oldNear = newNear;
1386
                result = newPoint;
1387
            }
1388

  
1389

  
1390
            newNear = MathSet.GetShortestDistance(point, rect.BottomLeft, rect.BottomRight, out newPoint);
1391

  
1392
            if (newNear < oldNear)
1393
            {
1394
                oldNear = newNear;
1395
                result = newPoint;
1396
            }
1397

  
1398
            return result;
1399
        }
1400

  
1401
        private void DrawMultiArrowLine(S_ArrowControl_Multi control, PdfContentByte contentByte, string[] delimiterChars, string[] delimiterChars2, SolidColorBrush setColor)
1402
        {
1403
            string[] InnerData = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
1404
            Point StartPoint = GetPdfPointSystem(control.StartPoint);
1405
            Point MidPoint = GetPdfPointSystem(control.MidPoint);
1406
            Point EndPoint = GetPdfPointSystem(control.EndPoint);
1407
            DoubleCollection DashSize = control.DashSize;
1408
            List<Point> PointSet = GetPdfPointSystem(control.PointSet);
1409
            double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(InnerData.First()));
1410

  
1411
            double Opacity = control.Opac;
1412

  
1413
            if (EndPoint == MidPoint)
1414
            {
1415
                Controls_PDF.DrawSet_Arrow.SingleAllow(MidPoint, StartPoint, LineSize, contentByte, setColor, Opacity);
1416
            }
1417
            else
1418
            {
1419
                Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, MidPoint, LineSize, contentByte, setColor, Opacity);
1420
            }
1421

  
1422
            Controls_PDF.DrawSet_Line.DrawLine(PointSet, LineSize, contentByte, DashSize, setColor, Opacity);
1423

  
1424
        }
1425

  
1426
        private void DrawLine(S_LineControl control, PdfContentByte contentByte, string[] delimiterChars, string[] delimiterChars2, SolidColorBrush setColor)
1427
        {
1428
            string[] InnerData = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
1429
            Point StartPoint = GetPdfPointSystem(control.StartPoint);
1430
            Point EndPoint = GetPdfPointSystem(control.EndPoint);
1431
            DoubleCollection DashSize = control.DashSize;
1432
            List<Point> PointSet = GetPdfPointSystem(control.PointSet);
1433

  
1434
            var Opacity = control.Opac;
1435
            string UserID = control.UserID;
1436
            double Interval = control.Interval;
1437
            double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(InnerData.First()));
1438
            Controls_PDF.DrawSet_Line.DrawLine(StartPoint, EndPoint, LineSize, contentByte, control.DashSize, setColor, Opacity);
1439
            switch (control.LineStyleSet)
1440
            {
1441
                case LineStyleSet.ArrowLine:
1442
                    Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, setColor, Opacity);
1443
                    break;
1444
                case LineStyleSet.CancelLine:
1445
                    {
1446
                        var x = Math.Abs((Math.Abs(StartPoint.X) - Math.Abs(EndPoint.X)));
1447
                        var y = Math.Abs((Math.Abs(StartPoint.Y) - Math.Abs(EndPoint.Y)));
1448

  
1449
                        if (x > y)
1450
                        {
1451
                            StartPoint = new Point(StartPoint.X, StartPoint.Y - (float)(control.Interval / 3.0));
1452
                            EndPoint = new Point(EndPoint.X, EndPoint.Y - (float)(control.Interval / 3.0));
1453
                            Controls_PDF.DrawSet_Line.DrawLine(StartPoint, EndPoint, LineSize, contentByte, DashSize, setColor, Opacity);
1454
                        }
1455
                    }
1456
                    break;
1457
                case LineStyleSet.TwinLine:
1458
                    {
1459
                        Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, setColor, Opacity);
1460
                        Controls_PDF.DrawSet_Arrow.SingleAllow(StartPoint, EndPoint, LineSize, contentByte, setColor, Opacity);
1461
                    }
1462
                    break;
1463
                case LineStyleSet.DimLine:
1464
                    {
1465
                        Controls_PDF.DrawSet_Arrow.DimAllow(StartPoint, EndPoint, LineSize, contentByte, setColor, Opacity);
1466
                        Controls_PDF.DrawSet_Arrow.SingleAllow(EndPoint, StartPoint, LineSize, contentByte, setColor, Opacity);
1467
                        Controls_PDF.DrawSet_Arrow.SingleAllow(StartPoint, EndPoint, LineSize, contentByte, setColor, Opacity);
1468
                    }
1469
                    break;
1470
                default:
1471
                    break;
1472
            }
1473

  
1474
        }
1475

  
1476
        private void DrawTextBox(S_TextControl control,PdfContentByte contentByte, string[] delimiterChars, string[] delimiterChars2,SolidColorBrush setColor)
1477
        {
1478
            string[] data2 = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
1479
            string Text = control.Text;
1480

  
1481
            bool isUnderline = false;
1482
            control.BoxW -= scaleWidth;
1483
            control.BoxH -= scaleHeight;
1484
            System.Drawing.SizeF sizeF = new System.Drawing.SizeF((float)control.BoxW, (float)control.BoxH);
1485
            Point StartPoint = GetPdfPointSystem(control.StartPoint);
1486
            Point EndPoint = GetPdfPointSystem(new Point(control.StartPoint.X + control.BoxW, control.StartPoint.Y + control.BoxH));
1487

  
1488
            List<Point> pointSet = new List<Point>();
1489
            pointSet.Add(StartPoint);
1490
            pointSet.Add(EndPoint);
1491

  
1492
            PaintSet paint = PaintSet.None;
1493
            switch (control.paintMethod)
1494
            {
1495
                case 1:
1496
                    {
1497
                        paint = PaintSet.Fill;
1498
                    }
1499
                    break;
1500
                case 2:
1501
                    {
1502
                        paint = PaintSet.Hatch;
1503
                    }
1504
                    break;
1505
                default:
1506
                    break;
1507
            }
1508
            if (control.isHighLight) paint |= PaintSet.Highlight;
1509

  
1510
            double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2.First()));
1511
            double TextSize = Convert.ToDouble(data2[1]);
1512
            SolidColorBrush FontColor = setColor;
1513
            double Angle = control.Angle;
1514
            double Opacity = control.Opac;
1515
            FontFamily fontfamilly = FontHelper.GetFontFamily(control.fontConfig[0]);
1516
            var TextStyle = Common.StringToFont.ConFontStyle(control.fontConfig[1]);
1517

  
1518
            FontStyle fontStyle = FontStyles.Normal;
1519
            if (FontStyles.Italic == TextStyle)
1520
            {
1521
                fontStyle = FontStyles.Italic;
1522
            }
1523

  
1524
            FontWeight fontWeight = FontWeights.Black;
1525

  
1526
            var TextWeight = Common.StringToFont.ConFontWeight(control.fontConfig[2]);
1527
            //강인구 수정(2018.04.17)
1528
            if (FontWeights.Bold == TextWeight)
1529
            //if (FontWeights.ExtraBold == TextWeight)
1530
            {
1531
                fontWeight = FontWeights.Bold;
1532
            }
1533

  
1534
            TextDecorationCollection decoration = TextDecorations.Baseline;
1535
            if (control.fontConfig.Count() == 4)
1536
            {
1537
                decoration = TextDecorations.Underline;
1538
            }
1539

  
1540
            Controls_PDF.DrawSet_Text.DrawString(StartPoint, EndPoint, LineSize, contentByte, setColor, paint, TextSize, fontfamilly, fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1541
        }
1320 1542
    
1321 1543

  
1322 1544
        ~MarkupToPDF()
KCOM/Common/TempFile.cs
413 413
                        }
414 414

  
415 415
                        //Control                   
416
                        item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
416
                        item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
417 417

  
418 418
                        UndoData = new Undo_data()
419 419
                        {
......
439 439
                        }
440 440

  
441 441
                        //Control                   
442
                        item = await MarkupParser.ParseExAsync(null, App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
442
                        item = await MarkupParser.ParseExAsync(null, App.ViewInfo.ProjectNO, tempLoadData[k].ConvertData, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", tempLoadData[k].MarkupInfoID, tempLoadData[k].CommentID);
443 443

  
444 444
                        UndoData = new Undo_data()
445 445
                        {
KCOM/Common/ViewerDataModel.cs
119 119

  
120 120
        private double contentHeight = 0;
121 121

  
122
        private double angle = 0;
122
        private double markupAngle = 0;
123

  
124
        private double pageAngle = 0;
123 125

  
124 126
        private double angleOffsetX = 0;
125 127

  
......
482 484

  
483 485

  
484 486
        #region Angle 관련
485
        private Visibility _AngleVisibility { get; set; }
486
        public Visibility AngleVisibility
487
        private Visibility _MarkupAngleVisibility { get; set; }
488
        public Visibility MarkupAngleVisibility
487 489
        {
488 490
            get
489 491
            {
490
                return _AngleVisibility;
492
                return _MarkupAngleVisibility;
491 493
            }
492 494
            set
493 495
            {
494
                _AngleVisibility = value;
495
                OnPropertyChanged("AngleVisibility");
496
                _MarkupAngleVisibility = value;
497
                OnPropertyChanged("MarkupAngleVisibility");
496 498
            }
497 499

  
498 500
        }
499 501

  
500
        public double Angle
502
        public double MarkupAngle
503
        {
504
            get
505
            {
506
                return markupAngle;
507
            }
508
            set
509
            {
510
                markupAngle = value;
511
                OnPropertyChanged("MarkupAngle");
512
            }
513
        }
514

  
515
        public double PageAngle
501 516
        {
502 517
            get
503 518
            {
504
                return angle;
519
                return pageAngle;
505 520
            }
506 521
            set
507 522
            {
508
                angle = value;
509
                OnPropertyChanged("Angle");
523
                pageAngle = value;
524
                OnPropertyChanged("PageAngle");
510 525
            }
511 526
        }
512 527

  
......
569 584

  
570 585
        public void SetAngleVisible(Visibility visibility)
571 586
        {
572
            this.AngleVisibility = visibility;
587
            this.MarkupAngleVisibility = visibility;
573 588
        }
574 589

  
575 590

  
......
1284 1299
            this.DashSize = new DoubleCollection();
1285 1300

  
1286 1301
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1287
            this.AngleVisibility = Visibility.Collapsed;
1302
            this.MarkupAngleVisibility = Visibility.Collapsed;
1288 1303
        }
1289 1304

  
1290 1305

  
KCOM/Controls/AdornerFinal.xaml.cs
704 704
                // ViewerDataModel.Instance.Angle = MathSet.returnAngle(startP, ref endP, ViewerDataModel.Instance.IsPressShift);
705 705

  
706 706
                // 컨트롤의 angle변환시 상단 anglecontrol에 출력
707
                ViewerDataModel.Instance.Angle = (currentControl as CommentUserInfo).CommentAngle;
707
                ViewerDataModel.Instance.MarkupAngle = (currentControl as CommentUserInfo).CommentAngle;
708 708

  
709 709
                if (item.DrawingData.GetType().Name == "TextControl")
710 710
                {
KCOM/Controls/PrintControl.xaml.cs
463 463
                        load.Page_No = PageNo;
464 464
                        load.DisplayColor = info.DisplayColor;
465 465
                        load.Markupinfoid = info.MarkupInfoID;
466
                        var IsLoad = await load.Markup_LoadAsync(printCanvas);
466
                        var IsLoad = await load.Markup_LoadAsync(printCanvas, 0);
467 467
                    }
468 468
                    //await Dispatcher.InvokeAsync(() => {
469 469
                    //    printCanvas.UpdateLayout();
KCOM/Controls/Sample.xaml.cs
481 481
            ViewerDataModel.Instance.ContentHeight = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
482 482
            ViewerDataModel.Instance.AngleOffsetX = instanceMain.dzMainMenu.translate.X;
483 483
            ViewerDataModel.Instance.AngleOffsetY = instanceMain.dzMainMenu.translate.Y;
484
            ViewerDataModel.Instance.Angle = instanceMain.dzMainMenu.rotate.Angle;
484
            ViewerDataModel.Instance.MarkupAngle = instanceMain.dzMainMenu.rotate.Angle;
485 485

  
486 486
            instanceMain.dzMainMenu.pageNavigator._thumbnailItems.Where(info => info.PageNumber == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(data =>
487 487
            {
KCOM/Controls/SearchPanel.xaml.cs
424 424
        {
425 425
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.Dispatcher.Invoke(() => {
426 426

  
427
                for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++)
427
                for (int i = 0; i < (Common.ViewerDataModel.Instance.MarkupAngle / 90); i++)
428 428
                {
429 429
                    Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true);
430 430
                }
KCOM/Controls/Symbol.xaml.cs
162 162
            lstSymbolPublic.ItemsSource = Custom_List;
163 163
        }
164 164

  
165
        public async Task<PngBitmapEncoder> symImageAsync(string data)
165
        public async Task<PngBitmapEncoder> symImageAsync(string data,double PageAngle)
166 166
        {
167 167

  
168 168
            Canvas _canvas = new Canvas();
169 169
            _canvas.Background = Brushes.White;
170 170
            _canvas.Width = finalItem.BorderSize.Width;
171 171
            _canvas.Height = finalItem.BorderSize.Height;
172
            await MarkupParser.ParseAsync(App.ViewInfo.ProjectNO, data, _canvas, "#FFFF0000", "", ViewerDataModel.Instance.CancellationToken());
172
            await MarkupParser.ParseAsync(App.ViewInfo.ProjectNO, data, _canvas, PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.CancellationToken());
173 173

  
174 174
            BitmapEncoder encoder = new PngBitmapEncoder();
175 175

  
......
287 287
                {
288 288
                    if (args.DialogResult.Value)
289 289
                    {
290
                        PngBitmapEncoder _Encoder = await symImageAsync(data);
290
                        PngBitmapEncoder _Encoder = await symImageAsync(data,ViewerDataModel.Instance.MarkupAngle);
291 291

  
292 292
                        System.IO.MemoryStream fs = new System.IO.MemoryStream();
293 293
                        _Encoder.Save(fs);
......
474 474
                    {
475 475
                        if (parse != "")
476 476
                        {
477
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, string.Empty, string.Empty);
477
                            System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty);
478 478
                            (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
479 479
                            (item as MarkupToPDF.Common.CommentUserInfo).SymbolID = id;
480 480
                            //(item as MarkupToPDF.Common.CommentUserInfo).GroupID = group_id;
......
497 497

  
498 498
                    var pageWidth = ViewerDataModel.Instance.ImageViewWidth;
499 499
                    var pageHeight = ViewerDataModel.Instance.ImageViewHeight;
500
                    var angle = Common.ViewerDataModel.Instance.Angle;
500
                    var angle = Common.ViewerDataModel.Instance.MarkupAngle;
501 501

  
502 502
                    Point pagePoint = new Point(pageWidth/2, pageHeight/2);
503 503

  
KCOM/Events/Implementation/TopMenuEvent.cs
1623 1623
            ViewerDataModel.Instance.ContentHeight = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
1624 1624
            ViewerDataModel.Instance.AngleOffsetX = instanceMain.dzMainMenu.translate.X;
1625 1625
            ViewerDataModel.Instance.AngleOffsetY = instanceMain.dzMainMenu.translate.Y;
1626
            ViewerDataModel.Instance.Angle = instanceMain.dzMainMenu.rotate.Angle;
1626
            ViewerDataModel.Instance.PageAngle = instanceMain.dzMainMenu.rotate.Angle;
1627 1627
            //ViewerDataModel.Instance.Document_Info.Clear();
1628 1628
            //ViewerDataModel.Instance.Document_Info.Where(i => i.PAGE_NUMBER == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(value =>
1629 1629
            //{
......
2770 2770
                {
2771 2771
                    if (parse != "")
2772 2772
                    {
2773
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, string.Empty, string.Empty);
2773
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(),App.ViewInfo.ProjectNO, parse, ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, string.Empty, string.Empty);
2774 2774
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
2775 2775

  
2776 2776
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
KCOM/Events/Load.cs
43 43
        }
44 44

  
45 45
        //마크업 불러오기
46
        public async Task<bool> Markup_LoadAsync(Canvas printCanvas)
46
        public async Task<bool> Markup_LoadAsync(Canvas printCanvas,double pageAngle)
47 47
        {
48 48
            bool result = false;
49 49

  
......
63 63

  
64 64
            foreach (string data in markupdata)
65 65
            {
66
                result = await MarkupParser.ParseAsync(App.ViewInfo.ProjectNO, data, printCanvas, DisplayColor, "",Common.ViewerDataModel.Instance.CancellationToken());
66
                result = await MarkupParser.ParseAsync(App.ViewInfo.ProjectNO, data, printCanvas, pageAngle, DisplayColor, "",Common.ViewerDataModel.Instance.CancellationToken());
67 67

  
68 68
                if(!result)
69 69
                {
KCOM/Events/PasteCommand.cs
90 90
                        string[] data2 = new string[2];
91 91
                        data2 = parse.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
92 92

  
93
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, "#FFFF0000", string.Empty);
93
                        System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty);
94 94
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Commons.shortGuid();
95 95
                        if (data2.Length >= 2)
96 96
                        {
KCOM/Extensions/MarkupVisitHelper.cs
91 91

  
92 92
                    try
93 93
                    {
94
                        if (Common.ViewerDataModel.Instance.Angle != 0)
94
                        if (Common.ViewerDataModel.Instance.MarkupAngle != 0)
95 95
                        {
96
                            for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++)
96
                            for (int i = 0; i < (Common.ViewerDataModel.Instance.MarkupAngle / 90); i++)
97 97
                            {
98 98
                                Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true);
99 99
                            }
......
123 123
                        double positionX = 0;
124 124
                        double positionY = 0;
125 125

  
126
                        if (Common.ViewerDataModel.Instance.Angle == 90)
126
                        if (Common.ViewerDataModel.Instance.MarkupAngle == 90)
127 127
                        {
128 128
                            positionX = Common.ViewerDataModel.Instance.ImageViewHeight + rect.X;
129 129
                            positionY = Common.ViewerDataModel.Instance.ImageViewWidth + rect.Y;
......
141 141

  
142 142
                        var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height);
143 143

  
144
                        double pageAngle = Common.ViewerDataModel.Instance.Angle;
144
                        double pageAngle = Common.ViewerDataModel.Instance.MarkupAngle;
145 145

  
146 146
                        if (pageAngle == 90)
147 147
                        {
......
154 154

  
155 155
                        if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height))
156 156
                        {
157
                            var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
157
                            var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.MarkupAngle);
158 158
                            rect.Transform(matrix);
159 159
                            
160 160
                            main.zoomAndPanControl.ZoomTo(rect);
......
163 163
                        {
164 164
                            rect.Inflate(rect.Width * 3, rect.Height * 3);
165 165

  
166
                            var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
166
                            var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.MarkupAngle);
167 167
                            rect.Transform(matrix);
168 168

  
169 169

  
KCOM/Services/BaseServices.cs
568 568

  
569 569
                    foreach (var markupitem in pageItems)
570 570
                    {
571
                       await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
571
                       await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
572 572
                    }
573 573
                }
574 574
            }
......
673 673

  
674 674
                                foreach (var markup in instance)
675 675
                                {
676
                                    await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
676
                                    await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", 
677 677
                                        item.MarkupInfoID, markup.ID);
678 678
                                }
679 679
                            }
......
693 693
                                var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
694 694
                                foreach (var markup in instance)
695 695
                                {
696
                                    await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "",
696
                                    await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "",
697 697
                                        item.MarkupInfoID, markup.ID);
698 698
                                }
699 699
                            }
......
1010 1010

  
1011 1011
                    foreach (var markupitem in markupItems)
1012 1012
                    {
1013
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
1013
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", 
1014 1014
                                item.MarkupInfoID, markupitem.ID);
1015 1015
                    }
1016 1016
                }
......
1020 1020

  
1021 1021
                    foreach (var markupitem in markupItems)
1022 1022
                    {
1023
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
1023
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, ViewerDataModel.Instance.PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1024 1024
                    }
1025 1025
                }
1026 1026
            }
KCOM/Views/MainMenu.xaml
245 245
                                                        Grid.Column="1"
246 246
                                                        Grid.ColumnSpan="2"
247 247
                                                        Margin="10"
248
                                                        AngleValue="{Binding Angle, Mode=TwoWay, StringFormat=\{0:F0\}°, Source={x:Static common:ViewerDataModel.Instance}}"
248
                                                        AngleValue="{Binding MarkupAngle, Mode=TwoWay, StringFormat=\{0:F0\}°, Source={x:Static common:ViewerDataModel.Instance}}"
249 249
                                                        HorizontalAlignment="Right"
250 250
                                                        VerticalAlignment="Top"
251 251
                                                        IsHitTestVisible="False"
252
                                                        Visibility="{Binding AngleVisibility, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" />
252
                                                        Visibility="{Binding MarkupAngleVisibility, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" />
253 253
                            </Grid>
254 254
                        </telerik:RadDocumentPane>
255 255
                    </telerik:RadPaneGroup>
KCOM/Views/MainMenu.xaml.cs
650 650
            // 마크업 로드
651 651
            //await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber));
652 652

  
653
            var token = ViewerDataModel.Instance.NewCancellationToken();
653
            ViewerDataModel.Instance.PageAngle = e.CurrentPage.PAGE_ANGLE;
654 654

  
655
            await MarkupLoadAsync(e.PageNumber,token);
655
            var token = ViewerDataModel.Instance.NewCancellationToken();
656
            
657
            await MarkupLoadAsync(e.PageNumber, ViewerDataModel.Instance.PageAngle, token);
656 658

  
657 659
            // 페이지 이미지 변경
658 660
            await PageChangingAsync(e.CurrentPage, e.PageNumber, token);
......
1067 1069
            return e.DesiredSize;
1068 1070
        }
1069 1071

  
1070
        private async Task MarkupLoadAsync(int pageNumber, CancellationToken cts)
1072
        private async Task MarkupLoadAsync(int pageNumber,Double PageAngle, CancellationToken cts)
1071 1073
        {
1072 1074
            System.Diagnostics.Stopwatch stopwatch = new Stopwatch();
1073 1075
            stopwatch.Start();
......
1091 1093
                    string sColor = (info.UserID == App.ViewInfo.UserID) ? "#FFFF0000" : info.DisplayColor;
1092 1094
                    if (info.UserID == App.ViewInfo.UserID)
1093 1095
                    {
1094
                        var control = await MarkupParser.ParseExAsync(cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, sColor, "",
1096
                        var control = await MarkupParser.ParseExAsync(cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, PageAngle, sColor, "",
1095 1097
                                        markup.MarkupInfoID, markup.ID);
1096 1098
                        control.Visibility = Visibility.Hidden;
1097 1099
                    }
1098 1100
                    else
1099 1101
                    {
1100
                        var control = await MarkupParser.ParseExAsync(cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, sColor, "",
1102
                        var control = await MarkupParser.ParseExAsync(cts, App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, PageAngle, sColor, "",
1101 1103
                                                                markup.MarkupInfoID, markup.ID);
1102 1104
                        control.Visibility = Visibility.Hidden;
1103 1105
                    }
......
1128 1130

  
1129 1131
                    foreach (var markupitem in markupitems)
1130 1132
                    {
1131
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
1133
                        await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1132 1134

  
1133 1135
                        if (cts.IsCancellationRequested)
1134 1136
                        {
......
2024 2026

  
2025 2027
                    #endregion // 각 컨트롤의 특별한 기능을 제어한다.
2026 2028

  
2027
                    if (ViewerDataModel.Instance.AngleVisibility == Visibility.Visible)
2029
                    if (ViewerDataModel.Instance.MarkupAngleVisibility == Visibility.Visible)
2028 2030
                    {
2029
                        ViewerDataModel.Instance.Angle = currentControl.CommentAngle;
2031
                        ViewerDataModel.Instance.MarkupAngle = currentControl.CommentAngle;
2030 2032
                    }
2031 2033
                }
2032 2034
            }
......
2506 2508
            ViewerDataModel.Instance.ContentHeight = zoomAndPanCanvas.Height;
2507 2509
            ViewerDataModel.Instance.AngleOffsetX = translate.X;
2508 2510
            ViewerDataModel.Instance.AngleOffsetY = translate.Y;
2509
            ViewerDataModel.Instance.Angle = rotate.Angle;
2511
            ViewerDataModel.Instance.MarkupAngle = rotate.Angle;
2510 2512
        }
2511 2513

  
2512 2514
        private void syncPannelRotate(double angle)
......
4047 4049
                                    currentControl = new ArrowTextControl()
4048 4050
                                    {
4049 4051
                                        ArrowTextStyle = MarkupToPDF.Controls.Text.ArrowTextControl.ArrowTextStyleSet.Rect,
4050
                                        ControlType = ControlType.ArrowTransTextBorderControl
4052
                                        ControlType = ControlType.ArrowTransTextBorderControl,
4053
                                        PageAngle = ViewerDataModel.Instance.PageAngle
4051 4054
                                    };
4055

  
4056
                                    
4052 4057
                                    currentControl.CommentID = Commons.shortGuid();
4053 4058
                                    currentControl.IsNew = true;
4054 4059
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
......
4393 4398
                        break;
4394 4399
                }
4395 4400

  
4396
                if (currentControl != null)
4397
                {
4398
                    currentControl.PageAngle = pageNavigator.CurrentPage.Angle;
4399
                }
4401
                //if (currentControl != null)
4402
                //{
4403
                //    currentControl.PageAngle = pageNavigator.CurrentPage.Angle;
4404
                //}
4400 4405
            }
4401 4406
            if (mouseHandlingMode != MouseHandlingMode.None && e.LeftButton == MouseButtonState.Pressed)
4402 4407
            {
......
4800 4805
                            };
4801 4806
                        }
4802 4807
                    }
4803

  
4808
                   
4804 4809
                    //강인구 추가(페이지 이동시 코멘트 재 호출)
4805 4810
                    ViewerDataModel.Instance.MarkupControls_Sync.Clear();
4806 4811
                    List<MarkupInfoItem> gridSelectionRevItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
......
4810 4815
                        var markupitems = item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList();
4811 4816
                        foreach (var markupitem in markupitems)
4812 4817
                        {
4813
                            await MarkupParser.ParseExAsync(ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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