프로젝트

일반

사용자정보

개정판 66128b37

ID66128b3759dfee52d1fa942bae5e18a7249b89d4
상위 12bdcd4b
하위 3e2e0589

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

issue #937: calculate font size to fit given text boundary

Change-Id: If308140683a42e3fc20f6bb28b75507a93a5273d

차이점 보기:

FinalService/KCOM_FinalService/KCOM_FinalService/Remoting/RemFinalPDFStation.cs
52 52
            try
53 53
            {
54 54
                //_MyIP = System.Net.Dns.Resolve(System.Net.Dns.GetHostName()).AddressList[0].ToString();
55

  
56 55
                using (KCOMDataModel.DataModel.KCOMEntities _systemEntity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
57 56
                {
58 57
#if DEBUG
......
214 213
                    {
215 214
                        System.IO.Directory.CreateDirectory(saveFolder);
216 215
                    }
217
                    sendReqLog("saveFolder", saveFolder);
216

  
217
                    this._Log.Write(String.Format("saveFolder : {0}", saveFolder) + DateTime.Now);
218 218
                    System.IO.File.Copy(e.FinalPDFPath, saveFolder + e.OriginPDFName, true);
219 219

  
220 220
                    using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(_item.PROJECT_NO).ToString()))
......
242 242

  
243 243
        public static void sendReqLog(string name, string text)
244 244
        {
245
#if DEBUG
245 246
            try
246 247
            {
247 248
                string Msg = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "\t" + name + "\t" + text + "\r\n";
......
261 262
            {
262 263
                //  Debug.WriteLine(e);
263 264
            }
265
#endif
264 266
        }
265 267

  
266 268

  
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/DrawSet_Cloud.cs
56 56
        } 
57 57

  
58 58
        public static void DrawCloud(List<Point> points, double lineSize, double arcLength, PdfContentByte contentByte, System.Windows.Media.DoubleCollection DashSize,
59
                                    SolidColorBrush color, PaintSet PaintStyle, double opac)
59
                                    SolidColorBrush color, SolidColorBrush fillColor, PaintSet PaintStyle, double opac)
60 60
        {
61 61
            BaseColor bs = new BaseColor(color.Color.R, color.Color.G, color.Color.B, color.Color.A);
62 62
            contentByte.SaveState();
......
88 88
                    GenerateLineWithCloud(points[i % count], points[(i + 1) % count], arcLength, contentByte);
89 89
                }
90 90
                contentByte.MoveTo(points[0].X, points[0].Y);   /// move to start point
91
                HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintSet.None, bs);
91
                HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintSet.None, bs, opac);
92 92

  
93 93
                if (PaintStyle != PaintSet.None)
94 94
                {
95 95
                    contentByte.NewPath();
96 96
                    contentByte.MoveTo(points[0].X, points[0].Y);
97 97
                    for (int i = 1; i <= points.Count; ++i) contentByte.LineTo(points[i%points.Count].X, points[i%points.Count].Y);
98
                    HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs);
98
                    bs = new BaseColor(fillColor.Color.R, fillColor.Color.G, fillColor.Color.B, fillColor.Color.A);
99
                    HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs, opac);
99 100
                }
100 101
            }
101 102
            contentByte.RestoreState();
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/DrawSet_Symbol.cs
17 17
    {
18 18
        public static void DrawApproval(Point sp, Point ep, List<Point> pointSet, PdfContentByte contentByte, SolidColorBrush color, double Angle, double opac, string ApprovedImgPath)
19 19
        {
20

  
21
            ///TODO: move below APPROVED_CODE to external
22
            
23
            /*
24
            string APPROVED_CODE = @"iVBORw0KGgoAAAANSUhEUgAAAfAAAADYCAYAAAAUJLEJAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUisiGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5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+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+lf65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeKj3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAAHypJREFUeF7t3b3OJkeZxvHRWloHDhCnQIAlAhICSyRO0AYbEKzEBlgiICBxYAkHDggcEEBCYomAxIElHHAKiIAAJBBzCJwCZzCvt66ZLaanfXfVXV0fXdXPP/ih8bz9Uf1R91Vd3e/w7KuvvnrDiy+++M7TRx/95On9938DAAAu9vHHP37x5Zff3uf16+D+7LPvP73zzp/DXz1/+dcAAGAWz5++8Y0/vfj88+++EeBPv/jF/+iHmwUBAMB8nj/96lf/9TLAX/z97//x9NZbf9stAAAAJvT09tt/eRngTx988PP9DwEAwLSeP3344U+fPb377u+NHwIAgEk9vffeb5+FP/DuGwCAhejVNwEOAMB6nhPgAACshwAHAGBBBDgAAAsiwAEAWFBxgD9/+e+kf/rpDwEAQCMhW5Wxu8xNKQ/w+G+wAgCAhgh
28
                                     wAAAWRIADALAgAhwAgAUR4AAALIgABwBgQQQ4AAALIsABAFgQAQ4AwIIIcAAAFkSAAwCwIAIcAIAFEeAAACyIAAcAYEEEOAAACyLAAQBYEAEOAMCCCHAAABZEgAMAsCACHACABRHgAAAsiAAHAGBBBDgAAAsiwAEAWBABDgDAgghwAAAWRIADALAgAhwAgAUtHeDPwk4AzOgHwSf/759B6LFJ/wri8lrX2iawhnBHD0GA/5sKR9hq1vcCa/1evO1qJRZRaX2sdzoWhYy1zxG2x/XNwGrfFX4U/C6w2nyGtqVtWvs6y9M+DSasdUf4dWC1aUvX3Vo3uvLe9LDafGTUsfwj2PYrqy1+YYtDEOD/pgsYtpqlAmCt34tuJqsdI6kNLYLiTscyU5HUvfuzwGrnCNq35yn7LG271fF578HWAwcvDR6s9mzlzgUB3obuO90vVrvSwtpDEOAv6eksbNFFHWzkU88MoRedu5lfu9OxzFgkVXDULqu9PWhf3oFvC9pX7fGp73pCcvRAXTRosNqy5ZkdmPHe3LLafGSWYymrF2GNIQjwlzzTVlsjn3ZmCj1REf1WYLU1507HMnORHHF/lvaZlmoHX95p9NGvJ/4QWG3Z0nm31t0iwPvwD5DD0kMQ4C95RuRbKvzWdnqYLfREN/KZ4LvTscxeJHuFuELtj4G1z5HUhrMB6712IwfqOharDXuebzkI8L7y90VYaggC3DVtZfGNxOrNGHpyZhBzp2OZvUhK6w/3FDI6V9a+UjRA1rWX/Tbj32sgZa2boracDXHPceiJ2Fq3B0/f8N6nBHh/6RAPSwxBgLumrSyj3pF5OvZVPNN5W3c6lhUCXKFotf2MM+GtvlUy0NWAo7Q/ng1x7714doBQynNuvTMCBPgYxx86hp8O8eABrs4ZtnTKqHdknkJTO9WnG1H78bwb3CuZfr7TsXgKS6tBns6JjunMU2rt+YxKglVhVBLcewryksHCmSdlb9/XebfWb8nzEW1JvfHcmyOOq4We/UznU+fh
29
                                     bN/SNbFrRvjpEA8e4LpwYUunjegEnja2KtKim7rkHWfJk+udjmVkgG9pvyXhpmWt7ZQo6SdnwvRIyaChdAZFPNvX/WOt25Labu17q+ReIsDPOTsD9PVthZ8M8eABfmbUtdWiOOaMDr3IeyNrFGqtb7nTsVwV4FHJwKTmXbjn6TDqEQolg4fS4/R+/3LmI8cSnjqk+81a10KA19E+VQusfVm+fi7D3w7xwAHuuTFad6wzrgo9Pb16BzjewnmnY7misOx5n8RrivWIfeR4nlBF19haP8VTqHsem7cOWese8Wyz5zG1dFU/06DNWzN0D6nGvF4//O0QDxzguuhhK0kKE+vvt3oX6atCTzydR7zF4E7HclVh2fI+HZ9th+f+F81wWOu35J1FKb1/PIODnjNtnjpUGrYEeBslIf7m+Qx/M8SDBrhGS7mRdyxKueW+Pvpq68rQE88N7C3gdzqWGQJcPFPpZ9/jes5X7/s/UjHN9UVRm631j3gHQaXT8x6eOiSl55cAb8ezf3mzH4S/GeJBA9zzZBFvcM8IvWdnuDr0PMfvDYg7HcssAe45p6WhJt7C1fN67Xn6rZS2yTMI0r1jrVvDczxnZjcI8LY8dUNe33fhv4Z40AD3dNj44YpnhH6mQHpdHXqeIuM9/jsdyywB7mnHmfvTM2Xd874/on1abdkqnXFoeV+U8NSh4981PkaAt+WdKXl934X/GuIBA1zBHNZO2hcAz4c8utG267Rydei1DIg7HcsMhUVaHlOkgmVtZ++KEPCErcQBuIe3QLfs4546dHbQ4LknCPAyntolr6bRw5+GeMAAPxMinnV63URn2ttSy4C407GsVFhKn0i9v171+p3fON6w1Xmx1j+ia2VtZ6vl9fRct9JjiAjw9jwDLnk1YxL+NMQDBrgKdFj70JsfI7yi/7aW3etR0DwdvWfoefbv/Ur3TscyS2HxTMOWvkdt+a1AD57p/dJj9lxP1QZr3TNydUhKZhG2CPA+PDOxr76VCH8a4sEC3HMzHHV8T
30
                                     9Ho0SmuDj3Pk4m3WN7pWGYoLJ42SOl96SlUVwaA5z46E7aeUD3zTnrPc91qBkie7V95/UrM0M8iz8D21QNA+NMQDxbgngJ+1EE904re6dcSV4aed7rS+4XunY7l6sKi4/EEjpT8CpR3tqnHr1V5eX/1q/QJ1nN/lj7ZWzxBUNMPCPA+PBnwauAY/jTEAwW4p4DnRu2eANANZ6171pWh59m3eJ9K7nQsVxcWz9S5lA4qveGo/mStP4qnL3qvZeR5z6n91h67pw7V7IMA78P7HvybZl718EABrmAIayXlnr48I+cWI/Stq0LPW8jFW2zudCxXFRaFkvfJW0rPp+cpo8dMUynPAOZMSHleldXco57z650FOkKA92Ptf+97Zl718EAB7unwuWnBK55Orgg9dRrPE46UvKu707GMKiy653TexHsckfeDvC3PNSo5T73o3Fpt29KxWOumeAK25vg9A4RcHcrx3JtXsNqaM1uAewbPPzDzqocHCXDP1Ie32I3+wMdTUFuFns6TpzBuqYNZ27Lc6VhmLZKRwl7nwGp7iucajSyYR3q20zNQOjNI1zrWtrbODLr2CPB+PPX/Z2Ze9fAgAe7p7FrGWnfPs62WU4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/vTi88+/G3P75f9svfjii++8/PfO33//NwAA4GIff/zjF19++e038/qrZ/8Ha84BdpHOnnEAAAAASUVORK5CYII=";
38
        
39 20
            contentByte.SaveState();
40 21
            BaseColor bs = new BaseColor(color.Color.R, color.Color.G, color.Color.B, color.Color.A);
41 22
            var midP = MathSet.getMiddlePoint(sp, ep);
42 23

  
43

  
44
            var Rect3 = GetPointsToRectX(pointSet);
45

  
46
            byte[] imageBytes = Convert.FromBase64String(APPROVED_CODE);
47

  
48
            Image img = Image.GetInstance(imageBytes);
49
            var imgTemp = imageToByteArray2(imageToByteArray(imageBytes), color);
50
            img = Image.GetInstance(imgTemp);
51

  
52

  
53
            */
54
    
55

  
56
            contentByte.SaveState();
57
            BaseColor bs = new BaseColor(color.Color.R, color.Color.G, color.Color.B, color.Color.A);
58
            var midP = MathSet.getMiddlePoint(sp, ep);
59

  
60

  
61 24
            var Rect3 = GetPointsToRectX(pointSet);
62 25

  
63 26
            Image img = Image.GetInstance(new Uri(ApprovedImgPath));
......
84 47
            BaseColor bs = new BaseColor(color.Color.R, color.Color.G, color.Color.B, color.Color.A);
85 48
            var midP = MathSet.getMiddlePoint(sp, ep);
86 49

  
87

  
88 50
            var Rect3 = GetPointsToRectX(pointSet);
89 51

  
90
            
91

  
92 52
            sendReqLog("CheckMarkImgPath", ImgPath);
93 53
            Image img = Image.GetInstance(new Uri(ImgPath));
94 54

  
95 55
            double ratioX = Rect3.Width / (double)img.Width;
96 56
            double ratioY = Rect3.Height / (double)img.Height;
97

  
98 57
            double ratio = Math.Min(ratioX, ratioY);
99 58

  
100 59
            int newWidth = (int)(img.Width * ratio);
......
116 75
            contentByte.AddImage(img);
117 76
            contentByte.RestoreState();
118 77
        }
78

  
119 79
        public static void sendReqLog(string name, string text)
120 80
        {
81
#if DEBUG
121 82
            try
122 83
            {
123 84
                string Msg = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "\t" + name + "\t" + text + "\r\n";
......
137 98
            {
138 99
                //  Debug.WriteLine(e);
139 100
            }
101
#endif
140 102
        }
141 103

  
142 104
        public static System.Drawing.Image imageToByteArray(byte[] byteData)
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/HoneyPDFLib_DrawSet_DrawString.cs
12 12
{
13 13
    public partial class HoneyPDFLib_DrawSet_Text
14 14
    {
15
        private static iTextSharp.text.Font CreateFont(FontStyle fontstyle, FontWeight fontweight, TextDecorationCollection isUnderline, Rectangle rect, string text)
16
        {
17
            string ARIALUNI_TFF = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "Arial Unicode MS.TTF");
18

  
19
            BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
20
            string[] tokens = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.None);
21
            string sLongestStr = tokens.OrderByDescending(s => s.Length).First();
22
            float width = bf.GetWidthPoint(sLongestStr, rect.Height);
23
            float fFontSize = rect.Height*(rect.Width/width);
24

  
25
            iTextSharp.text.Font itextFont = new iTextSharp.text.Font(bf, fFontSize);
26
            itextFont.SetStyle(0);
27
            if (fontstyle == FontStyles.Italic)
28
            {
29
                //기울임
30
                itextFont.SetStyle(itextFont.Style | Font.ITALIC);
31
            }
32
            if (fontweight == FontWeights.Bold)
33
            {
34
                //굵기
35
                itextFont.SetStyle(itextFont.Style | Font.BOLD);
36
            }
37

  
38
            if (isUnderline == TextDecorations.Underline)
39
            {
40
                //밑줄;
41
                itextFont.SetStyle(itextFont.Style | Font.UNDERLINE);
42
            }
43

  
44
            return itextFont;
45
        }
46

  
15 47
        public static void DrawString(Point sp, Point ep, double lineSize, iTextSharp.text.pdf.PdfContentByte contentByte, SolidColorBrush color, PaintSet PaintStyle, double FontSize,
16 48
                                      FontFamily fontFamilly, FontStyle fontstyle, FontWeight fontweight, TextDecorationCollection isUnderline,
17 49
                                      string text, System.Drawing.SizeF size, double opac, double Angle)
......
33 65
            {
34 66
                double ArcLength = 10;  /// default arc length
35 67

  
36
                DrawSet_Cloud.DrawCloud(points, lineSize, ArcLength, contentByte, new DoubleCollection(99999), color, (PaintStyle & ~PaintSet.Hatch), opac);
68
                DrawSet_Cloud.DrawCloud(points, lineSize, ArcLength, contentByte, new DoubleCollection(99999), color, new SolidColorBrush(Color.FromRgb(255, 255, 255)), (PaintStyle & ~PaintSet.Hatch) | PaintSet.Fill, 0.7);
37 69

  
38 70
                contentByte.RestoreState();
39 71
                contentByte.SaveState();
......
48 80
                contentByte.NewPath();
49 81
                contentByte.MoveTo(points[0].X, points[0].Y);
50 82
                for (int i = 1; i <= points.Count; ++i) contentByte.LineTo(points[i%points.Count].X, points[i%points.Count].Y);
51
                HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs);
83
                HoneyPDFLib_DrawSet_Text.PaintFill(contentByte, PaintStyle, bs);
52 84
            }
53 85

  
54 86
            string ARIALUNI_TFF = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "Arial Unicode MS.TTF");
55 87

  
56
            //BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
57
            BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
58

  
59
            iTextSharp.text.Font itextFont = new iTextSharp.text.Font(bf, ((float)FontSize / (float)2.0) - 1);
60
            
61
            //iTextSharp.text.Font itextFont = new iTextSharp.text.Font(bf, (float) 10);
62
            itextFont.SetStyle(0);
63

  
64
            //itextFont.SetStyle(Font.ITALIC| Font.UNDERLINE);
65

  
66
            if (fontstyle == FontStyles.Italic)
67
            {
68
                //기울임
69
                itextFont.SetStyle(itextFont.Style | Font.ITALIC);
70
            }
71
            if (fontweight == FontWeights.Bold)
72
            {
73
                //굵기
74
                itextFont.SetStyle(itextFont.Style | Font.BOLD);
75
            }
88
            var calRect = MathSet.GetPointsToRectX(points);
89
            calRect.Left += (float)lineSize;
90
            calRect.Top -= (float)lineSize;
91
            calRect.Right -= (float)lineSize;
92
            calRect.Bottom += (float)lineSize;
76 93

  
77
            if (isUnderline == TextDecorations.Underline)
78
            {
79
                //밑줄;
80
                itextFont.SetStyle(itextFont.Style | Font.UNDERLINE);
81
            }
94
            iTextSharp.text.Font itextFont = HoneyPDFLib_DrawSet_Text.CreateFont(fontstyle, fontweight, isUnderline, calRect, text);
82 95

  
83 96
            contentByte.SetColorStroke(bs);
84 97
            contentByte.SetColorFill(bs);
......
98 111

  
99 112
            ct.Canvas.Transform(mat);
100 113
            ct.Canvas.SetGState(gs3);
101
            itextFont.Size -= 0.3f;
102 114
            ct.SetText(new Phrase(new Chunk(text, itextFont)));
103 115
            ct.Alignment = Element.ALIGN_CENTER | Element.ALIGN_TOP;
104 116
            ct.SetLeading(itextFont.CalculatedSize + 1, ct.MultipliedLeading);
105 117

  
106
            var calRect = MathSet.GetPointsToRectX(points);
107
            calRect.Left += (float)lineSize;
108
            calRect.Top += (float)lineSize;
109
            calRect.Right += (float)lineSize;
110
            calRect.Bottom -= (float)lineSize;
111 118
            ct.SetSimpleColumn(calRect);
112 119
            ct.Go();
113 120

  
......
135 142
            {
136 143
                double ArcLength = 10;  /// default arc length
137 144

  
138
                DrawSet_Cloud.DrawCloud(points, lineSize, ArcLength, contentByte, new DoubleCollection(99999), color, (PaintStyle & ~PaintSet.Hatch), opac);
145
                DrawSet_Cloud.DrawCloud(points, lineSize, ArcLength, contentByte, new DoubleCollection(99999), color, new SolidColorBrush(Color.FromRgb(255, 255, 255)), (PaintStyle & ~PaintSet.Hatch) | PaintSet.Fill, 0.7);
139 146

  
140 147
                contentByte.RestoreState();
141 148
                contentByte.SaveState();
......
145 152
                contentByte.NewPath();
146 153
                contentByte.MoveTo(points[0].X, points[0].Y);
147 154
                for (int i = 1; i <= points.Count; ++i) contentByte.LineTo(points[i%points.Count].X, points[i%points.Count].Y);
148
                HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs);
149
            }
150
            
151
            string ARIALUNI_TFF = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "Arial Unicode MS.TTF");
152
            BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
153

  
154
            iTextSharp.text.Font itextFont = new iTextSharp.text.Font(bf, ((float)FontSize / (float)2.0) - 1);
155
            if (PaintStyle == PaintSet.None)
156
            {
157
                itextFont.Size = ((float)FontSize / (float)2.0);
158
            }
159
            else if ((PaintStyle & PaintSet.Fill) == PaintSet.Fill)
160
            {
161
                itextFont.Size = ((float)FontSize / (float)2.0);
155
                HoneyPDFLib_DrawSet_Text.PaintFill(contentByte, PaintStyle, bs);
162 156
            }
163
            else if ((PaintStyle & PaintSet.Hatch) == PaintSet.Hatch)
164
            {
165
                itextFont.Size = ((float)FontSize / (float)2.0);
166
            }
167
            itextFont.SetStyle(0);
168 157

  
169
            if (fontstyle == FontStyles.Italic)
170
            {
171
                //기울임
172
                itextFont.SetStyle(itextFont.Style | Font.ITALIC);
173
            }
174
            if (fontweight == FontWeights.Bold)
175
            {
176
                //굵기
177
                itextFont.SetStyle(itextFont.Style | Font.BOLD);
178
            }
179

  
180
            if (isUnderline == TextDecorations.Underline)
181
            {
182
                //밑줄;
183
                itextFont.SetStyle(itextFont.Style | Font.UNDERLINE);
184
            }
158
            var calRect = MathSet.GetPointsToRectX(points);
159
            /// calculate text area except border
160
            calRect.Left += (float)lineSize;
161
            calRect.Top -= (float)lineSize;
162
            calRect.Right -= (float)lineSize;
163
            calRect.Bottom += (float)lineSize;
185 164

  
165
            iTextSharp.text.Font itextFont = HoneyPDFLib_DrawSet_Text.CreateFont(fontstyle, fontweight, isUnderline, calRect, text);
166
            
186 167
            contentByte.SetColorStroke(bs);
187 168
            contentByte.SetColorFill(bs);
188 169

  
......
201 182

  
202 183
            ct.Canvas.Transform(mat);
203 184
            ct.Canvas.SetGState(gs3);
204
            itextFont.Size -= 0.3f;
205 185
            ct.SetText(new Phrase(new Chunk(text, itextFont)));
206 186
            ct.Alignment = Element.ALIGN_CENTER | Element.ALIGN_TOP;
207 187
            ct.SetLeading(itextFont.CalculatedSize + 1, ct.MultipliedLeading);
188
            ct.SetSimpleColumn(calRect);
189
            ct.Go();
208 190

  
209
            var calRect = MathSet.GetPointsToRectX(points);
210
            calRect.Left += (float)lineSize;
211
            calRect.Top += (float)lineSize;
212
            calRect.Right -= (float)lineSize;
213
            calRect.Bottom -= (float)lineSize;
214
            if (PaintStyle == PaintSet.None)
191
            contentByte.RestoreState();
192
        }
193

  
194
        private static void PaintFill(PdfContentByte contentByte, PaintSet PaintStyle, BaseColor bs)
195
        {
196
            if ((PaintStyle & PaintSet.Highlight) == PaintSet.Highlight)
215 197
            {
216
                ct.SetSimpleColumn(calRect);
198
                PdfGState gs = new PdfGState();
199
                gs.FillOpacity = (float)0.7;
200
                contentByte.SetGState(gs);
201
                contentByte.SetColorFill(BaseColor.YELLOW);
202
                if ((PaintStyle & PaintSet.Fill) == PaintSet.Fill)
203
                {
204
                    contentByte.SetColorStroke(bs);
205
                    contentByte.ClosePathFillStroke();
206
                }
207
                else
208
                    contentByte.Fill();
209

  
210
                return;
217 211
            }
218
            else if (((PaintStyle & PaintSet.Fill) == PaintSet.Fill) || ((PaintStyle & PaintSet.Highlight) == PaintSet.Highlight))
212

  
213
            if ((PaintStyle & PaintSet.Fill) == PaintSet.Fill)
219 214
            {
220
                ct.SetSimpleColumn(calRect);
215
                PdfGState gs = new PdfGState();
216
                gs.FillOpacity = (float)0.7;
217
                contentByte.SetGState(gs);
218
                contentByte.SetColorStroke(bs);
219
                contentByte.SetColorFill(BaseColor.WHITE);
220
                contentByte.ClosePathFillStroke();
221 221
            }
222
            else if ((PaintStyle & PaintSet.Fill) == PaintSet.Hatch)
222

  
223
            if ((PaintStyle & PaintSet.Hatch) == PaintSet.Hatch)
223 224
            {
224
                ct.SetSimpleColumn(calRect);
225
            }
225
                PdfPatternPainter line = contentByte.CreatePattern(8, 8, 6, 6, bs);
226
                line.SetLineWidth(1);
227
                line.MoveTo(0, 0);
228
                line.LineTo(100, 100);
229
                line.Stroke();
230
                contentByte.SetPatternFill(line);
226 231

  
227
            ct.Go();
232
                PatternColor colors = new PatternColor(line);
233
                contentByte.SetPatternFill(line);
234
                contentByte.SetColorFill(colors);
235
                contentByte.Fill();
236
            }
228 237

  
229
            contentByte.RestoreState();
238
            if (PaintStyle == PaintSet.None)
239
            {
240
                contentByte.SetColorStroke(bs);
241
                contentByte.ClosePathStroke();
242
            }
230 243
        }
231 244
    }
232 245
}
FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/HoneyPDFLib_DrawSet_Shape.cs
29 29
                List<float> DashSet = new List<float>();
30 30
                DashSize.ToList().ForEach(data => DashSet.Add((float)data * 1));
31 31
                contentByte.SetLineDash(DashSet.ToArray(), DashSet.Count - 2);
32

  
33 32
            }
34 33

  
35 34
            /// WPF defines a device-independent pixel as 1 / 96 per inch
......
52 51
                    contentByte.LineTo((float)item.X, (float)item.Y);
53 52
                }
54 53
            }
55
            //contentByte.LineTo((float)points.First().X, (float)points.First().Y);
56 54
            contentByte.LineTo((float)points.First().X - ((float)lineSize - 2) / 2, (float)points.First().Y);
57 55

  
58
            PaintFill(contentByte, PaintStyle, bs);
59

  
56
            HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs, opac);
60 57

  
61 58
            contentByte.RestoreState();
62 59
            contentByte.ClosePath();
......
105 102
                }
106 103
            }
107 104

  
108
            PaintFill(contentByte, PaintStyle, bs);
105
            HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs, opac);
109 106
            contentByte.RestoreState();
110 107
        }
111 108
        public static void DrawCircle(Point sp, Point ep, double lineSize, PdfContentByte contentByte, System.Windows.Media.DoubleCollection DashSize,
......
144 141
            contentByte.Transform(mat2);
145 142
            contentByte.Ellipse((float)sp1.X, (float)sp1.Y, (float)ep1.X, (float)ep1.Y);
146 143

  
147

  
148
            //contentByte.Ellipse((float)calRect.X, 
149
            PaintFill(contentByte, PaintStyle, bs);
144
            HoneyPDFLib_DrawSet_Shape.PaintFill(contentByte, PaintStyle, bs, opac);
150 145
            contentByte.RestoreState();
151 146
        }
152 147

  
153
        public static void PaintFill(PdfContentByte contentByte, PaintSet PaintStyle, BaseColor bs)
148
        public static void PaintFill(PdfContentByte contentByte, PaintSet PaintStyle, BaseColor bs, double opacity)
154 149
        {
155 150
            if ((PaintStyle & PaintSet.Highlight) == PaintSet.Highlight)
156 151
            {
......
171 166

  
172 167
            if ((PaintStyle & PaintSet.Fill) == PaintSet.Fill)
173 168
            {
169
                PdfGState gs = new PdfGState();
170
                gs.FillOpacity = (float)opacity;
171
                contentByte.SetGState(gs);
174 172
                contentByte.SetColorFill(bs);
175 173
                contentByte.Fill();
176 174
            }
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
627 627
                                                DoubleCollection DashSize = control.DashSize;
628 628
                                                double Opacity = control.Opac;
629 629
                                                List<Point> PointSet = GetPdfPointSystem(control.PointSet);
630
                                                //bookmark = new Dictionary<string, object>();
631
                                                //bookmark.Add("Title", "Commented Page : " + markupItem.PAGENUMBER);
632
                                                //bookmark.Add("Page", a + " Fit");
633
                                                //bookmark.Add("Page",  "2 /XYZ 50 500 50 50");
634
                                                //var pointRect = MathSet.GetPointsToRectX(PointSet);
635

  
636
                                                //PdfDestination.INDIRECT
637
                                                //bookmark.Add("Page", String.Format("{0} /XYZ {1} {2} {3}", markupItem.PAGENUMBER, pointRect.Left, pointRect.Top, 1f));
638
                                                //bookmark.Add("Action", "GoTo");
639
                                                //bookmark.Add("Kids", outlines);
640
                                                //root.Add(bookmark);
641

  
630
                                                
642 631
                                                Controls_PDF.HoneyPDFLib_DrawSet_Shape.DrawRectangle(PointSet, LineSize, contentByte, DashSize, _SetColor, PaintStyle, Opacity);
643 632
                                        }
644 633
                                        break;
......
722 711
                                                bool reverse = (area < 0);
723 712
                                                if (PaintStyle == PaintSet.None)
724 713
                                                {
725
                                                    Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, PaintStyle, Opacity);
714
                                                    Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, _SetColor, PaintStyle, Opacity);
726 715
                                                }
727 716
                                                else
728 717
                                                {
729
                                                    Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, PaintStyle, Opacity);
718
                                                    Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, _SetColor, PaintStyle, Opacity);
730 719
                                                }
731 720
                                            }
732 721
                                            break;
......
760 749

  
761 750
                                                        if (PaintStyle == PaintSet.None)
762 751
                                                        {
763
                                                            Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, PaintStyle, Opacity);
752
                                                            Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, _SetColor, PaintStyle, Opacity);
764 753
                                                        }
765 754
                                                        else
766 755
                                                        {
767
                                                            Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, PaintStyle, Opacity);
756
                                                            Controls_PDF.DrawSet_Cloud.DrawCloud(PointSet, LineSize, ArcLength, contentByte, control.DashSize, _SetColor, _SetColor, PaintStyle, Opacity);
768 757
                                                        }
769 758
                                                    }
770 759
                                                    else

내보내기 Unified diff

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