//public void DrawImage(ImagePlus image, // PointF[] destPoints, // float srcx, // float srcy, // float srcwidth, // float srcheight, // Unit srcUnit, // ImageAttributesPlus imageAttributes) //{ // SetStatus(GdiPlus.GdipDrawImagePointsRect(nativeGraphics, // image != null ? image.nativeImage // : null, // destPoints, destPoints.Length, // srcx, srcy, // srcwidth, // srcheight, // srcUnit, // imageAttributes != null // ? imageAttributes.nativeImageAttr // : new GpImageAttributes(), // IntPtr.Zero, // IntPtr.Zero)); //} //public void DrawImage(ImagePlus image, // int x, // int y, // int srcx, // int srcy, // int srcwidth, // int srcheight, // Unit srcUnit) //{ // SetStatus(GdiPlus.GdipDrawImagePointRectI(nativeGraphics, // image != null ? image.nativeImage // : null, // x, // y, // srcx, // srcy, // srcwidth, // srcheight, // srcUnit)); //} //public void DrawImage(ImagePlus image, // Rectangle destRect, // int srcx, // int srcy, // int srcwidth, // int srcheight, // Unit srcUnit, // ImageAttributesPlus imageAttributes) //{ // SetStatus(GdiPlus.GdipDrawImageRectRectI(nativeGraphics, // image != null ? image.nativeImage // : null, // destRect.X, // destRect.Y, // destRect.Width, // destRect.Height, // srcx, // srcy, // srcwidth, // srcheight, // srcUnit, // imageAttributes != null // ? imageAttributes.nativeImageAttr // : new GpImageAttributes(), // IntPtr.Zero, // IntPtr.Zero)); //} public void DrawImage(ImagePlus image, Point[] destPoints, int srcx, int srcy, int srcwidth, int srcheight, Unit srcUnit, ImageAttributesPlus imageAttributes) { SetStatus(GdiPlus.GdipDrawImagePointsRectI(nativeGraphics, image != null ? image.nativeImage : null, destPoints, destPoints.Length, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes != null ? imageAttributes.nativeImageAttr : new GpImageAttributes(), IntPtr.Zero, IntPtr.Zero)); }
public void DrawImage(ImagePlus image, RectangleF rect) { Unit unit; RectangleF bounds = image.GetBounds(out unit); DrawImage(image, rect, 0, 0, bounds.Width, bounds.Height, unit, null); }
public void DrawImage(ImagePlus image, RectangleF destRect, float srcx, float srcy, float srcwidth, float srcheight, Unit srcUnit, ImageAttributesPlus imageAttributes) { SetStatus(GdiPlus.GdipDrawImageRectRect(nativeGraphics, image != null ? image.nativeImage : null, destRect.X, destRect.Y, destRect.Width, destRect.Height, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes != null ? imageAttributes.nativeImageAttr : new GpImageAttributes(), IntPtr.Zero, IntPtr.Zero)); }
public void DrawImage(ImagePlus image, int x, int y, int width, int height) { DrawImage(image, new RectangleF(x, y, width, height)); }
public void DrawImage(ImagePlus image, Rectangle rect) { DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); }
public void DrawImage(ImagePlus image, int x, int y) { Unit unit; RectangleF bounds = image.GetBounds(out unit); bounds.X += x; bounds.Y += y; DrawImage(image, bounds, 0, 0, bounds.Width, bounds.Height, unit, null); }
public GraphicsPlus(ImagePlus image) { GpGraphics Graphics = new GpGraphics(); if (image != null) { lastResult = GdiPlus.GdipGetImageGraphicsContext(image.nativeImage, out Graphics); } SetNativeGraphics(Graphics); }
public void DrawImage(ImagePlus image, float x, float y, float width, float height) { Unit unit; RectangleF bounds = image.GetBounds(out unit); DrawImage(image, new RectangleF(x, y, width, height), 0, 0, bounds.Width, bounds.Height, unit, null); }
ImagePlus GetImage() { GpImage image; SetStatus(GdiPlus.GdipGetTextureImage((GpTexture)nativeBrush, out image)); ImagePlus retimage = new ImagePlus(image, lastResult); return(retimage); }
public void DrawImage(ImagePlus image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, Unit srcUnit) { Unit unit; RectangleF bounds = image.GetBounds(out unit); DrawImage(image, new RectangleF(x, y, srcwidth, srcheight), srcx, srcy, srcwidth, srcheight, srcUnit, null); }
public void DrawImage(ImagePlus image, PointF[] destPoints) { int count = destPoints.Length; if (count != 3 && count != 4) { SetStatus(GpStatus.InvalidParameter); } SetStatus(GdiPlus.GdipDrawImagePoints(nativeGraphics, image != null ? image.nativeImage : new GpImage(), destPoints, count)); }
// When creating a texture brush from a metafile image, the dstRect // is used to specify the size that the metafile image should be // rendered at in the device units of the destination graphics. // It is NOT used to crop the metafile image, so only the width // and height values matter for metafiles. TextureBrushPlus(ImagePlus image, WrapMode wrapMode, RectangleF dstRect) { GpTexture texture; lastResult = GdiPlus.GdipCreateTexture2( image.nativeImage, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture); SetNativeBrush(texture); }
TextureBrushPlus(ImagePlus image, Rectangle dstRect, ImageAttributesPlus imageAttributes) { GpTexture texture; lastResult = GdiPlus.GdipCreateTextureIAI( image.nativeImage, (imageAttributes != null) ? imageAttributes.nativeImageAttr : new GpImageAttributes(), dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture ); SetNativeBrush(texture); }
public TextureBrushPlus(ImagePlus image, WrapMode wrapMode) { GpTexture texture; Unit unit; RectangleF rc = image.GetBounds(out unit); lastResult = GdiPlus.GdipCreateTextureIA( image.nativeImage, new GpImageAttributes(), rc.X, rc.Y, rc.Width, rc.Height, out texture); SetNativeBrush(texture); }
TextureBrushPlus(ImagePlus image, WrapMode wrapMode, int dstX, int dstY, int dstWidth, int dstHeight) { GpTexture texture; lastResult = GdiPlus.GdipCreateTexture2I( image.nativeImage, wrapMode, dstX, dstY, dstWidth, dstHeight, out texture); SetNativeBrush(texture); }
public void DrawImage(ImagePlus image, Point point) { DrawImage(image, point.X, point.Y); }
public void DrawImage(ImagePlus image, Point[] destPoints) { int count = destPoints.Length; if (count != 3 && count != 4) SetStatus(GpStatus.InvalidParameter); SetStatus(GdiPlus.GdipDrawImagePointsI(nativeGraphics, image != null ? image.nativeImage : null, destPoints, count)); }
public void DrawImage(ImagePlus image, float x, float y) { SetStatus(GdiPlus.GdipDrawImage(nativeGraphics, image != null ? image.nativeImage : null, x, y)); }
private ImagePlus(ImagePlus C) { GdiPlus.GdipCloneImage(C.nativeImage, out this.nativeImage); }
TextureBrushPlus( ImagePlus image, WrapMode wrapMode, Rectangle dstRect ) { GpTexture texture; lastResult = GdiPlus.GdipCreateTexture2I( image.nativeImage, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, out texture); SetNativeBrush(texture); }
public static GraphicsPlus FromImage(ImagePlus image) { return new GraphicsPlus(image); }
ImagePlus GetImage() { GpImage image; SetStatus(GdiPlus.GdipGetTextureImage((GpTexture)nativeBrush, out image)); ImagePlus retimage = new ImagePlus(image, lastResult); return retimage; }
public void DrawImage(ImagePlus image, float x, float y) { SetStatus(GdiPlus.GdipDrawImage(nativeGraphics, image != null ? image.nativeImage : null, x,y)); }
public static GraphicsPlus FromImage(ImagePlus image) { return(new GraphicsPlus(image)); }