프로젝트

일반

사용자정보

개정판 1684a18d

ID1684a18dbc9e8f8362f30070c14be38d1b98a109
상위 dd00cda0
하위 4664e242, 0df3e6d1, 60bc5a41

김동진이(가) 5년 이상 전에 추가함

issue #1021 Sign case 추가. approved image 오류 수정.

Change-Id: I0e1c7e315cfc4f84ddc8e7488bb237e24eaec147

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/HoneyPDFLib_DrawSet_Image.cs
23 23
            if (!string.IsNullOrEmpty(soapurl))
24 24
            {
25 25
                var _ifsign = getEnsembleSign(UserID, soapurl);
26
                byte[] imageBytes = System.Convert.FromBase64String(_ifsign);
27
                using (System.IO.MemoryStream ms = new System.IO.MemoryStream(imageBytes))
26
                if(!string.IsNullOrEmpty(_ifsign))
28 27
                {
29
                    var midP = MathSet.getMiddlePoint(startPoint, endPoint);
30
                    List<System.Windows.Point> tempPoint = new List<System.Windows.Point>();
31
                    foreach (var item in pointSet)
28
                    byte[] imageBytes = System.Convert.FromBase64String(_ifsign);
29
                    using (System.IO.MemoryStream ms = new System.IO.MemoryStream(imageBytes))
32 30
                    {
33
                        tempPoint.Add(MathSet.RotateAbout(midP, item, Angle));
31
                        var midP = MathSet.getMiddlePoint(startPoint, endPoint);
32
                        List<System.Windows.Point> tempPoint = new List<System.Windows.Point>();
33
                        foreach (var item in pointSet)
34
                        {
35
                            tempPoint.Add(MathSet.RotateAbout(midP, item, Angle));
36
                        }
37

  
38
                        var Rect = GetPointsToRectX(tempPoint);
39

  
40
                        Image img = Image.GetInstance(ms);
41
                        img.ScaleAbsolute(Rect.Width, Rect.Height);
42

  
43
                        img.SetAbsolutePosition(Rect.Left + ((Rect.Width - img.ScaledWidth) / 2), Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2));
44
                        var x = Rect.Left + ((Rect.Width - img.ScaledWidth) / 2);
45
                        var y = Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2);
46
                        midP = MathSet.getMiddlePoint(new System.Windows.Point(x, y), new System.Windows.Point(x + img.ScaledWidth, y + img.ScaledHeight));
47
                        System.Drawing.Drawing2D.Matrix mat2 = new System.Drawing.Drawing2D.Matrix();
48
                        mat2.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)midP.X, (float)midP.Y));
49
                        contentByte.Transform(mat2);
50
                        PdfGState gs1 = new PdfGState();
51
                        gs1.FillOpacity = (float)opac;
52
                        contentByte.SetGState(gs1);
53
                        contentByte.AddImage(img);
34 54
                    }
55
                }else
56
                {
57
                    using (CIEntities _entity = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(projectNo).ToString()))
58
                    {
59
                        var _sign = _entity.SIGN_INFO.Where(sin => sin.MEMBER_USER_ID == UserID);
35 60

  
36
                    var Rect = GetPointsToRectX(tempPoint);
37

  
38
                    Image img = Image.GetInstance(ms);
39
                    img.ScaleAbsolute(Rect.Width, Rect.Height);
40

  
41
                    img.SetAbsolutePosition(Rect.Left + ((Rect.Width - img.ScaledWidth) / 2), Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2));
42
                    var x = Rect.Left + ((Rect.Width - img.ScaledWidth) / 2);
43
                    var y = Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2);
44
                    midP = MathSet.getMiddlePoint(new System.Windows.Point(x, y), new System.Windows.Point(x + img.ScaledWidth, y + img.ScaledHeight));
45
                    System.Drawing.Drawing2D.Matrix mat2 = new System.Drawing.Drawing2D.Matrix();
46
                    mat2.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)midP.X, (float)midP.Y));
47
                    contentByte.Transform(mat2);
48
                    PdfGState gs1 = new PdfGState();
49
                    gs1.FillOpacity = (float)opac;
50
                    contentByte.SetGState(gs1);
51
                    contentByte.AddImage(img);
61
                        if (_sign.Count() > 0)
62
                        {
63
                            byte[] imageBytes = System.Convert.FromBase64String(_sign.First().SIGN_STR);
64
                            using (System.IO.MemoryStream ms = new System.IO.MemoryStream(imageBytes))
65
                            {
66
                                var midP = MathSet.getMiddlePoint(startPoint, endPoint);
67
                                List<System.Windows.Point> tempPoint = new List<System.Windows.Point>();
68
                                foreach (var item in pointSet)
69
                                {
70
                                    tempPoint.Add(MathSet.RotateAbout(midP, item, Angle));
71
                                }
72

  
73
                                var Rect = GetPointsToRectX(tempPoint);
74

  
75
                                Image img = Image.GetInstance(ms);
76
                                img.ScaleAbsolute(Rect.Width, Rect.Height);
77

  
78
                                img.SetAbsolutePosition(Rect.Left + ((Rect.Width - img.ScaledWidth) / 2), Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2));
79
                                var x = Rect.Left + ((Rect.Width - img.ScaledWidth) / 2);
80
                                var y = Rect.Bottom + ((Rect.Height - img.ScaledHeight) / 2);
81
                                midP = MathSet.getMiddlePoint(new System.Windows.Point(x, y), new System.Windows.Point(x + img.ScaledWidth, y + img.ScaledHeight));
82
                                System.Drawing.Drawing2D.Matrix mat2 = new System.Drawing.Drawing2D.Matrix();
83
                                mat2.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)midP.X, (float)midP.Y));
84
                                contentByte.Transform(mat2);
85
                                PdfGState gs1 = new PdfGState();
86
                                gs1.FillOpacity = (float)opac;
87
                                contentByte.SetGState(gs1);
88
                                contentByte.AddImage(img);
89
                            }
90
                        }
91
                    }
52 92
                }
93
                
53 94
            }
54 95
            else
55 96
            {
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
1057 1057
                                                double Angle = control.Angle;
1058 1058
                                                double Opacity = control.Opac;
1059 1059
                                                
1060
                                                string imgpath = CommonLib.Common.GetConfigString("ApprovedImgPath", "URL", "");
1060
                                                string imgpath = CommonLib.Common.GetConfigString("CheckmarkImgPath", "URL", "");
1061 1061
                                                Controls_PDF.HoneyPDFLib_DrawSet_Symbol.DrawCheckMark(StartPoint, EndPoint, pointSet, contentByte, _SetColor, Angle, Opacity, imgpath);
1062 1062
                                            }
1063 1063
                                            break;

내보내기 Unified diff

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