Exemplo n.º 1
0
		public override IExportColumn CreateExportColumn(){
			var export = new ExportImage();
			export.ToExportItem(this);
			
			export.Image = Image;
			export.ScaleImageToSize = ScaleImageToSize;
			return export;
		}
Exemplo n.º 2
0
 public virtual void Visit(ExportImage exportImage)
 {
 }
Exemplo n.º 3
0
 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());
     }
 }
Exemplo n.º 4
0
		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;
		}