1 Reply Latest reply on Jan 17, 2010 11:48 AM by Shongrunden

    how to improve render quality of FXG graphics (gradients, paths, alpha)

    philipp.f

      Hi

       

      I created a  FXG graphical asset in Illustrator. Basically, it has some radial gradients along paths in it. Overlapping gradients have alpha values and blend over. I would assume this is a pretty common use case if you create glassy/half 3D designs.

       

      After importing this FXG into flex i can see that the code is clean, e.g.

       

                  <s:Group x="0" y="0">
                      <s:Group x="0" y="0">
                          <s:Path data="<.. some coordinates... >" winding="nonZero" x="0.5" y="0.5">
                              <s:fill>
                                  <s:RadialGradient scaleX="213" scaleY="213" x="106.5" y="106.5">
                                      <s:GradientEntry alpha="0.15" color="0xffffff" ratio="0.913963"/>
                                      <s:GradientEntry alpha="0" color="0xffffff" ratio="0.932299"/>
                                      <s:GradientEntry alpha="0" color="0xffffff" ratio="0.976023"/>
                                      <s:GradientEntry alpha="0.15" color="0xffffff" ratio="1"/>
                                  </s:RadialGradient>
                              </s:fill>
                          </s:Path>
                      </s:Group>
                  </s:Group>

       

      There are several groups with the gradients in my application and they overlap.

       

      In Illustrator it looks all very nice blended. In Flash 10/Flex 4 beta 2 the render quality seems to be not that nice, is there a way to improve that with some sort of setting maybe?

       

      compare.png

      The left one is the Illustrator rendering, the right one is the flash one.

       

      I tried:

      stage.quality = StageQuality.BEST;

       

      and added those lines to the addedToStage Handler of an AIR 2.0 application. It does not seem to make any difference.

       

      Any help would be very much appreciated.

      Thanks,

      Philipp