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

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

            SetNativeGraphics(Graphics);
        }
Example #2
0
        public GraphicsPlus(HDC hdc)
        {
            GpGraphics Graphics = new GpGraphics();

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

            SetNativeGraphics(Graphics);
        }
Example #3
0
        public GraphicsPlus(HDC hdc, HANDLE hdevice)
        {
            GpGraphics Graphics = new GpGraphics();

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

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

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

            SetNativeGraphics(Graphics);
        }
Example #5
0
        public GraphicsPlus(Graphics g)
        {
            this.g = g;
            hdc = g.GetHdc();
            GpGraphics Graphics = new GpGraphics();

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

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

            if (image != null)
            {
                lastResult = GdiPlus.GdipGetImageGraphicsContext(image.nativeImage, out Graphics);
            }
            SetNativeGraphics(Graphics);
        }
Example #7
0
        public GraphicsPlus(ImagePlus image)
        {
            GpGraphics Graphics = new GpGraphics();

            if (image != null)
            {
                lastResult = GdiPlus.GdipGetImageGraphicsContext(image.nativeImage, out Graphics);
            }
            SetNativeGraphics(Graphics);
        }
Example #8
0
        public GraphicsPlus(Graphics g)
        {
            this.g = g;
            hdc    = g.GetHdc();
            GpGraphics Graphics = new GpGraphics();

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

            SetNativeGraphics(Graphics);
        }
Example #9
0
        public GraphicsPlus(HWND hwnd, bool icm)
        {
            GpGraphics Graphics = new GpGraphics();

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

            SetNativeGraphics(Graphics);
        }
Example #10
0
        public GraphicsPlus(HWND hwnd, bool icm)
        {
            GpGraphics Graphics = new GpGraphics();

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

            SetNativeGraphics(Graphics);
        }
Example #11
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (g != null && hdc != null)
         {
             g.ReleaseHdc(hdc);
         }
     }
     if ((IntPtr)nativeGraphics != IntPtr.Zero)
     {
         GdiPlus.GdipDeleteGraphics(nativeGraphics);
         nativeGraphics = new GpGraphics();
     }
 }
Example #12
0
 internal static extern GpStatus GdipCreateFromHWNDICM(HWND hwnd, out GpGraphics graphics);
Example #13
0
 internal static extern GpStatus GdipCreateFromHDC(HDC hdc, out GpGraphics graphics);
Example #14
0
 internal static extern GpStatus GdipIsOutlineVisiblePathPoint(GpPath path, float x, float y, GpPen pen, GpGraphics graphics, out bool result);
Example #15
0
 GdipDrawCurve3I(GpGraphics graphics, GpPen pen, Point[] points,
                 int count, int offset, int numberOfSegments, float tension);
Example #16
0
 internal static extern GpStatus GdipResetWorldTransform(GpGraphics graphics);
Example #17
0
 internal static extern GpStatus GdipGetTextContrast(GpGraphics graphics, out uint contrast);
Example #18
0
 internal static extern GpStatus GdipGetPageUnit(GpGraphics graphics, out Unit unit);
Example #19
0
 internal static extern GpStatus GdipGetDC(GpGraphics graphics, out HDC hdc);
Example #20
0
 internal static extern GpStatus GdipFlush(GpGraphics graphics, FlushIntention intention);
Example #21
0
 internal static extern GpStatus GdipGetCompositingMode(GpGraphics graphics, out CompositingMode compositingMode);
Example #22
0
 GdipFillRectanglesI(GpGraphics graphics, GpBrush brush,
                     Rectangle[] rects, int count);
Example #23
0
 internal static extern GpStatus GdipGetInterpolationMode(GpGraphics graphics, out InterpolationMode interpolationMode);
Example #24
0
 GdipFillPolygon(GpGraphics graphics, GpSolidFill brush,
                 PointF[] points, int count, FillMode fillMode);
Example #25
0
 internal static extern GpStatus GdipGetRenderingOrigin(GpGraphics graphics, out int x, out int y);
Example #26
0
 GdipFillPolygon(GpGraphics graphics, GpTexture brush,
                 PointF[] points, int count, FillMode fillMode);
Example #27
0
 internal static extern GpStatus GdipMultiplyWorldTransform(GpGraphics graphics, GpMatrix matrix, MatrixOrder order);
Example #28
0
 GdipFillPolygonI(GpGraphics graphics, GpBrush brush,
                  Point[] points, int count, FillMode fillMode);
Example #29
0
 internal static extern GpStatus GdipSaveGraphics(GpGraphics graphics, out GraphicsState state);
Example #30
0
 GdipFillPolygon2(GpGraphics graphics, GpBrush brush,
                  PointF[] points, int count);
Example #31
0
 GdipDrawCurve2I(GpGraphics graphics, GpPen pen, Point[] points,
                 int count, float tension);
Example #32
0
 GdipFillPolygon2I(GpGraphics graphics, GpSolidFill brush,
                   Point[] points, int count);
Example #33
0
 internal static extern GpStatus GdipIsVisiblePathPointI(GpPath path, int x, int y, GpGraphics graphics, out bool result);
Example #34
0
 GdipFillEllipse(GpGraphics graphics, GpBrush brush, float x, float y,
                 float width, float height);
Example #35
0
 internal static extern GpStatus GdipTranslateWorldTransform(GpGraphics graphics, float dx, float dy, MatrixOrder order);
Example #36
0
 GdipFillEllipseI(GpGraphics graphics, GpBrush brush, int x, int y,
                  int width, int height);
Example #37
0
 internal static extern GpStatus GdipCreateFromHDC2(HDC hdc, IntPtr hDevice, out GpGraphics graphics);
Example #38
0
 extern static internal GpStatus GdipFillPieI(GpGraphics graphics, GpBrush brush, int x, int y,
                                              int width, int height, float startAngle, float sweepAngle);
Example #39
0
 internal static extern GpStatus GdipDeleteGraphics(GpGraphics graphics);
Example #40
0
 extern static internal GpStatus GdipFillPath(GpGraphics graphics, GpBrush brush, GpPath path);
Example #41
0
 internal static extern GpStatus GdipGetClipBoundsI(GpGraphics graphics, out Rectangle rect);
Example #42
0
 extern static internal GpStatus GdipDrawArc(GpGraphics graphics, GpPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
Example #43
0
 internal static extern GpStatus GdipGetCompositingQuality(GpGraphics graphics, out CompositingQuality compositingQuality);
Example #44
0
 extern static internal GpStatus GdipDrawBezier(GpGraphics graphics, GpPen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
Example #45
0
 internal static extern GpStatus GdipGetDpiY(GpGraphics graphics, out float dpi);
Example #46
0
 extern static internal GpStatus GdipDrawBezierI(GpGraphics graphics, GpPen pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
Example #47
0
 internal static extern GpStatus GdipGetPageScale(GpGraphics graphics, out float scale);
Example #48
0
 extern static internal GpStatus GdipDrawRectanglesI(GpGraphics graphics, GpPen pen, Rectangle[] rects, int count);
Example #49
0
 internal static extern GpStatus GdipGetPixelOffsetMode(GpGraphics graphics, out PixelOffsetMode pixelOffsetMode);
Example #50
0
 extern static internal GpStatus GdipDrawEllipse(GpGraphics graphics, GpPen pen, float x, float y, float width, float height);
Example #51
0
 internal static extern GpStatus GdipGetSmoothingMode(GpGraphics graphics, out SmoothingMode smoothingMode);
Example #52
0
 extern static internal GpStatus GdipDrawEllipseI(GpGraphics graphics, GpPen pen, int x, int y, int width, int height);
Example #53
0
 internal static extern GpStatus GdipGetTextRenderingHint(GpGraphics graphics, out TextRenderingHint mode);
Example #54
0
 extern static internal GpStatus GdipDrawPieI(GpGraphics graphics, GpPen pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
Example #55
0
 internal static extern GpStatus GdipReleaseDC(GpGraphics graphics, HDC hdc);
Example #56
0
 extern static internal GpStatus GdipDrawPolygon(GpGraphics graphics, GpPen pen, PointF[] points, int count);
Example #57
0
 internal static extern GpStatus GdipRestoreGraphics(GpGraphics graphics, GraphicsState state);
Example #58
0
 extern static internal GpStatus GdipDrawPath(GpGraphics graphics, GpPen pen, GpPath path);
Example #59
0
 internal static extern GpStatus GdipScaleWorldTransform(GpGraphics graphics, float sx, float sy, MatrixOrder order);
Example #60
0
 extern static internal GpStatus GdipDrawCurveI(GpGraphics graphics, GpPen pen, Point[] points, int count);