Merge pull request #175 from cameronwhite/cairo-path-extents

Implement Cairo.Context.PathExtents()
This commit is contained in:
Harry 2020-07-21 23:03:27 +02:00 committed by GitHub
commit dcd05c43e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -545,6 +545,14 @@ namespace Cairo {
NativeMethods.cairo_append_path (handle, path.Handle); NativeMethods.cairo_append_path (handle, path.Handle);
} }
public Rectangle PathExtents ()
{
CheckDisposed ();
double x1, y1, x2, y2;
NativeMethods.cairo_path_extents (handle, out x1, out y1, out x2, out y2);
return new Rectangle (x1, y1, x2 - x1, y2 - y1);
}
#endregion #endregion
#region Painting Methods #region Painting Methods