mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Cairo backend:
-DPSsetflat: and -DPScurrentflat should not have been transforming the flatness value with the current transformation matrix. The effect of this could be seen in the Apple BezierPathLab example; zooming in on the circle caused it to look more and more like a polygon. Also set NSBezierPath default flatness to 0.6 to match OS X (it was 1.0, which made circles look a bit rough) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29145 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed5fadec2c
commit
af5166992d
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2009-12-19 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/cairo/CairoGState.m:
|
||||
-DPSsetflat: and -DPScurrentflat should not have been transforming
|
||||
the flatness value with the current transformation matrix.
|
||||
The effect of this could be seen in the Apple BezierPathLab example;
|
||||
zooming in on the circle caused it to look more and more like a
|
||||
polygon.
|
||||
|
||||
2009-12-11 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/cairo/CairoGState.m:
|
||||
|
|
|
@ -512,8 +512,7 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
|
|||
{
|
||||
if (_ct)
|
||||
{
|
||||
*flatness = (float)cairo_get_tolerance(_ct);
|
||||
*flatness = floatToUserSpace(ctm, *flatness);
|
||||
*flatness = (float)cairo_get_tolerance(_ct) * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -621,7 +620,9 @@ static float floatToUserSpace(NSAffineTransform *ctm, float f)
|
|||
[super DPSsetflat: flatness];
|
||||
if (_ct)
|
||||
{
|
||||
cairo_set_tolerance(_ct, floatFromUserSpace(ctm, flatness));
|
||||
// Divide GNUstep flatness by 2 to get Cairo tolerance - this produces
|
||||
// results visually similar to OS X.
|
||||
cairo_set_tolerance(_ct, flatness / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue