4 Replies Latest reply on Jul 1, 2011 8:56 AM by JCVD-13

    BitmapFill with no-repeat mode?




      I have a litte question. I trying to put background image inside <s:Rect> but without any repeat or scale/sclip. How do that?

      Look for example below:

      <s:SkinnableContainer width="100%" minWidth="580" height="55">
           <s:Rect width="100%" height="100%">
                     <s:BitmapFill source="@Embed('images/bglineup.gif') fillMode="where is no-repeat mode?? :(" />


      Any help or ideas? I really need background image in this SkinnableContainer(i dont want use any groups or canvases).

        • 1. Re: BitmapFill with no-repeat mode?
          David_F57 Level 5



          What exactly are you trying to achieve you need to have some sort of fill mode be it scale, clip or repeat.


          First you should just use a bitmapimage no need of a rect, and if you don't use at least clip then the image will appear outside the bounds of the container if it is larger than the container.




          • 2. Re: BitmapFill with no-repeat mode?
            DaTrixo Level 1

            I can't write or add anything upon BitmapImage when layout is set to Horizontal(i must have that layout). I need exactly background-image for a container with no-repeat mode.

            • 3. Re: BitmapFill with no-repeat mode?
              David_F57 Level 5



              firstly your code as shown had nothing to do with layouts, second you can't exactly fill an area without scaling, an image can not miraculously change its size to match an area.


              If you need to fill an area that has a layout but want the image at the back of it then you still dont draw in the rect. You need to either create a skin for your container that has the image behind the containers 'work' canvas or you need to layer the area yourself. LIke the structure below, that will achieve what you need to do.




              <BitmapImage 100% height and width scaled/>

              <Hgroup 100% height and width>

              ---------all you items on top of image go in here.






              • 4. Re: BitmapFill with no-repeat mode?

                sorry wrong post


                Message was edited by: JCVD-13