This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch vtorri_putenv
in repository expedite.
View the commit online.
commit 284b893d6fabe41272f2fe36d62ab1f87578629b
Author: [email protected] <[email protected]>
AuthorDate: Sun Apr 5 21:21:17 2026 -0600
test: fix gradient coordinates in shape2 transform test
Shape2's gradient was defined with start/end coordinates (3,3)→(73,3),
matching shape1's rect position, but shape2's actual rect is at x=86
(stroke_w*2 + w + 10). Since the gradient range [3,73] didn't overlap
shape2's position [86,156], the gradient parameter t was always > 1.0,
causing PAD spread mode to clamp to the last color (cyan). This made
shape2 appear as solid cyan in both software and GL backends, making it
impossible to verify per-shape transform correctness.
Change gradient to (86,3)→(156,3), matching shape2's actual rect position.
Now shape2 correctly shows a vertical gradient (yellow→magenta→cyan) due
to the 90° rotation of the horizontal gradient, properly exercising the
per-shape transform code path.
Also update the header comment to document the actual bug (coordinate
mismatch and transform application) rather than the misleading "last
shape's transform only" description.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
src/bin/vg_gradient_multi_shape_transform.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/bin/vg_gradient_multi_shape_transform.c b/src/bin/vg_gradient_multi_shape_transform.c
index 490d336..270ad57 100644
--- a/src/bin/vg_gradient_multi_shape_transform.c
+++ b/src/bin/vg_gradient_multi_shape_transform.c
@@ -37,10 +37,10 @@ static const Efl_Gfx_Gradient_Stop stops2[3] = {
* Shape 2: Rectangle with horizontal gradient, rotated 90 degrees
*
* Expected: Shape 1 shows horizontal gradient (red to blue)
- * Shape 2 shows vertical gradient (yellow to cyan) due to rotation
- *
- * Bug behavior (before fix): Both shapes show horizontal gradients because
- * only the last shape's transform is used.
+ * Shape 2 shows vertical gradient (yellow to cyan) due to 90° rotation
+ *
+ * Bug behavior: Shape 2 shows all-cyan if the gradient coordinates don't cover
+ * the shape's local rect, or if the per-shape inverse transform is not applied.
*/
static void _setup(void)
{
@@ -82,9 +82,11 @@ static void _setup(void)
grad2 = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, root);
efl_gfx_gradient_stop_set(grad2, stops2, 3);
efl_gfx_gradient_spread_set(grad2, EFL_GFX_GRADIENT_SPREAD_PAD);
- /* Gradient also defined left-to-right (horizontal) */
- efl_gfx_gradient_linear_start_set(grad2, stroke_w, stroke_w);
- efl_gfx_gradient_linear_end_set(grad2, stroke_w + w, stroke_w);
+ /* Gradient defined left-to-right covering shape2's local rect position.
+ * shape2 starts at x = stroke_w*2 + w + 10, so the gradient must
+ * cover that range for the gradient to be visible on the shape. */
+ efl_gfx_gradient_linear_start_set(grad2, stroke_w * 2 + w + 10, stroke_w);
+ efl_gfx_gradient_linear_end_set(grad2, stroke_w * 2 + w + 10 + w, stroke_w);
shape2 = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, root);
efl_gfx_path_append_rect(shape2, stroke_w * 2 + w + 10, stroke_w, w, h, 10, 10);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.