Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] coloured rectangles

Expand Messages
  • W. Eliot Kimber
    ... It s not completely clear what effect you re trying to get, but the easiest thing is probably to set the extent of one of the edge regions to be coincident
    Message 1 of 3 , Mar 3, 2003
    • 0 Attachment
      kennethy1 wrote:
      > Hello all! I would like to absolutely-position coloured rectangles
      > anywhere over the body region, then write over the top of them with
      > the dynamic (text) flow. Without using external graphics, how might
      > I do this? I've tried using leaders with a set height/width, but they
      > are rendered on top of my dynamic text.

      It's not completely clear what effect you're trying to get, but the
      easiest thing is probably to set the extent of one of the edge regions
      to be coincident with the region body--anything you put in this region
      using static-content will be rendered under the region-body.

      To get rectangles of a specified size use block-container with explicit
      block-progression-dimension and inline-progression-dimension settings, e.g.:

      <fo:flow flow-name="xsl-region-body">
      <!-- 1 inch blue box -->
      <fo:block-container
      block-progression-dimension="1in"
      inline-progression-dimension="1in"
      background-color="blue"
      absolute-position="absolute"
      left="2in"
      top="2in">
      <fo:block> </fo:block>
      </fo:block>
      </fo:flow>

      Note that the block with a non-break space is not strictly required.

      Block containers with absolute positioning are positioned relative to
      their containing reference area (the body region in this example). Block
      containers establish new reference areas, so you can use nested block
      containers to easily do overlays, such as text on top of graphics or one
      graphic on top of another (such as an SVG defining callouts and labels
      on top of a bitmap or some such).

      Blocks drawn earlier in the area tree should go *under* later blocks.

      Note that unless you are explictly setting page breaks, there will be no
      way to predict reliably what page a given block-container will appear on
      (unless you put them in the static content, in which case they'll appear
      on each page the static content applies to).

      You can also use inline-container to create arbitrarily sized blocks
      that are inline in a flow of text.

      Cheers,

      Eliot
      --
      W. Eliot Kimber, eliot@...
      Consultant, ISOGEN International

      1016 La Posada Dr., Suite 240
      Austin, TX 78752 Phone: 512.656.4139
    • kennethy1 <kennethy1@yahoo.com.au>
      Thanx heaps Eliot! That s a very creative approach... never thought of it. And thanx for the amount of detail you place in your replies. Cheers, Kenneth ...
      Message 2 of 3 , Mar 3, 2003
      • 0 Attachment
        Thanx heaps Eliot! That's a very creative approach... never thought
        of it. And thanx for the amount of detail you place in your replies.

        Cheers,
        Kenneth


        --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <eliot@i...> wrote:
        > kennethy1 wrote:
        > > Hello all! I would like to absolutely-position coloured
        rectangles
        > > anywhere over the body region, then write over the top of them
        with
        > > the dynamic (text) flow. Without using external graphics, how
        might
        > > I do this? I've tried using leaders with a set height/width, but
        they
        > > are rendered on top of my dynamic text.
        >
        > It's not completely clear what effect you're trying to get, but the
        > easiest thing is probably to set the extent of one of the edge
        regions
        > to be coincident with the region body--anything you put in this
        region
        > using static-content will be rendered under the region-body.
        >
        > To get rectangles of a specified size use block-container with
        explicit
        > block-progression-dimension and inline-progression-dimension
        settings, e.g.:
        >
        > <fo:flow flow-name="xsl-region-body">
        > <!-- 1 inch blue box -->
        > <fo:block-container
        > block-progression-dimension="1in"
        > inline-progression-dimension="1in"
        > background-color="blue"
        > absolute-position="absolute"
        > left="2in"
        > top="2in">
        > <fo:block> </fo:block>
        > </fo:block>
        > </fo:flow>
        >
        > Note that the block with a non-break space is not strictly required.
        >
        > Block containers with absolute positioning are positioned relative
        to
        > their containing reference area (the body region in this example).
        Block
        > containers establish new reference areas, so you can use nested
        block
        > containers to easily do overlays, such as text on top of graphics
        or one
        > graphic on top of another (such as an SVG defining callouts and
        labels
        > on top of a bitmap or some such).
        >
        > Blocks drawn earlier in the area tree should go *under* later
        blocks.
        >
        > Note that unless you are explictly setting page breaks, there will
        be no
        > way to predict reliably what page a given block-container will
        appear on
        > (unless you put them in the static content, in which case they'll
        appear
        > on each page the static content applies to).
        >
        > You can also use inline-container to create arbitrarily sized
        blocks
        > that are inline in a flow of text.
        >
        > Cheers,
        >
        > Eliot
        > --
        > W. Eliot Kimber, eliot@i...
        > Consultant, ISOGEN International
        >
        > 1016 La Posada Dr., Suite 240
        > Austin, TX 78752 Phone: 512.656.4139
      Your message has been successfully submitted and would be delivered to recipients shortly.