개정판 4a54bb3a
Fix: SignControl에서 상하좌우 Margin 제거
Change-Id: I9f1aff488ae16eb7cb8abe5b496a0250b8acbfab
MarkupToPDF/Controls/Etc/SignControl.cs | ||
---|---|---|
35 | 35 |
static SignControl() |
36 | 36 |
{ |
37 | 37 |
DefaultStyleKeyProperty.OverrideMetadata(typeof(SignControl), new FrameworkPropertyMetadata(typeof(SignControl))); |
38 |
//Application.Current.Resources.MergedDictionaries.Add(Application.LoadComponent(new Uri("/MarkupToPDF;Component/Themes/generic.xaml")) as ResourceDictionary); |
|
39 |
//ResourceDictionary dictionary = new ResourceDictionary(); |
|
40 |
//dictionary.Source = new Uri("/MarkupToPDF;component/themes/generic.xaml", UriKind.RelativeOrAbsolute); |
|
41 |
//Application.Current.Resources.MergedDictionaries.Add(dictionary); |
|
42 |
//System.Diagnostics.Debug.WriteLine("resource Count :" + Application.Current.Resources.MergedDictionaries.Count); |
|
43 | 38 |
} |
44 | 39 |
|
45 | 40 |
public override void Copy(CommentUserInfo lhs) |
... | ... | |
307 | 302 |
pathFigure.IsClosed = true; |
308 | 303 |
pathGeometry.Figures.Add(pathFigure); |
309 | 304 |
|
310 |
// 상 하 좌 우 에 마진값 적용 |
|
311 |
double dMargin = -20; |
|
312 |
|
|
313 |
this.Base_Image.Width = Math.Abs(pathGeometry.Bounds.Width+ dMargin); |
|
314 |
this.Base_Image.Height = Math.Abs(pathGeometry.Bounds.Height+ dMargin); |
|
305 |
this.Base_Image.Width = Math.Abs(pathGeometry.Bounds.Width); |
|
306 |
this.Base_Image.Height = Math.Abs(pathGeometry.Bounds.Height); |
|
315 | 307 |
|
316 | 308 |
this.Tag = pathGeometry; |
317 | 309 |
|
... | ... | |
366 | 358 |
{ |
367 | 359 |
byte[] imageBytes = System.Convert.FromBase64String(_sign.ToString()); |
368 | 360 |
|
369 |
System.IO.MemoryStream stream = new System.IO.MemoryStream(); |
|
370 |
stream.Write(imageBytes, 0, imageBytes.Length); |
|
371 |
stream.Position = 0; |
|
372 |
System.Drawing.Image img = System.Drawing.Image.FromStream(stream); |
|
373 |
BitmapImage returnImage = new BitmapImage(); |
|
374 |
returnImage.BeginInit(); |
|
375 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
376 |
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png); |
|
377 |
ms.Seek(0, System.IO.SeekOrigin.Begin); |
|
378 |
returnImage.StreamSource = ms; |
|
379 |
returnImage.EndInit(); |
|
380 |
stream.Close(); |
|
381 |
|
|
382 |
this.SignImage = returnImage; |
|
361 |
using (System.IO.MemoryStream stream = new System.IO.MemoryStream()) |
|
362 |
{ |
|
363 |
stream.Write(imageBytes, 0, imageBytes.Length); |
|
364 |
stream.Position = 0; |
|
365 |
|
|
366 |
BitmapImage returnImage = new BitmapImage(); |
|
367 |
returnImage.BeginInit(); |
|
368 |
using (System.Drawing.Image img = System.Drawing.Image.FromStream(stream)) |
|
369 |
{ |
|
370 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
371 |
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png); |
|
372 |
ms.Seek(0, System.IO.SeekOrigin.Begin); |
|
373 |
returnImage.StreamSource = ms; |
|
374 |
returnImage.EndInit(); |
|
375 |
} |
|
376 |
stream.Close(); |
|
377 |
|
|
378 |
this.SignImage = returnImage; |
|
379 |
} |
|
383 | 380 |
} |
384 | 381 |
|
385 | 382 |
this.PointSet = new List<Point> |
내보내기 Unified diff