프로젝트

일반

사용자정보

개정판 3212270d

ID3212270d4b55c5849b14e41ff6f07d2dedd39d87
상위 4d701de6
하위 752b18ef

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

Compare 수정전 커밋

Change-Id: I6201f815b91f44135ee5ca12498ef0cd31a4def4

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/Controls_PDF/DrawSet_DrawString.cs
183 183
        /// <param name="size"></param>
184 184
        /// <param name="opac"></param>
185 185
        /// <param name="Angle"></param>
186
        public static void DrawString_ArrowText(Point sp, Point ep, Point ptHead, Point ptMid,Point ptEnd, bool bIsFixed,
186
        public static void DrawString_ArrowText(Point sp, Point ep, Point ptHead, Point ptMid, Point ptEnd, bool bIsFixed,
187 187
            double lineSize, iTextSharp.text.pdf.PdfContentByte contentByte, SolidColorBrush color, PaintSet PaintStyle, double FontSize,
188 188
                                   bool isHighlight, FontFamily fontFamilly, FontStyle fontstyle, FontWeight fontweight, TextDecorationCollection isUnderline,
189 189
                                   string text, System.Drawing.SizeF size, double opac, double Angle)
......
201 201
            mat.RotateAt((float)Angle * -1, new System.Drawing.PointF((float)sp.X, (float)sp.Y));
202 202

  
203 203
            /// up to here
204
            
204

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

  
207 207
            if (Angle == 270 || Angle == 90)
......
214 214
                    new System.Drawing.PointF((float)points[2].X, (float)points[2].Y),
215 215
                    new System.Drawing.PointF((float)points[3].X, (float)points[3].Y)
216 216
                };
217

  
218

  
217 219
                mat.TransformPoints(border);   /// transform if given angle is not 0
218 220
                var transformed = border.Select(param => new Point(param.X, param.Y)).ToList();
219 221

  
222
                if (Angle == 90 || Angle == 270)
223
                {
224
                    transformed.Add(new Point(transformed[0].X, transformed[0].Y - (transformed[0].Y - transformed[3].Y) / 2));
225
                    transformed.Add(new Point(transformed[1].X, transformed[1].Y - (transformed[1].Y - transformed[2].Y) / 2));
226
                }
227

  
220 228
                ptEnd = MathSet.getNearPoint(transformed, ptMid);
221 229
            }
222 230
            else
KCOM/Common/ImageSourceHelper.cs
64 64

  
65 65
        public static BitmapImage GetDownloadImage(string uri)
66 66
        {
67
            return GetDownloadImage(new Uri(uri));
67
            return GetDownloadImage(new Uri(uri),null);
68
        }
69
        public static BitmapImage GetDownloadImage(string uri,System.Windows.Size DecodeSize)
70
        {
71
            return GetDownloadImage(new Uri(uri), DecodeSize);
68 72
        }
69 73

  
70
        public static BitmapImage GetDownloadImage(Uri uri)
74
        public static BitmapImage GetDownloadImage(Uri uri, System.Windows.Size? DecodeSize)
71 75
        {
72 76
            BitmapImage resultImage = new BitmapImage();
73 77

  
74 78
            resultImage.BeginInit();
79

  
80
            if(DecodeSize != null)
81
            {
82
                resultImage.DecodePixelWidth = (int)DecodeSize.Value.Width;
83
                resultImage.DecodePixelHeight = (int)DecodeSize.Value.Height;
84
            }
85

  
75 86
            resultImage.CacheOption = BitmapCacheOption.OnLoad;
76 87
            resultImage.UriCachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.Default);
77 88
            resultImage.UriSource = uri;
KCOM/Views/MainMenu.xaml
911 911
                                                    <telerik:RadButton Content="OPEN" telerik:StyleManager.Theme="Office2016"  Foreground="White"
912 912
                                                                       Background="Transparent" HorizontalAlignment="Stretch" Click="RadButton_Click" CommandParameter="{Binding}"/>
913 913
                                                </Border>-->
914
                                                <telerik:RadButton  Margin="5" BorderThickness="0" Click="RadButton_Click" CommandParameter="{Binding}" Background="Transparent"
914
                                                <telerik:RadButton  Margin="5" BorderThickness="0" Click="btnSync_Click" CommandParameter="{Binding}" Background="Transparent"
915 915
                                                                   Visibility="{Binding IsSyncPossible, Converter={StaticResource BoolToVisibleConverter}}">
916 916
                                                    <telerik:RadButton.Content>
917 917
                                                        <Image Source="/KCOM;component/Resources/Images/MenuImage_new/file.png" Stretch="Uniform" Width="20" Height="20"/>
KCOM/Views/MainMenu.xaml.cs
5057 5057
            }
5058 5058
        }
5059 5059

  
5060
        private void RadButton_Click(object sender, RoutedEventArgs e)
5060
        private void btnSync_Click(object sender, RoutedEventArgs e)
5061 5061
        {
5062 5062
            gridViewHistory_Busy.IsBusy = true;
5063 5063

  
......
5092 5092
                        string uri = this.GetImageURL(CurrentRev.DOCUMENT_ID, pageNavigator.CurrentPage.PageNumber);
5093 5093

  
5094 5094
                        Sync_Offset_Point = new Point(zoomAndPanControl.ContentOffsetX, zoomAndPanControl.ContentOffsetY);
5095

  
5095
                        
5096 5096
                        var defaultBitmapImage_Compare = ImageSourceHelper.GetDownloadImage(uri);
5097 5097
                        ViewerDataModel.Instance.ImageViewPath_C = defaultBitmapImage_Compare;
5098 5098
                        ViewerDataModel.Instance.ImageViewWidth_C = defaultBitmapImage_Compare.PixelWidth;
KCOM_API/ServiceDeepView.svc.cs
280 280
            return result;
281 281
        }
282 282

  
283
        /// <summary>
284
        /// 두 페이지를 비교하여 결과를 리턴한다
285
        /// </summary>
286
        /// <param name="projectNo"></param>
287
        /// <param name="originDocItem_ID"></param>
288
        /// <param name="targetDocItem_ID"></param>
289
        /// <param name="originPageNo"></param>
290
        /// <param name="targetPageNo"></param>
291
        /// <param name="isInternalAddress"></param>
292
        /// <returns></returns>
293
        [OperationContract]
294
        public List<Rect> GetComparefixSize(string projectNo, string originDocItem_ID, string targetDocItem_ID, string originPageNo, string targetPageNo,Size FixSize, string isInternalAddress)
295
        {
296
            List<Rect> result = new List<Rect>();
297

  
298
            try
299
            {
300
                string originFile = "";
301
                string targetFile = "";
302

  
303
                string sOriginFolder = originDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(originDocItem_ID) / 100).ToString() : (originDocItem_ID.Length >= 5 ? originDocItem_ID.Substring(0, 5) : originDocItem_ID);
304
                string sTagetFolder = targetDocItem_ID.All(char.IsDigit) ? (Convert.ToUInt32(targetDocItem_ID) / 100).ToString() : (targetDocItem_ID.Length >= 5 ? targetDocItem_ID.Substring(0, 5) : targetDocItem_ID);
305

  
306
                if (Boolean.Parse(isInternalAddress))
307
                {
308
                    originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sOriginFolder, originDocItem_ID, originPageNo);
309
                    targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, sTagetFolder, targetDocItem_ID, targetPageNo);
310
                }
311
                else
312
                {
313
                    originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, originDocItem_ID, originPageNo);
314
                    targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath_SUB, projectNo, targetDocItem_ID, targetPageNo);
315
                }
316

  
317
                using (Markus.Image.ImageCompare compareLib = new Markus.Image.ImageCompare())
318
                {
319

  
320
                    result = compareLib.CompareReturnRects(originFile, targetFile, new System.Drawing.Size(20, 20));
321
                }
322
            }
323
            catch (Exception ex)
324
            {
325
                System.Diagnostics.Debug.WriteLine("KCOM_API - GetCompareRect : " + ex.ToString());
326
                //throw new FaultException(ex.ToString() + " Inner Exception : " + ex.InnerException?.ToString());
327
            }
328

  
329

  
330
            return result;
331
        }
332

  
283 333
        //[OperationContract]
284 334
        //public List<Rect> GetCompareRect_old(string projectNo, string originDocItem_ID, string targetDocItem_ID, string originPageNo, string targetPageNo, string isInternalAddress)
285 335
        //{

내보내기 Unified diff

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