Beispiel #1
0
 GetBounds(out GpRect rect,
           GraphicsPlus g)
 {
     return(SetStatus(NativeMethods.GdipGetRegionBoundsI(nativeRegion,
                                                         g.nativeGraphics,
                                                         out rect)));
 }
Beispiel #2
0
 public void GetBounds(out GpRect rect)
 {
     rect.X      = X;
     rect.Y      = Y;
     rect.Width  = Width;
     rect.Height = Height;
 }
Beispiel #3
0
 public bool Equals(GpRect rect)
 {
     return(X == rect.X &&
            Y == rect.Y &&
            Width == rect.Width &&
            Height == rect.Height);
 }
Beispiel #4
0
 public GpStatus AddArc(GpRect rect,
                        float startAngle,
                        float sweepAngle)
 {
     return(AddArc(rect.X, rect.Y, rect.Width, rect.Height,
                   startAngle, sweepAngle));
 }
Beispiel #5
0
 public bool IntersectsWith(GpRect rect)
 {
     return(GetLeft() < rect.GetRight() &&
            GetTop() < rect.GetBottom() &&
            GetRight() > rect.GetLeft() &&
            GetBottom() > rect.GetTop());
 }
Beispiel #6
0
        RegionPlus(GpRect rect)
        {
            GpRegion region = new GpRegion();

            lastResult = NativeMethods.GdipCreateRegionRectI(ref rect, out region);

            SetNativeRegion(region);
        }
Beispiel #7
0
        RegionPlus(GpRect rect)
        {
            GpRegion region = new GpRegion();

            lastResult = NativeMethods.GdipCreateRegionRectI(ref rect, out region);

            SetNativeRegion(region);
        }
Beispiel #8
0
 public GpStatus LockBits(
     GpRect rect,
     uint flags,
     PixelFormat format,
     BitmapData lockedBitmapData
     )
 {
     return(SetStatus(NativeMethods.GdipBitmapLockBits(
                          (GpBitmap)(IntPtr)nativeImage,
                          rect,
                          flags,
                          format,
                          lockedBitmapData)));
 }
Beispiel #9
0
        static public bool Union(out GpRect c,
                                 GpRect a,
                                 GpRect b)
        {
            int right  = Math.Max(a.GetRight(), b.GetRight());
            int bottom = Math.Max(a.GetBottom(), b.GetBottom());
            int left   = Math.Min(a.GetLeft(), b.GetLeft());
            int top    = Math.Min(a.GetTop(), b.GetTop());

            c.X      = left;
            c.Y      = top;
            c.Width  = right - left;
            c.Height = bottom - top;
            return(!c.IsEmptyArea());
        }
Beispiel #10
0
        IsVisible(GpRect rect,
                  GraphicsPlus g)
        {
            bool booln = false;

            SetStatus(NativeMethods.GdipIsVisibleRegionRectI(nativeRegion,
                                                             rect.X,
                                                             rect.Y,
                                                             rect.Width,
                                                             rect.Height,
                                                             (g == null)
                                                            ? new GpGraphics() : g.nativeGraphics,
                                                             out booln));
            return(booln);
        }
Beispiel #11
0
        LinearGradientBrush(GpRect rect,
                            Color color1,
                            Color color2,
                            LinearGradientMode mode)
        {
            GpLineGradient brush;

            lastResult = NativeMethods.GdipCreateLineBrushFromRectI(ref rect,
                                                                    color1.ToArgb(),
                                                                    color2.ToArgb(),
                                                                    mode,
                                                                    WrapMode.WrapModeTile,
                                                                    out brush);

            SetNativeBrush(brush);
        }
Beispiel #12
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 #13
0
        LinearGradientBrush(GpRect rect,
                            Color color1,
                            Color color2,
                            float angle,
                            bool isAngleScalable)
        {
            GpLineGradient brush = new GpLineGradient();

            lastResult = NativeMethods.GdipCreateLineBrushFromRectWithAngleI(ref rect,
                                                                             color1.ToArgb(),
                                                                             color2.ToArgb(),
                                                                             angle,
                                                                             isAngleScalable,
                                                                             WrapMode.WrapModeTile,
                                                                             out brush);

            SetNativeBrush(brush);
        }
Beispiel #14
0
        TextureBrushPlus(
            ImagePlus image,
            WrapMode wrapMode,

            GpRect dstRect
            )
        {
            GpTexture texture;

            lastResult = NativeMethods.GdipCreateTexture2I(
                image.nativeImage,
                wrapMode,
                dstRect.X,
                dstRect.Y,
                dstRect.Width,
                dstRect.Height,
                out texture);

            SetNativeBrush(texture);
        }
Beispiel #15
0
GdipFillRectanglesI(GpGraphics graphics, GpBrush brush,
      GpRect[] rects, int count);
Beispiel #16
0
 public bool IntersectsWith(GpRect rect)
 {
     return (GetLeft() < rect.GetRight() &&
             GetTop() < rect.GetBottom() &&
             GetRight() > rect.GetLeft() &&
             GetBottom() > rect.GetTop());
 }
Beispiel #17
0
 public bool Contains(GpRect rect)
 {
     return (X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom());
 }
Beispiel #18
0
 GdipGetLineRectI(GpLineGradient brush, out GpRect rect);
Beispiel #19
0
 GdipGetPathGradientRectI(GpPathGradient brush, out GpRect rect);
Beispiel #20
0
GdipAddPathStringI(GpPath path, string text,
                        int length, GpFontFamily family, int style,
                        float emSize, GpRect layoutRect,
                        GpStringFormat format);
Beispiel #21
0
 public GpStatus DrawArc(PenPlus pen,
                 GpRect rect,
                float startAngle,
                float sweepAngle)
 {
     return DrawArc(pen,
                    rect.X,
                    rect.Y,
                    rect.Width,
                    rect.Height,
                    startAngle,
                    sweepAngle);
 }
Beispiel #22
0
 GdipGetRegionBoundsI(GpRegion region, GpGraphics graphics,
                      out GpRect rect);
Beispiel #23
0
 GdipAddPathStringI(GpPath path, string text,
                    int length, GpFontFamily family, int style,
                    float emSize, GpRect layoutRect,
                    GpStringFormat format);
Beispiel #24
0
 public GpStatus DrawRectangles(PenPlus pen,
                        GpRect[] rects)
 {
     return SetStatus(NativeMethods.GdipDrawRectanglesI(nativeGraphics,
                                                      pen.nativePen,
                                                      rects,
                                                      rects.Length));
 }
Beispiel #25
0
 public GpStatus FillRectangle(BrushPlus brush,
                       GpRect rect)
 {
     return FillRectangle(brush,
                          rect.X,
                          rect.Y,
                          rect.Width,
                          rect.Height);
 }
Beispiel #26
0
 GpStatus GetRectangle(out GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipGetLineRectI((GpLineGradient)nativeBrush, out rect)));
 }
Beispiel #27
0
 public GpStatus DrawImage(ImagePlus image,
                   GpRect rect)
 {
     return DrawImage(image,
                      rect.X,
                      rect.Y,
                      rect.Width,
                      rect.Height);
 }
Beispiel #28
0
 public GpStatus GetRectangle(out GpRect rect)
 {
     rect = new GpRect();
     return(SetStatus(NativeMethods.GdipGetPathGradientRectI(
                          (GpPathGradient)nativeBrush, out rect)));
 }
Beispiel #29
0
GdipGetPathWorldBoundsI(GpPath  path, GpRect[] bounds, 
                        out GpMatrix matrix, out GpPen pen);
Beispiel #30
0
GdipCreateLineBrushFromRectI(ref GpRect rect,
                             int color1, int color2,
                             LinearGradientMode mode,
                             WrapMode wrapMode,
                             out GpLineGradient lineGradient);
Beispiel #31
0
 Exclude(GpRect rect)
  {
      return SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                          CombineMode.CombineModeExclude));
  }
Beispiel #32
0
GdipCreateLineBrushFromRectWithAngleI(ref GpRect rect,
                                     int color1, int color2,
                                     float angle,
                                     bool isAngleScalable,
                                     WrapMode wrapMode,
                                     out GpLineGradient lineGradient);
Beispiel #33
0
 Complement(GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                           CombineMode.CombineModeComplement)));
 }
Beispiel #34
0
GdipGetLineRectI(GpLineGradient brush, out GpRect rect);
Beispiel #35
0
 public bool Intersect(GpRect rect)
 {
     return Intersect(out this, this, rect);
 }
Beispiel #36
0
GdipGetPathGradientRectI(GpPathGradient brush, out GpRect rect);
Beispiel #37
0
    static public bool Union(out GpRect c,
                      GpRect a,
                      GpRect b)
    {
        int right = Math.Max(a.GetRight(), b.GetRight());
        int bottom = Math.Max(a.GetBottom(), b.GetBottom());
        int left = Math.Min(a.GetLeft(), b.GetLeft());
        int top = Math.Min(a.GetTop(), b.GetTop());

        c.X = left;
        c.Y = top;
        c.Width = right - left;
        c.Height = bottom - top;
        return !c.IsEmptyArea();
    }
Beispiel #38
0
 GdipCombineRegionRectI(GpRegion region, ref GpRect rect,
                        CombineMode combineMode);
Beispiel #39
0
GdipDrawRectanglesI(GpGraphics graphics, GpPen pen, GpRect[] rects,
        int count);
Beispiel #40
0
 GdipCreateRegionRectI(ref GpRect rect, out GpRegion region);
Beispiel #41
0
 public GpStatus FillPie(BrushPlus brush,
                 GpRect rect,
                float startAngle,
                float sweepAngle)
 {
     return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height,
                    startAngle, sweepAngle);
 }
Beispiel #42
0
 GdipBitmapLockBits(GpBitmap bitmap,
                    GpRect rect,
                    uint flags,
                    PixelFormat format,
                    BitmapData lockedBitmapData);
Beispiel #43
0
 public GpStatus FillRectangles(BrushPlus brush,
                        GpRect[] rects)
 {
     return SetStatus(NativeMethods.GdipFillRectanglesI(nativeGraphics,
                                                      brush.nativeBrush,
                                                      rects,
                                                      rects.Length));
 }
Beispiel #44
0
 public bool Contains(GpRect rect)
 {
     return((X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()));
 }
Beispiel #45
0
 public GpStatus DrawEllipse(PenPlus pen,
                     GpRect rect)
 {
     return DrawEllipse(pen,
                        rect.X,
                        rect.Y,
                        rect.Width,
                        rect.Height);
 }
Beispiel #46
0
 public bool Intersect(GpRect rect)
 {
     return(Intersect(out this, this, rect));
 }
Beispiel #47
0
 public GpStatus DrawImage(ImagePlus image,
                   GpRect destRect,
                  int srcx,
                  int srcy,
                  int srcwidth,
                  int srcheight,
                  Unit srcUnit,
                   ImageAttributesPlus imageAttributes)
 {
     return SetStatus(NativeMethods.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));
 }
Beispiel #48
0
       IsVisible(GpRect rect,
                          GraphicsPlus g)
        {
            bool booln = false;

            SetStatus(NativeMethods.GdipIsVisibleRegionRectI(nativeRegion,
                                                          rect.X,
                                                          rect.Y,
                                                          rect.Width,
                                                          rect.Height,
                                                          (g == null)
                                                            ? new GpGraphics() : g.nativeGraphics,
                                                          out booln));
            return booln;
        }
Beispiel #49
0
GdipAddPathRectanglesI(GpPath path, GpRect[] rects, int count);
Beispiel #50
0
 GdipCreateLineBrushFromRectWithAngleI(ref GpRect rect,
                                       int color1, int color2,
                                       float angle,
                                       bool isAngleScalable,
                                       WrapMode wrapMode,
                                       out GpLineGradient lineGradient);
Beispiel #51
0
 GdipGetClipBoundsI(GpGraphics graphics, out GpRect rect);
Beispiel #52
0
 public static extern GpStatus GdipBitmapLockBits(GpBitmap bitmap,
            GpRect rect,
            uint flags,
            PixelFormat format,
            BitmapData lockedBitmapData);
Beispiel #53
0
 public GpStatus AddEllipse(GpRect rect)
 {
     return(AddEllipse(rect.X, rect.Y, rect.Width, rect.Height));
 }
Beispiel #54
0
 public void GetBounds(out GpRect rect)
 {
     rect.X = X;
     rect.Y = Y;
     rect.Width = Width;
     rect.Height = Height;
 }
Beispiel #55
0
 Complement(GpRect rect)
  {
      return SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                          CombineMode.CombineModeComplement));
  }
Beispiel #56
0
 public bool Equals(GpRect rect)
 {
     return X == rect.X &&
            Y == rect.Y &&
            Width == rect.Width &&
            Height == rect.Height;
 }
Beispiel #57
0
 GetBounds(out GpRect rect,
                    GraphicsPlus g)
  {
      return SetStatus(NativeMethods.GdipGetRegionBoundsI(nativeRegion,
                                                  g.nativeGraphics,
                                                  out rect));
  }
Beispiel #58
0
 Exclude(GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                           CombineMode.CombineModeExclude)));
 }
Beispiel #59
0
 GetRegionScans(
      Matrix matrix,
     GpRect[] rects,
      out int count)
  {
      count = rects.Length;
      return SetStatus(NativeMethods.GdipGetRegionScansI(nativeRegion,
                                            rects,
                                            ref count,
                                            matrix.nativeMatrix));
  }
Beispiel #60
0
 GdipCreateLineBrushFromRectI(ref GpRect rect,
                              int color1, int color2,
                              LinearGradientMode mode,
                              WrapMode wrapMode,
                              out GpLineGradient lineGradient);