public GraphicsPlus(HDC hdc, HANDLE hdevice) { GpGraphics Graphics = new GpGraphics(); lastResult = GdiPlus.GdipCreateFromHDC2(hdc, hdevice, out Graphics); SetNativeGraphics(Graphics); }
public GraphicsPlus(HDC hdc) { GpGraphics Graphics = new GpGraphics(); lastResult = GdiPlus.GdipCreateFromHDC(hdc, out Graphics); SetNativeGraphics(Graphics); }
public GraphicsPlus(Graphics g) { this.g = g; hdc = g.GetHdc(); GpGraphics Graphics = new GpGraphics(); lastResult = GdiPlus.GdipCreateFromHDC(hdc, out Graphics); SetNativeGraphics(Graphics); }
public GraphicsPlus(ImagePlus image) { GpGraphics Graphics = new GpGraphics(); if (image != null) { lastResult = GdiPlus.GdipGetImageGraphicsContext(image.nativeImage, out Graphics); } SetNativeGraphics(Graphics); }
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); }
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(); } }
internal static extern GpStatus GdipCreateFromHWNDICM(HWND hwnd, out GpGraphics graphics);
internal static extern GpStatus GdipCreateFromHDC(HDC hdc, out GpGraphics graphics);
internal static extern GpStatus GdipIsOutlineVisiblePathPoint(GpPath path, float x, float y, GpPen pen, GpGraphics graphics, out bool result);
GdipDrawCurve3I(GpGraphics graphics, GpPen pen, Point[] points, int count, int offset, int numberOfSegments, float tension);
internal static extern GpStatus GdipResetWorldTransform(GpGraphics graphics);
internal static extern GpStatus GdipGetTextContrast(GpGraphics graphics, out uint contrast);
internal static extern GpStatus GdipGetPageUnit(GpGraphics graphics, out Unit unit);
internal static extern GpStatus GdipGetDC(GpGraphics graphics, out HDC hdc);
internal static extern GpStatus GdipFlush(GpGraphics graphics, FlushIntention intention);
internal static extern GpStatus GdipGetCompositingMode(GpGraphics graphics, out CompositingMode compositingMode);
GdipFillRectanglesI(GpGraphics graphics, GpBrush brush, Rectangle[] rects, int count);
internal static extern GpStatus GdipGetInterpolationMode(GpGraphics graphics, out InterpolationMode interpolationMode);
GdipFillPolygon(GpGraphics graphics, GpSolidFill brush, PointF[] points, int count, FillMode fillMode);
internal static extern GpStatus GdipGetRenderingOrigin(GpGraphics graphics, out int x, out int y);
GdipFillPolygon(GpGraphics graphics, GpTexture brush, PointF[] points, int count, FillMode fillMode);
internal static extern GpStatus GdipMultiplyWorldTransform(GpGraphics graphics, GpMatrix matrix, MatrixOrder order);
GdipFillPolygonI(GpGraphics graphics, GpBrush brush, Point[] points, int count, FillMode fillMode);
internal static extern GpStatus GdipSaveGraphics(GpGraphics graphics, out GraphicsState state);
GdipFillPolygon2(GpGraphics graphics, GpBrush brush, PointF[] points, int count);
GdipDrawCurve2I(GpGraphics graphics, GpPen pen, Point[] points, int count, float tension);
GdipFillPolygon2I(GpGraphics graphics, GpSolidFill brush, Point[] points, int count);
internal static extern GpStatus GdipIsVisiblePathPointI(GpPath path, int x, int y, GpGraphics graphics, out bool result);
GdipFillEllipse(GpGraphics graphics, GpBrush brush, float x, float y, float width, float height);
internal static extern GpStatus GdipTranslateWorldTransform(GpGraphics graphics, float dx, float dy, MatrixOrder order);
GdipFillEllipseI(GpGraphics graphics, GpBrush brush, int x, int y, int width, int height);
internal static extern GpStatus GdipCreateFromHDC2(HDC hdc, IntPtr hDevice, out GpGraphics graphics);
extern static internal GpStatus GdipFillPieI(GpGraphics graphics, GpBrush brush, int x, int y, int width, int height, float startAngle, float sweepAngle);
internal static extern GpStatus GdipDeleteGraphics(GpGraphics graphics);
extern static internal GpStatus GdipFillPath(GpGraphics graphics, GpBrush brush, GpPath path);
internal static extern GpStatus GdipGetClipBoundsI(GpGraphics graphics, out Rectangle rect);
extern static internal GpStatus GdipDrawArc(GpGraphics graphics, GpPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
internal static extern GpStatus GdipGetCompositingQuality(GpGraphics graphics, out CompositingQuality compositingQuality);
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);
internal static extern GpStatus GdipGetDpiY(GpGraphics graphics, out float dpi);
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);
internal static extern GpStatus GdipGetPageScale(GpGraphics graphics, out float scale);
extern static internal GpStatus GdipDrawRectanglesI(GpGraphics graphics, GpPen pen, Rectangle[] rects, int count);
internal static extern GpStatus GdipGetPixelOffsetMode(GpGraphics graphics, out PixelOffsetMode pixelOffsetMode);
extern static internal GpStatus GdipDrawEllipse(GpGraphics graphics, GpPen pen, float x, float y, float width, float height);
internal static extern GpStatus GdipGetSmoothingMode(GpGraphics graphics, out SmoothingMode smoothingMode);
extern static internal GpStatus GdipDrawEllipseI(GpGraphics graphics, GpPen pen, int x, int y, int width, int height);
internal static extern GpStatus GdipGetTextRenderingHint(GpGraphics graphics, out TextRenderingHint mode);
extern static internal GpStatus GdipDrawPieI(GpGraphics graphics, GpPen pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
internal static extern GpStatus GdipReleaseDC(GpGraphics graphics, HDC hdc);
extern static internal GpStatus GdipDrawPolygon(GpGraphics graphics, GpPen pen, PointF[] points, int count);
internal static extern GpStatus GdipRestoreGraphics(GpGraphics graphics, GraphicsState state);
extern static internal GpStatus GdipDrawPath(GpGraphics graphics, GpPen pen, GpPath path);
internal static extern GpStatus GdipScaleWorldTransform(GpGraphics graphics, float sx, float sy, MatrixOrder order);
extern static internal GpStatus GdipDrawCurveI(GpGraphics graphics, GpPen pen, Point[] points, int count);