コード例 #1
0
		public override IExportColumn CreateExportColumn(){
			var export = new ExportImage();
			export.ToExportItem(this);
			
			export.Image = Image;
			export.ScaleImageToSize = ScaleImageToSize;
			return export;
		}
コード例 #2
0
 public virtual void Visit(ExportImage exportImage)
 {
 }
コード例 #3
0
ファイル: PdfVisitor.cs プロジェクト: ichengzi/SharpDevelop
 public override void Visit(ExportImage exportImage)
 {
     XImage image = XImage.FromGdiPlusImage(exportImage.Image);
     var location = PdfHelper.LocationRelToParent(exportImage);
     if (exportImage.ScaleImageToSize) {
         xGraphics.DrawImage(image, location.X.ToPoint(), location.Y.ToPoint(),
                             exportImage.Size.Width.ToPoint(),exportImage.Size.Height.ToPoint());
     } else {
         xGraphics.DrawImage(image, location.X.ToPoint(), location.Y.ToPoint(),
                             exportImage.Image.Size.Width.ToPoint(),exportImage.Image.Size.Height.ToPoint());
     }
 }
コード例 #4
0
ファイル: WpfVisitor.cs プロジェクト: lvv83/SharpDevelop
		public override void Visit(ExportImage exportImage)
		{
			var visual = new DrawingVisual();
			using (var dc = visual.RenderOpen()){
				var iss = ToBitmapSource(exportImage.Image);
				dc.DrawImage(iss,new Rect(exportImage.Location.ToWpf(),
				                          new Size(exportImage.Size.Width,exportImage.Size.Height)));
			}
			var drawingElement = new DrawingElement(visual);
			UIElement = drawingElement;
		}