Beispiel #1
0
        TextureBrushPlus(ImagePlus image,
                         GpRect dstRect,
                         ImageAttributesPlus imageAttributes)
        {
            GpTexture texture;

            lastResult = NativeMethods.GdipCreateTextureIAI(
                image.nativeImage,
                (imageAttributes != null) ? imageAttributes.nativeImageAttr : new GpImageAttributes(),
                dstRect.X,
                dstRect.Y,
                dstRect.Width,
                dstRect.Height,
                out texture
                );

            SetNativeBrush(texture);
        }
Beispiel #2
0
 public GpStatus DrawImage(ImagePlus image,
                   GpPoint[] destPoints,
                  int srcx,
                  int srcy,
                  int srcwidth,
                  int srcheight,
                  Unit srcUnit,
                   ImageAttributesPlus imageAttributes)
 {
     return SetStatus(NativeMethods.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));
 }
Beispiel #3
0
 public GpStatus DrawImage(ImagePlus image,
                   GpRectF destRect,
                  float srcx,
                  float srcy,
                  float srcwidth,
                  float srcheight,
                  Unit srcUnit,
                   ImageAttributesPlus imageAttributes)
 {
     return SetStatus(NativeMethods.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));
 }
Beispiel #4
0
        TextureBrushPlus(ImagePlus image,
                     GpRect dstRect,
                     ImageAttributesPlus imageAttributes)
        {
            GpTexture texture;

            lastResult = NativeMethods.GdipCreateTextureIAI(
                image.nativeImage,
                (imageAttributes != null) ? imageAttributes.nativeImageAttr : new GpImageAttributes(),
                dstRect.X,
                dstRect.Y,
                dstRect.Width,
                dstRect.Height,
                out texture
            );

            SetNativeBrush(texture);
        }