cairo: Fix rectangles returned by StrokeExtents and FillExtents methods
The third and fourth parameters of the Rectangle constructor are width and height, but cairo_stroke_extents and cairo_fill_extents give right and bottom coordinates. Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
This commit is contained in:
parent
629a34aa4f
commit
57c82a89c7
1 changed files with 2 additions and 2 deletions
|
@ -578,7 +578,7 @@ namespace Cairo {
|
|||
{
|
||||
double x1, y1, x2, y2;
|
||||
NativeMethods.cairo_stroke_extents (state, out x1, out y1, out x2, out y2);
|
||||
return new Rectangle (x1, y1, x2, y2);
|
||||
return new Rectangle (x1, y1, x2 - x1, y2 - y1);
|
||||
}
|
||||
|
||||
public void Fill ()
|
||||
|
@ -590,7 +590,7 @@ namespace Cairo {
|
|||
{
|
||||
double x1, y1, x2, y2;
|
||||
NativeMethods.cairo_fill_extents (state, out x1, out y1, out x2, out y2);
|
||||
return new Rectangle (x1, y1, x2, y2);
|
||||
return new Rectangle (x1, y1, x2 - x1, y2 - y1);
|
||||
}
|
||||
|
||||
public void FillPreserve ()
|
||||
|
|
Loading…
Reference in a new issue