Maybe the super image component should work for you?

http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/


05 Apr 2007 01:04:37 -0700, bhaq1972 <[EMAIL PROTECTED]>:

  Thanks Alex. That works except the image appears left aligned. I'd
like it to be centre aligned.

horizontalAlign=center doesn't work.

any more ideas

--- In [email protected] <flexcoders%40yahoogroups.com>, "Alex
Harui" <[EMAIL PROTECTED]> wrote:
>
> You could subclass Image, override updateDisplayList and set the
> contentHolder's width/height afters super.updateDisplayList
>
> ________________________________
>
> From: [email protected] <flexcoders%40yahoogroups.com>
[mailto:[email protected] <flexcoders%40yahoogroups.com>] On
> Behalf Of bhaq1972
> Sent: Wednesday, April 04, 2007 7:54 AM
> To: [email protected] <flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Re: datagrid image itemRenderers don't
> maintainAspectRatio
>
>
>
> I've tried everything you suggested but doesn't work for me.
thanks
> anyway.
>
> --- In [email protected] <flexcoders%40yahoogroups.com><mailto:
flexcoders% <flexcoders%25>
40yahoogroups.com>
> , "Dexter18" <cbforen@> wrote:
> >
> > may set the height and the width of your image component. either
to
> > fixed size or to values from yout loaded image.
> >
> > then you can set -horizontalAlign="center"- and the
> > -verticalAlign="middle"- props of the image component to center
> your
> > image.
> > you dont need a wrapper component like a hbox or s.th. similar.
> >
> > when this not helps, i always set -maintainAspectRaio="true"-
> >
> >
> > carsten
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>
> <mailto:flexcoders% <flexcoders%25>40yahoogroups.com> , "bhaq1972"
<mbhaque@>

wrote:
> > >
> > > I've got a image based component i'm using as an itemRenderer
> > > eg
> > >
> > > dgImage.mxml
> > > ------------
> > > <mx:Image>
> > > etc
> > > </mx:Image>
> > >
> > > its all working, but the images look large and blurry.
> > >
> > > However, if i wrap with an hbox eg
> > >
> > > <mx:HBox>
> > > <mx:Image/>
> > > </mx:HBox>
> > >
> > > the images look perfect. I didn't have a problem with this
until
> i
> > > read Alex Harui's blog regarding performance issues using
> containers
> > > in itemRenderes.
> > >
> > > is there another way i can prevent blurry images?
> > >
> >
>




--
::| Carlos Rovira
::| http://www.carlosrovira.com
::| http://www.madeinflex.com

Reply via email to