The standard states for the attribute scaled
of the element <lin>
in §20.1.8.41 in ISO/IEC 29500-1:2016(E),
Mathematically, if this flag is true, then the gradient vector ( cos x , sin x ) is scaled by the width (w) and height (h) of the fill region, so that the vector becomes ( w cos x, h sin x ) (before normalization). Observe that now if the gradient angle is 45 degrees, the gradient vector is ( w, h ), which goes from top-left to bottom-right of the fill region.
In my understanding, the gradient vector is perpendicular to the vector of the line of constant color. Therefor the gradient vector becomes ( h cos x, w sin x) (before normalization).
The rendering in PowerPoint is correct, only the description in the standard is faulty.
How to test the behavior:
Draw a square, fill it with a linear gradient with angle 30°. To get a gradient with good visible line of constant color let two colors use the same position as in the example below.
<a:gsLst>
<a:gs pos="0"><a:srgbClr val="FFFF00"/></a:gs>
<a:gs pos="40000"><a:srgbClr val="FFFF00"/></a:gs>
<a:gs pos="40000"><a:srgbClr val="0070C0"/></a:gs>
<a:gs pos="100000"><a:srgbClr val="0070C0"/></a:gs>
</a:gsLst>
Create a bitmap from the shape and scale the bitmap to width=5cm and height=9cm. Now make a copy of the square shape and scale the shape to width=5cm and height=9cm. The gradient in the scaled shape is the same as in the square shape because as default scaled="0"
is used.
Because the attribute scaled has no UI, open the file source and set the attribute on the scaled shape to scaled="1"
.
Open the changed file in PowerPoint. You will notice, that the gradient in the scaled shape is now the same as in the scaled image. Measure the gradient vector. You will find that it is parallel to vector
(9cm cos 30°, 5cm sin 30°).