mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 944704, part 4 - Fix PathBuilderCG::Arc to sweep in the correct direction. r=Bas
This commit is contained in:
parent
c9190606b9
commit
0f0ab858a5
@ -68,12 +68,20 @@ void
|
||||
PathBuilderCG::Arc(const Point &aOrigin, Float aRadius, Float aStartAngle,
|
||||
Float aEndAngle, bool aAntiClockwise)
|
||||
{
|
||||
// Core Graphic's initial coordinate system is y-axis up, whereas Moz2D's is
|
||||
// y-axis down. Core Graphics therefore considers "clockwise" to mean "sweep
|
||||
// in the direction of decreasing angle" whereas Moz2D considers it to mean
|
||||
// "sweep in the direction of increasing angle". In other words if this
|
||||
// Moz2D method is instructed to sweep anti-clockwise we need to tell
|
||||
// CGPathAddArc to sweep clockwise, and vice versa. Hence why we pass the
|
||||
// value of aAntiClockwise directly to CGPathAddArc's "clockwise" bool
|
||||
// parameter.
|
||||
CGPathAddArc(mCGPath, nullptr,
|
||||
aOrigin.x, aOrigin.y,
|
||||
aRadius,
|
||||
aStartAngle,
|
||||
aEndAngle,
|
||||
!aAntiClockwise);
|
||||
aAntiClockwise);
|
||||
}
|
||||
|
||||
Point
|
||||
|
Loading…
Reference in New Issue
Block a user