프로젝트

일반

사용자정보

개정판 73dfc330

ID73dfc3302a1d06699b50b5378c6fe840e88f2351
상위 1f112f94
하위 c0196f88

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

Fix: (FinalService) 페이지가 회전되었을때 ArrowTextControl 오류 수정

Change-Id: I18b5c8de2f48fdd1f5b19aab85046d15d5019496

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
870 870
                                                        case "ArrowTextControl":
871 871
                                                            using (S_ArrowTextControl control = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(item))
872 872
                                                            {
873
                                                                //using (S_TextControl textcontrol = JsonSerializerHelper.JsonDeserialize<S_TextControl>(item))
874
                                                                //{
875
                                                                //    textcontrol.Angle = control.Angle;
876
                                                                //    textcontrol.BoxH = control.BoxHeight;
877
                                                                //    textcontrol.BoxW = control.BoxWidth;
878
                                                                //    textcontrol.EndPoint = control.EndPoint;
879
                                                                //    textcontrol.FontColor = "#FFFF0000";
880
                                                                //    textcontrol.Name = "TextControl";
881
                                                                //    textcontrol.Opac = control.Opac;
882
                                                                //    textcontrol.PointSet = new List<Point>();
883
                                                                //    textcontrol.SizeSet = string.Join(delimiterChars2.First(), control.SizeSet.First(), control.fontConfig[3]);
884
                                                                //    textcontrol.StartPoint = control.StartPoint;
885
                                                                //    textcontrol.Text = control.ArrowText;
886
                                                                //    textcontrol.TransformPoint = control.TransformPoint;
887
                                                                //    textcontrol.UserID = null;
888
                                                                //    textcontrol.fontConfig = control.fontConfig;
889
                                                                //    textcontrol.isHighLight = control.isHighLight;
890
                                                                //    textcontrol.paintMethod = 1;
891

  
892
                                                                //    DrawTextBox(textcontrol, contentByte, delimiterChars, delimiterChars2, _SetColor);
893
                                                                //}
894

  
895
                                                                //using (S_ArrowControl_Multi linecontrol = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(item))
896
                                                                //{
897
                                                                //    linecontrol.Angle = control.Angle;
898
                                                                //    linecontrol.DashSize = new DoubleCollection(new[] {(double)999999 });
899
                                                                //    linecontrol.EndPoint = control.EndPoint;
900
                                                                //    linecontrol.MidPoint = control.MidPoint;
901
                                                                //    linecontrol.Name = "ArrowControl_Multi";
902
                                                                //    linecontrol.Opac = control.Opac;
903
                                                                //    linecontrol.PointSet = control.PointSet;
904
                                                                //    linecontrol.SizeSet = control.SizeSet;
905
                                                                //    linecontrol.StartPoint = control.StartPoint;
906
                                                                //    linecontrol.StrokeColor = control.StrokeColor;
907
                                                                //    linecontrol.TransformPoint = control.TransformPoint;
908

  
909
                                                                //    DrawMultiArrowLine(linecontrol, contentByte, delimiterChars, delimiterChars2, _SetColor);
910
                                                                //}
911 873
                                                                string[] data2 = control.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
912 874
                                                                Point tempStartPoint = GetPdfPointSystem(control.StartPoint);
913 875
                                                                Point tempMidPoint = GetPdfPointSystem(control.MidPoint);
......
917 879
                                                                double fontsize = 30;
918 880

  
919 881
                                                                System.Drawing.SizeF sizeF = new System.Drawing.SizeF((float)control.BoxWidth, (float)control.BoxHeight);
920
                                                                Rect rect = new Rect(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight));
921
                                                                List<Point> tempPoint = new List<Point>();
882
                                                                List<Point> Connections = new List<Point>(control.GetConnectionPoints(tempEndPoint, scaleWidth, scaleHeight));
922 883

  
923 884
                                                                double Angle = control.Angle;
924 885

  
925
                                                                if (Math.Abs(Angle).ToString() == "90")
926
                                                                {
927
                                                                    Angle = 270;
928
                                                                }
929
                                                                else if (Math.Abs(Angle).ToString() == "270")
930
                                                                {
931
                                                                    Angle = 90;
932
                                                                }
933

  
934
                                                                var tempRectMidPoint = MathSet.getRectMiddlePoint(rect);
935
                                                                tempPoint.Add(new Point(rect.Left, tempRectMidPoint.Y));
936
                                                                tempPoint.Add(new Point(tempRectMidPoint.X, rect.Top));
937
                                                                tempPoint.Add(new Point(rect.Right, tempRectMidPoint.Y));
938
                                                                tempPoint.Add(new Point(tempRectMidPoint.X, rect.Bottom));
939

  
940 886
                                                                var newStartPoint = tempStartPoint;
941
                                                                var newEndPoint = MathSet.getNearPoint(tempPoint, tempMidPoint);
942
                                                                var newMidPoint = MathSet.getMiddlePoint(newStartPoint, newEndPoint);
943

  
944
                                                                //Point testPoint = tempEndPoint;
945
                                                                //if (Angle != 0)
946
                                                                //{
947
                                                                //    testPoint = GetArrowTextControlTestPoint(0, newMidPoint, tempPoint, control.isFixed);
948
                                                                //   //testPoint = Test(rect, newMidPoint);
949
                                                                //}
887
                                                                var ConnectionPoint = MathSet.getNearPoint(Connections, tempMidPoint);
950 888

  
951
                                                                double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2.First()), scaleWidth);
889
                                                                double LineSize = Common.ConverterLineSize.Convert(Convert.ToInt32(data2[0]), scaleWidth);
952 890
                                                                System.Drawing.Color FontColor = _SetColor;
953 891
                                                                bool isHighlight = control.isHighLight;
954 892
                                                                double Opacity = control.Opac;
......
1010 948
                                                                    }
1011 949

  
1012 950
                                                                    TextDecorationCollection decoration = TextDecorations.Baseline;
1013
                                                                    if (control.fontConfig.Count() == 5)
951
                                                                    if (control.fontConfig.Count == 5)
1014 952
                                                                    {
1015 953
                                                                        decoration = TextDecorations.Underline;
1016 954
                                                                    }
1017 955

  
1018 956
                                                                    if (control.isTrans)
1019 957
                                                                    {
1020
                                                                        //인구 수정 Arrow Text Style적용 되도록 변경
1021
                                                                        Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1022
                                                                        newStartPoint, tempMidPoint, newEndPoint, control.isFixed,
958
                                                                        var border = control.GetBorderRectangle(tempEndPoint, scaleWidth, scaleHeight);
959
                                                                        Controls_PDF.DrawSet_Text.DrawString_ArrowText(border,
960
                                                                        newStartPoint, tempMidPoint, ConnectionPoint, control.isFixed,
1023 961
                                                                        LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1024 962
                                                                    }
1025 963
                                                                    else
......
1029 967
                                                                            var testP = new Point(0, 0);
1030 968
                                                                            if (control.isFixed)
1031 969
                                                                            {
1032
                                                                                if (tempPoint[1] == newEndPoint)
970
                                                                                if (Connections[1] == ConnectionPoint)
1033 971
                                                                                {
1034
                                                                                    testP = new Point(newEndPoint.X, newEndPoint.Y - 10);
972
                                                                                    testP = new Point(ConnectionPoint.X, ConnectionPoint.Y - 10);
1035 973
                                                                                }
1036
                                                                                else if (tempPoint[3] == newEndPoint)
974
                                                                                else if (Connections[3] == ConnectionPoint)
1037 975
                                                                                {
1038
                                                                                    testP = new Point(newEndPoint.X, newEndPoint.Y + 10);
976
                                                                                    testP = new Point(ConnectionPoint.X, ConnectionPoint.Y + 10);
1039 977
                                                                                }
1040
                                                                                else if (tempPoint[0] == newEndPoint)
978
                                                                                else if (Connections[0] == ConnectionPoint)
1041 979
                                                                                {
1042
                                                                                    testP = new Point(newEndPoint.X - 10, newEndPoint.Y);
980
                                                                                    testP = new Point(ConnectionPoint.X - 10, ConnectionPoint.Y);
1043 981
                                                                                }
1044
                                                                                else if (tempPoint[2] == newEndPoint)
982
                                                                                else if (Connections[2] == ConnectionPoint)
1045 983
                                                                                {
1046
                                                                                    testP = new Point(newEndPoint.X + 10, newEndPoint.Y);
984
                                                                                    testP = new Point(ConnectionPoint.X + 10, ConnectionPoint.Y);
1047 985
                                                                                }
1048 986
                                                                            }
1049
                                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1050
                                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1051
                                                                                tempStartPoint, testP, tempEndPoint, control.isFixed,
987

  
988
                                                                            var border = control.GetBorderRectangle(tempEndPoint, scaleWidth, scaleHeight);
989
                                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(border,
990
                                                                                tempStartPoint, testP, ConnectionPoint, control.isFixed,
1052 991
                                                                                LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight,
1053 992
                                                                            FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1054 993
                                                                        }
1055 994
                                                                        else
1056 995
                                                                        {
1057
                                                                            //인구 수정 Arrow Text Style적용 되도록 변경
1058
                                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(tempEndPoint, new Point(tempEndPoint.X + control.BoxWidth / scaleWidth, tempEndPoint.Y - control.BoxHeight / scaleHeight),
1059
                                                                                newStartPoint, tempMidPoint, tempEndPoint, control.isFixed,
996
                                                                            var border = control.GetBorderRectangle(tempEndPoint, scaleWidth, scaleHeight);
997
                                                                            Controls_PDF.DrawSet_Text.DrawString_ArrowText(border,
998
                                                                                newStartPoint, tempMidPoint, ConnectionPoint, control.isFixed,
1060 999
                                                                                LineSize, contentByte, _SetColor, Paint, fontsize, isHighlight, FontHelper.GetFontFamily(control.fontConfig[0]), fontStyle, fontWeight, decoration, Text, sizeF, Opacity, Angle);
1061 1000
                                                                        }
1062 1001
                                                                    }
......
1065 1004
                                                                {
1066 1005
                                                                    throw ex;
1067 1006
                                                                }
1068

  
1069 1007
                                                            }
1070 1008
                                                            break;
1071 1009
                                                        #endregion

내보내기 Unified diff

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