danriegsecker / degrafa

Automatically exported from code.google.com/p/degrafa
0 stars 0 forks source link

ComplexFill transform inheritance bug report #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From Groups post:Wouter Walmink
I was playing around with an elliptical arc (pie mode) that was
animated to rotate around its center (the pointy end of the pie). A
simple linear gradient worked fine, but when applying a complex fill
to the shape (consisting of first a solid fill and then a gradient
fill on top), the gradient didn't rotate along with the rotating
animation. I rotated the shape through a degrafa transform, rotating
the shape itself.

I tried different types of animations (AnimateProperty, Tweener), but
that didn't seem to make any difference. The gradient's edges became
visible when the object was rotated, because the gradient's area
(determined by the shape's bounding box) didn't rotate along.

In the end I fixed it by not rotating through a degrafa transform that
affected the shape, but by changing the startAngle of the elliptical
arc. This seems to update the complex gradient's bounding box as well.

Question: is there any way to make a complex fill rotate along with
the shape it's applied to, when using a degrafa transform on the
shape? Not rotating the complex gradient could work for solid, vector
or bitmap fills, but with the linear fill the edges of the bounding
box become visible (not very nice looking). I think that rotating it
along with the shape is a behaviour that is more in line with what a
developer would expect.

Thoughts, discussions and opinions appreciated.
Thanks! 

Original issue reported on code.google.com by greg.d...@gmail.com on 9 Dec 2008 at 11:17

GoogleCodeExporter commented 9 years ago
Greg asked me to post a little MXML here about this problem. The literal MXML 
is a
bit cluttered with unrelevant details, though, so I'll give a rough schematic 
of what
seems to be the setting of the problem.

<GeometryComposition>

  <EllipticalArc>
    <fill>
      <ComplexFill>
        <SolidFill />
        <GradientFill />
      </ComplexFill>
    </fill>
  </EllipticalArc>

  <transform>
    <RotateTransform />
  </transform>

</GeometryComposition>

Rotating the EllipticalArc via the tranform makes the arc move, but not the 
bounding
box of the gradient that's part of the complex fill.

By the way, I was rotating the arc with an animation (Tweener/AnimateProperty). 
I
didn't try changing the rotation by hand (e.g. via slider), but I guess that
shouldn't make any difference?

Original comment by walm...@gmail.com on 9 Dec 2008 at 1:26

GoogleCodeExporter commented 9 years ago

Original comment by greg.d...@gmail.com on 12 Dec 2008 at 12:05