Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron White <cameronwhite91@gmail.com>2012-12-23 23:10:51 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2013-06-20 02:36:34 +0400
commit461fd11d950c6d585b459401003c8f9df0d871d9 (patch)
tree7399792bdbb7d18bd9126fc6b8df1c45bca70b5f /mcs/class/Mono.Cairo
parentd5b2ccb50ff01313c9853472384bdd1121a66736 (diff)
Mono.Cairo: Fix rectangles returned by StrokeExtents and FillExtents
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> Conflicts: mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
Diffstat (limited to 'mcs/class/Mono.Cairo')
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Context.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
index 65a3d411b5d..699c079cf2d 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
@@ -477,7 +477,7 @@ namespace Cairo {
{
double x1, y1, x2, y2;
NativeMethods.cairo_stroke_extents (handle, 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 ()
@@ -489,7 +489,7 @@ namespace Cairo {
{
double x1, y1, x2, y2;
NativeMethods.cairo_fill_extents (handle, 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 ()