Example #1
0
        public GraphicsPlus(HDC hdc)
        {
            GpGraphics Graphics = new GpGraphics();

            lastResult = NativeMethods.GdipCreateFromHDC(hdc, out Graphics);

            SetNativeGraphics(Graphics);
        }
Example #2
0
 public static extern GpStatus GdipDrawString(
     GpGraphics graphics,
     string text,
     INT length,
     GpFont font,
     ref RectF layoutRect,
     GpStringFormat stringFormat,
     GpBrush brush
     );
Example #3
0
        public GraphicsPlus(HDC hdc,
                 HANDLE hdevice)
        {
            GpGraphics Graphics = new GpGraphics();

            lastResult = NativeMethods.GdipCreateFromHDC2(hdc, hdevice, out Graphics);

            SetNativeGraphics(Graphics);
        }
Example #4
0
        public GraphicsPlus(ImagePlus image)
        {
            GpGraphics Graphics = new GpGraphics();

            if (image != null)
            {
                lastResult = NativeMethods.GdipGetImageGraphicsContext(
                                                                    image.nativeImage, out Graphics);
            }
            SetNativeGraphics(Graphics);
        }
Example #5
0
        public GraphicsPlus(HWND hwnd,
                 bool icm)
        {
            GpGraphics Graphics = new GpGraphics();

            if (icm)
            {
                lastResult = NativeMethods.GdipCreateFromHWNDICM(hwnd, out Graphics);
            }
            else
            {
                lastResult = NativeMethods.GdipCreateFromHWND(hwnd, out Graphics);
            }

            SetNativeGraphics(Graphics);
        }
Example #6
0
GdipIsVisiblePathPointI(GpPath  path, int x, int y,
                        GpGraphics graphics, out bool result);
Example #7
0
 protected GraphicsPlus(GpGraphics Graphics)
 {
     lastResult = GpStatus.Ok;
     SetNativeGraphics(Graphics);
 }
Example #8
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
     }
     // free native resources if there are any.
     if ((IntPtr)nativeGraphics != IntPtr.Zero)
     {
         NativeMethods.GdipDeleteGraphics(nativeGraphics);
         nativeGraphics = new GpGraphics();
     }
 }
Example #9
0
GdipDrawPie(GpGraphics graphics, GpPen pen, float x, float y,
      float width, float height, float startAngle,
float sweepAngle);
Example #10
0
GdipDrawEllipse(GpGraphics graphics, GpPen pen, float x, float y,
          float width, float height);
Example #11
0
GdipDrawRectangleI(GpGraphics graphics, GpPen pen, int x, int y,
       int width, int height);
Example #12
0
GdipDrawBeziersI(GpGraphics graphics, GpPen pen, GpPoint[] points,
          int count);
Example #13
0
GdipDrawBezier(GpGraphics graphics, GpPen pen, float x1, float y1,
         float x2, float y2, float x3, float y3, float x4, float y4);
Example #14
0
 public static extern GpStatus GdipFillRectangleI(GpGraphics graphics, GpBrush brush, INT x, INT y, INT width, INT height);
Example #15
0
 public static extern GpStatus GdipDeleteGraphics(GpGraphics graphics);
Example #16
0
 public static extern GpStatus GdipCreateFromHWND(HWND hwnd, out GpGraphics graphics);
Example #17
0
 public static extern GpStatus GdipCreateFromHDC(HDC hdc, out GpGraphics graphics);
Example #18
0
GdipFillRegion(GpGraphics graphics, GpBrush brush,
         GpRegion region);
Example #19
0
 GdipFillPolygon2I(GpGraphics graphics, GpSolidFill brush,
 GpPoint[] points, int count);
Example #20
0
GdipDrawBezierI(GpGraphics graphics, GpPen pen, int x1, int y1,
         int x2, int y2, int x3, int y3, int x4, int y4);
Example #21
0
 GdipFillEllipse(GpGraphics graphics, GpBrush brush, float x, float y,
                 float width, float height);
Example #22
0
GdipDrawRectangle(GpGraphics graphics, GpPen pen, float x, float y,
       float width, float height);
Example #23
0
GdipFillEllipseI(GpGraphics graphics, GpBrush brush, int x, int y,
  int width, int height);
Example #24
0
GdipDrawRectanglesI(GpGraphics graphics, GpPen pen, GpRect[] rects,
        int count);
Example #25
0
GdipFillPie(GpGraphics graphics, GpBrush brush, float x, float y,
float width, float height, float startAngle, float sweepAngle);
Example #26
0
GdipDrawEllipseI(GpGraphics graphics, GpPen pen, int x, int y,
          int width, int height);
Example #27
0
GdipFillPieI(GpGraphics graphics, GpBrush brush, int x, int y,
int width, int height, float startAngle, float sweepAngle);
Example #28
0
GdipDrawPieI(GpGraphics graphics, GpPen pen, int x, int y,
      int width, int height, float startAngle, float sweepAngle);
Example #29
0
GdipFillPath(GpGraphics graphics, GpBrush brush, GpPath path);
Example #30
0
 protected void SetNativeGraphics(GpGraphics Graphics)
 {
     this.nativeGraphics = Graphics;
 }
Example #31
0
GdipFillClosedCurveI(GpGraphics graphics, GpBrush brush,
                GpPoint[] points, int count);
Example #32
0
GdipIsVisiblePathPoint(GpPath  path, float x, float y,
                       GpGraphics graphics, out bool result);
Example #33
0
GdipDrawLinesI(GpGraphics graphics, GpPen pen, GpPoint[] points,
        int count);
Example #34
0
GdipIsOutlineVisiblePathPointI(GpPath  path, int x, int y, GpPen pen,
                               GpGraphics graphics, out bool result);
Example #35
0
GdipFillClosedCurve2I(GpGraphics graphics, GpBrush brush,
                GpPoint[] points, int count,
               float tension, FillMode fillMode);