You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by chris_d_k <ck...@christiankiefer.de> on 2015/04/14 14:04:08 UTC

Best performance for ItemRenderer with FXG Icon?

Hi,

 I have an itemRenderer with an fxg-Files as icon depending on the data. I
would prefer not to use special fxg-files for all densities - as it is a
vector. 
When I add the fxg-Class in the iconFunction I get an ugly scaled icon looks
like a not smoothly scaled bitmap. 
I think setting "smooth = true" on the iconDisplay would fix the problem but
would be bad for the performance. 

What is the best way to get the icon smooth (image quality and performance).
Should I use a LabelItemRenderer and add and scale the fxg manually instead?





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Best-performance-for-ItemRenderer-with-FXG-Icon-tp10081.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Best performance for ItemRenderer with FXG Icon?

Posted by Alex Harui <ah...@adobe.com>.

On 4/14/15, 5:04 AM, "chris_d_k" <ck...@christiankiefer.de> wrote:

>Hi,
>
> I have an itemRenderer with an fxg-Files as icon depending on the data. I
>would prefer not to use special fxg-files for all densities - as it is a
>vector. 
>When I add the fxg-Class in the iconFunction I get an ugly scaled icon
>looks
>like a not smoothly scaled bitmap.
>I think setting "smooth = true" on the iconDisplay would fix the problem
>but
>would be bad for the performance.
>
>What is the best way to get the icon smooth (image quality and
>performance).
>Should I use a LabelItemRenderer and add and scale the fxg manually
>instead?
>

I agree that you would want to first make sure the FXG is scaling
properly.  IconItemRenderer might be caching a bitmap of the FXG.

-Alex