개정판 ab7fe8c0
Fix: Sign, Image Control에서 AxisLock이 설정되어 있으면 혹은 Shift Key를 누르면 크기를 정비율로 수정되도록 수정
Change-Id: I2f4b32afd4792e40bc896de780751c4680c9deee
KCOM/Views/TopMenu.xaml.cs | ||
---|---|---|
58 | 58 |
var result = dialog.ShowDialog(); |
59 | 59 |
if (result == System.Windows.Forms.DialogResult.OK) |
60 | 60 |
{ |
61 |
//using (Leadtools.Codecs.RasterCodecs codecs = new Leadtools.Codecs.RasterCodecs()) |
|
62 |
//{ |
|
63 |
System.Drawing.Image t_image = System.Drawing.Image.FromFile(dialog.FileName); |
|
64 |
|
|
65 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
66 |
t_image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); |
|
67 |
BitmapImage ix = new BitmapImage(); |
|
68 |
ix.BeginInit(); |
|
69 |
ix.CacheOption = BitmapCacheOption.OnLoad; |
|
70 |
ix.StreamSource = ms; |
|
71 |
ix.EndInit(); |
|
72 |
|
|
73 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Source = ix; |
|
74 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width = ix.Width; |
|
75 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height = ix.Height; |
|
76 |
|
|
77 |
|
|
78 |
//this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image = codecs.Load(dialog.FileName, 0, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1); |
|
79 |
//imageViewer.Image = codecs.Load(dialog.FileName, 24, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1); |
|
80 |
//imageViewer.Image.AnimationBackground = Leadtools.RasterColor.White; |
|
81 |
|
|
82 |
//var d = imageViewer.Image.CreateThumbnail(100, 100, 24, Leadtools.RasterViewPerspective.TopLeft, Leadtools.RasterSizeFlags.None); |
|
83 |
//RasterImageViewer vvv = new RasterImageViewer(); |
|
84 |
//vvv.Image = d; |
|
85 |
//zoomAndPanCanvas.Children.Add(vvv); |
|
86 |
|
|
87 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width); |
|
88 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height); |
|
89 |
|
|
90 |
//this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageWidth); |
|
91 |
//this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageHeight); |
|
92 |
|
|
93 |
Common.ViewerDataModel.Instance.ContentWidth = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width; |
|
94 |
Common.ViewerDataModel.Instance.ContentHeight = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height; |
|
95 |
//zoomAndPanControl.AnimatedScaleToFit(); |
|
96 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanControl.ScaleToFit(); |
|
97 |
//} |
|
61 |
System.Drawing.Image t_image = System.Drawing.Image.FromFile(dialog.FileName); |
|
62 |
|
|
63 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
64 |
t_image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); |
|
65 |
BitmapImage ix = new BitmapImage(); |
|
66 |
ix.BeginInit(); |
|
67 |
ix.CacheOption = BitmapCacheOption.OnLoad; |
|
68 |
ix.StreamSource = ms; |
|
69 |
ix.EndInit(); |
|
70 |
|
|
71 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Source = ix; |
|
72 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width = ix.Width; |
|
73 |
this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height = ix.Height; |
|
74 |
|
|
75 |
//this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image = codecs.Load(dialog.FileName, 0, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1); |
|
76 |
//imageViewer.Image = codecs.Load(dialog.FileName, 24, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1); |
|
77 |
//imageViewer.Image.AnimationBackground = Leadtools.RasterColor.White; |
|
78 |
|
|
79 |
//var d = imageViewer.Image.CreateThumbnail(100, 100, 24, Leadtools.RasterViewPerspective.TopLeft, Leadtools.RasterSizeFlags.None); |
|
80 |
//RasterImageViewer vvv = new RasterImageViewer(); |
|
81 |
//vvv.Image = d; |
|
82 |
//zoomAndPanCanvas.Children.Add(vvv); |
|
83 |
|
|
84 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width); |
|
85 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height); |
|
86 |
|
|
87 |
//this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageWidth); |
|
88 |
//this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageHeight); |
|
89 |
|
|
90 |
Common.ViewerDataModel.Instance.ContentWidth = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width; |
|
91 |
Common.ViewerDataModel.Instance.ContentHeight = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height; |
|
92 |
//zoomAndPanControl.AnimatedScaleToFit(); |
|
93 |
this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanControl.ScaleToFit(); |
|
98 | 94 |
} |
99 | 95 |
} |
100 | 96 |
|
내보내기 Unified diff