public void TranslateTransform(float dx, float dy, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipTranslateLineTransform( new HandleRef(this, NativeBrush), dx, dy, order)); }
/// <summary> /// Gets a bounding rectangle in the specified units for this <see cref='Image'/>. /// </summary> public RectangleF GetBounds(ref GraphicsUnit pageUnit) { Gdip.CheckStatus(Gdip.GdipGetImageBounds(new HandleRef(this, nativeImage), out RectangleF bounds, out pageUnit)); return(bounds); }
internal static bool EndPage(GraphicsPrinter gr) { Gdip.GdipGetPostScriptSavePage(gr.Hdc); return(true); }
public Matrix(float m11, float m12, float m21, float m22, float dx, float dy) { Gdip.CheckStatus(Gdip.GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, out IntPtr nativeMatrix)); NativeMatrix = nativeMatrix; }
public void ResetTransform() { Gdip.CheckStatus(Gdip.GdipResetPathGradientTransform(new HandleRef(this, NativeBrush))); }
public static Graphics FromHwndInternal(IntPtr hwnd) { Gdip.CheckStatus(Gdip.GdipCreateFromHWND(hwnd, out IntPtr nativeGraphics)); return(new Graphics(nativeGraphics)); }
public static Graphics FromHdcInternal(IntPtr hdc) { Gdip.CheckStatus(Gdip.GdipCreateFromHDC(hdc, out IntPtr nativeGraphics)); return(new Graphics(nativeGraphics)); }
public void Scale(float scaleX, float scaleY, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipScaleMatrix(new HandleRef(this, NativeMatrix), scaleX, scaleY, order)); }
public void Rotate(float angle, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipRotateMatrix(new HandleRef(this, NativeMatrix), angle, order)); }
public Matrix Clone() { Gdip.CheckStatus(Gdip.GdipCloneMatrix(new HandleRef(this, NativeMatrix), out IntPtr clonedMatrix)); return(new Matrix(clonedMatrix)); }
public void Translate(float offsetX, float offsetY, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipTranslateMatrix( new HandleRef(this, NativeMatrix), offsetX, offsetY, order)); }
public Metafile(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader) { int status = Gdip.GdipCreateMetafileFromEmf(hmetafile, false, out nativeImage); Gdip.CheckStatus(status); }
public void RotateTransform(float angle, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipRotateLineTransform( new HandleRef(this, NativeBrush), angle, order)); }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipScaleLineTransform( new HandleRef(this, NativeBrush), sx, sy, order)); }
public void AddBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) { Gdip.CheckStatus(Gdip.GdipAddPathBezierI( new HandleRef(this, _nativePath), x1, y1, x2, y2, x3, y3, x4, y4)); }
public void StartFigure() { Gdip.CheckStatus(Gdip.GdipStartPathFigure(new HandleRef(this, _nativePath))); }
public object Clone() { Gdip.CheckStatus(Gdip.GdipClonePath(new HandleRef(this, _nativePath), out IntPtr clonedPath)); return(new GraphicsPath(clonedPath, 0)); }
public void CloseAllFigures() { Gdip.CheckStatus(Gdip.GdipClosePathFigures(new HandleRef(this, _nativePath))); }
public void ReleaseHdcInternal(IntPtr hdc) { Gdip.CheckStatus(!Gdip.Initialized ? Gdip.Ok : Gdip.GdipReleaseDC(new HandleRef(this, NativeGraphics), hdc)); _nativeHdc = IntPtr.Zero; }
public void SetMarkers() { Gdip.CheckStatus(Gdip.GdipSetPathMarker(new HandleRef(this, _nativePath))); }
public static Graphics FromHdc(IntPtr hdc, IntPtr hdevice) { Gdip.CheckStatus(Gdip.GdipCreateFromHDC2(hdc, hdevice, out IntPtr nativeGraphics)); return(new Graphics(nativeGraphics)); }
public void ClearMarkers() { Gdip.CheckStatus(Gdip.GdipClearPathMarkers(new HandleRef(this, _nativePath))); }
/// <summary> /// Returns a Windows handle to an enhanced <see cref='Metafile'/>. /// </summary> public IntPtr GetHenhmetafile() { Gdip.CheckStatus(Gdip.GdipGetHemfFromMetafile(new HandleRef(this, nativeImage), out IntPtr hEmf)); return(hEmf); }
public void Reverse() { Gdip.CheckStatus(Gdip.GdipReversePath(new HandleRef(this, _nativePath))); }
public override object Clone() { Gdip.CheckStatus(Gdip.GdipCloneBrush(new HandleRef(this, NativeBrush), out IntPtr clonedBrush)); return(new PathGradientBrush(clonedBrush)); }
public PointF GetLastPoint() { Gdip.CheckStatus(Gdip.GdipGetPathLastPoint(new HandleRef(this, _nativePath), out PointF point)); return(point); }
public GraphicsPath(FillMode fillMode) { Gdip.CheckStatus(Gdip.GdipCreatePath(unchecked ((int)fillMode), out IntPtr nativePath)); _nativePath = nativePath; }
public void AddLine(int x1, int y1, int x2, int y2) { Gdip.CheckStatus(Gdip.GdipAddPathLineI(new HandleRef(this, _nativePath), x1, y1, x2, y2)); }
public void AddArc(RectangleF rect, float startAngle, float sweepAngle) { int status = Gdip.GdipAddPathArc(_nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); Gdip.CheckStatus(status); }
/// <summary> /// Adds a font contained in system memory to this <see cref='System.Drawing.Text.PrivateFontCollection'/>. /// </summary> public void AddMemoryFont(IntPtr memory, int length) { Gdip.CheckStatus(Gdip.GdipPrivateAddMemoryFont(new HandleRef(this, _nativeFontCollection), memory, length)); }