Hello,
This article led me here.
I found a bug in:
|
//(F.6.5.6) |
|
double delta = svgAngle( |
|
(x1p - cxp)/rX, (y1p - cyp)/rY, |
|
(-x1p - cxp)/rX, (-y1p-cyp)/rY); |
|
delta = Math.Mod(delta, Math.PIf * 2 ); |
|
if (!flagS) |
|
delta -= 2 * Math.PIf; |
|
|
|
r_ = float2((float)rX,(float)rY); |
|
c = float2((float)cx,(float)cy); |
|
angles = float2((float)theta, (float)delta); |
According to the spec (the bold text):
where Δθ is fixed in the range −360° < Δθ < 360° such that:
if fS = 0, then Δθ < 0,
else if fS = 1, then Δθ > 0.
In other words, if fS = 0 and the right side of (eq. 5.6) is greater than 0, then subtract 360°, whereas if fS = 1 and the right side of (eq. 5.6) is less than 0, then add 360°. In all other cases leave it as is.
... the code should be:
//(F.6.5.6)
double delta = svgAngle(
(x1p - cxp)/rX, (y1p - cyp)/rY,
(-x1p - cxp)/rX, (-y1p-cyp)/rY);
delta = Math.Mod(delta, Math.PIf * 2 );
if (flagS && delta < 0)
{
delta += 2 * Math.PIf;
}
else if (!flagS && delta > 0)
{
delta -= 2 * Math.PIf;
}
Hello,
This article led me here.
I found a bug in:
fuselibs/Source/Fuse.Drawing.Surface/SurfaceUtil.uno
Lines 138 to 148 in 8fb40bb
According to the spec (the bold text):
... the code should be: