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

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

            SetNativeRegion(region);
        }
Пример #7
0
        RegionPlus(GpRect rect)
        {
            GpRegion region = new GpRegion();

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

            SetNativeRegion(region);
        }
Пример #8
0
 public GpStatus LockBits(
     GpRect rect,
     uint flags,
     PixelFormat format,
     BitmapData lockedBitmapData
     )
 {
     return(SetStatus(NativeMethods.GdipBitmapLockBits(
                          (GpBitmap)(IntPtr)nativeImage,
                          rect,
                          flags,
                          format,
                          lockedBitmapData)));
 }
Пример #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());
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #15
0
GdipFillRectanglesI(GpGraphics graphics, GpBrush brush,
      GpRect[] rects, int count);
Пример #16
0
 public bool IntersectsWith(GpRect rect)
 {
     return (GetLeft() < rect.GetRight() &&
             GetTop() < rect.GetBottom() &&
             GetRight() > rect.GetLeft() &&
             GetBottom() > rect.GetTop());
 }
Пример #17
0
 public bool Contains(GpRect rect)
 {
     return (X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom());
 }
Пример #18
0
 GdipGetLineRectI(GpLineGradient brush, out GpRect rect);
Пример #19
0
 GdipGetPathGradientRectI(GpPathGradient brush, out GpRect rect);
Пример #20
0
GdipAddPathStringI(GpPath path, string text,
                        int length, GpFontFamily family, int style,
                        float emSize, GpRect layoutRect,
                        GpStringFormat format);
Пример #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);
 }
Пример #22
0
 GdipGetRegionBoundsI(GpRegion region, GpGraphics graphics,
                      out GpRect rect);
Пример #23
0
 GdipAddPathStringI(GpPath path, string text,
                    int length, GpFontFamily family, int style,
                    float emSize, GpRect layoutRect,
                    GpStringFormat format);
Пример #24
0
 public GpStatus DrawRectangles(PenPlus pen,
                        GpRect[] rects)
 {
     return SetStatus(NativeMethods.GdipDrawRectanglesI(nativeGraphics,
                                                      pen.nativePen,
                                                      rects,
                                                      rects.Length));
 }
Пример #25
0
 public GpStatus FillRectangle(BrushPlus brush,
                       GpRect rect)
 {
     return FillRectangle(brush,
                          rect.X,
                          rect.Y,
                          rect.Width,
                          rect.Height);
 }
Пример #26
0
 GpStatus GetRectangle(out GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipGetLineRectI((GpLineGradient)nativeBrush, out rect)));
 }
Пример #27
0
 public GpStatus DrawImage(ImagePlus image,
                   GpRect rect)
 {
     return DrawImage(image,
                      rect.X,
                      rect.Y,
                      rect.Width,
                      rect.Height);
 }
Пример #28
0
 public GpStatus GetRectangle(out GpRect rect)
 {
     rect = new GpRect();
     return(SetStatus(NativeMethods.GdipGetPathGradientRectI(
                          (GpPathGradient)nativeBrush, out rect)));
 }
Пример #29
0
GdipGetPathWorldBoundsI(GpPath  path, GpRect[] bounds, 
                        out GpMatrix matrix, out GpPen pen);
Пример #30
0
GdipCreateLineBrushFromRectI(ref GpRect rect,
                             int color1, int color2,
                             LinearGradientMode mode,
                             WrapMode wrapMode,
                             out GpLineGradient lineGradient);
Пример #31
0
 Exclude(GpRect rect)
  {
      return SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                          CombineMode.CombineModeExclude));
  }
Пример #32
0
GdipCreateLineBrushFromRectWithAngleI(ref GpRect rect,
                                     int color1, int color2,
                                     float angle,
                                     bool isAngleScalable,
                                     WrapMode wrapMode,
                                     out GpLineGradient lineGradient);
Пример #33
0
 Complement(GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                           CombineMode.CombineModeComplement)));
 }
Пример #34
0
GdipGetLineRectI(GpLineGradient brush, out GpRect rect);
Пример #35
0
 public bool Intersect(GpRect rect)
 {
     return Intersect(out this, this, rect);
 }
Пример #36
0
GdipGetPathGradientRectI(GpPathGradient brush, out GpRect rect);
Пример #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();
    }
Пример #38
0
 GdipCombineRegionRectI(GpRegion region, ref GpRect rect,
                        CombineMode combineMode);
Пример #39
0
GdipDrawRectanglesI(GpGraphics graphics, GpPen pen, GpRect[] rects,
        int count);
Пример #40
0
 GdipCreateRegionRectI(ref GpRect rect, out GpRegion region);
Пример #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);
 }
Пример #42
0
 GdipBitmapLockBits(GpBitmap bitmap,
                    GpRect rect,
                    uint flags,
                    PixelFormat format,
                    BitmapData lockedBitmapData);
Пример #43
0
 public GpStatus FillRectangles(BrushPlus brush,
                        GpRect[] rects)
 {
     return SetStatus(NativeMethods.GdipFillRectanglesI(nativeGraphics,
                                                      brush.nativeBrush,
                                                      rects,
                                                      rects.Length));
 }
Пример #44
0
 public bool Contains(GpRect rect)
 {
     return((X <= rect.X) && (rect.GetRight() <= GetRight()) &&
            (Y <= rect.Y) && (rect.GetBottom() <= GetBottom()));
 }
Пример #45
0
 public GpStatus DrawEllipse(PenPlus pen,
                     GpRect rect)
 {
     return DrawEllipse(pen,
                        rect.X,
                        rect.Y,
                        rect.Width,
                        rect.Height);
 }
Пример #46
0
 public bool Intersect(GpRect rect)
 {
     return(Intersect(out this, this, rect));
 }
Пример #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));
 }
Пример #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;
        }
Пример #49
0
GdipAddPathRectanglesI(GpPath path, GpRect[] rects, int count);
Пример #50
0
 GdipCreateLineBrushFromRectWithAngleI(ref GpRect rect,
                                       int color1, int color2,
                                       float angle,
                                       bool isAngleScalable,
                                       WrapMode wrapMode,
                                       out GpLineGradient lineGradient);
Пример #51
0
 GdipGetClipBoundsI(GpGraphics graphics, out GpRect rect);
Пример #52
0
 public static extern GpStatus GdipBitmapLockBits(GpBitmap bitmap,
            GpRect rect,
            uint flags,
            PixelFormat format,
            BitmapData lockedBitmapData);
Пример #53
0
 public GpStatus AddEllipse(GpRect rect)
 {
     return(AddEllipse(rect.X, rect.Y, rect.Width, rect.Height));
 }
Пример #54
0
 public void GetBounds(out GpRect rect)
 {
     rect.X = X;
     rect.Y = Y;
     rect.Width = Width;
     rect.Height = Height;
 }
Пример #55
0
 Complement(GpRect rect)
  {
      return SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                          CombineMode.CombineModeComplement));
  }
Пример #56
0
 public bool Equals(GpRect rect)
 {
     return X == rect.X &&
            Y == rect.Y &&
            Width == rect.Width &&
            Height == rect.Height;
 }
Пример #57
0
 GetBounds(out GpRect rect,
                    GraphicsPlus g)
  {
      return SetStatus(NativeMethods.GdipGetRegionBoundsI(nativeRegion,
                                                  g.nativeGraphics,
                                                  out rect));
  }
Пример #58
0
 Exclude(GpRect rect)
 {
     return(SetStatus(NativeMethods.GdipCombineRegionRectI(nativeRegion, ref rect,
                                                           CombineMode.CombineModeExclude)));
 }
Пример #59
0
 GetRegionScans(
      Matrix matrix,
     GpRect[] rects,
      out int count)
  {
      count = rects.Length;
      return SetStatus(NativeMethods.GdipGetRegionScansI(nativeRegion,
                                            rects,
                                            ref count,
                                            matrix.nativeMatrix));
  }
Пример #60
0
 GdipCreateLineBrushFromRectI(ref GpRect rect,
                              int color1, int color2,
                              LinearGradientMode mode,
                              WrapMode wrapMode,
                              out GpLineGradient lineGradient);