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

    BitmapFill with no-repeat mode?

    DaTrixo

      Hi.

       

      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:fill>
                     <s:BitmapFill source="@Embed('images/bglineup.gif') fillMode="where is no-repeat mode?? :(" />
                </s:fill>
           </s:Rect>
      </s:SkinnableContainer>
      

       

      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

          hi,

           

          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.

           

           

          David.

          • 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

              hi,

               

              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.

               

               

              <Group>

              <BitmapImage 100% height and width scaled/>

              <Hgroup 100% height and width>

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

              </HGroup>

              </Group>

               

               

              David

              • 4. Re: BitmapFill with no-repeat mode?
                JCVD-13 Level 1

                sorry wrong post

                 

                Message was edited by: JCVD-13