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

Re: [XSL-FO] Blocks with rounded corners

Expand Messages
  • W. Eliot Kimber
    ... Barring a proprietary extension (which would actually be pretty easy to implement, at least for PostScript/PDF output), you must use graphics. I believe
    Message 1 of 2 , Aug 28, 2003
    • 0 Attachment
      pmdgexinc wrote:

      > Hi,
      >
      > I was wondering if there's any way to create a block with a border
      > that has rounded corners. I searched the archives and did find
      > something about using an svg image but I need to dynamically size the
      > box containing the text. Any help would be appreciated.

      Barring a proprietary extension (which would actually be pretty easy to
      implement, at least for PostScript/PDF output), you must use graphics. I
      believe all of XSL Formatter, XEP, and FOP will support using either
      inline SVG or external EPS graphics for this. XSL Formatter also
      supports using inline EPS graphics (which I requested for exactly this
      requirement).

      By using a block container and scaling on the graphic, you should be
      able to have the rounded-corner graphic scale. The only fly may be that
      you may not want the radius of the corners to scale linearly with the
      size of the block.

      Here is the EPS code needed to create a black rounded box. To make it an
      unfilled box, delete "fill" line.

      Cheers,

      Eliot

      --- cut --
      %!PS-Adobe-3.0 EPSF-3.0
      %%BoundingBox: 0 0 43 43
      %%Pages: 0
      %%Creator: W. Eliot Kimber
      %%Title: Black rounded box
      %%CreationDate: 10 Feb 2003
      %%LanguageLevel: 2
      %%EndComments
      %%BeginProlog
      %%EndProlog
      %%BeginSetup
      %%EndSetup
      %%Page: 1 1
      %%BeginPageSetup
      %%EndPageSetup
      0.1 setlinewidth
      newpath
      0 5 moveto
      0 43 43 43 5 arct
      43 43 43 0 5 arct
      43 0 0 0 5 arct
      0 0 0 43 5 arct
      closepath
      gsave
      stroke
      grestore
      fill
      %%PageTrailer
      %%Trailer
      %%EOF
      --- cut ---
      --
      W. Eliot Kimber, eliot@...
      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.