You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Gergely Hajdu <gh...@abprodata.com> on 2003/12/09 15:17:32 UTC

Insert rectangle and define color of font in fo-document

1.Is it possible with fo-tags to insert a white rectangle into an image that
will be rendered. Something like

<fo:block  shape="rect" size="100%" fillColor="white" x_pos=0
y_pos=0></fo:block>

2.Is it possible with a fo-tag to define which color the printing of a
rendered
image should have (black in this case) ? Something like :

<fo:block line-height="12pt" font-size="10pt" font-color="black"></fo:block>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Insert rectangle and define color of font in fo-document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Gergely Hajdu wrote:

> 1.Is it possible with fo-tags to insert a white rectangle into an image that
> will be rendered. Something like
> 
> <fo:block  shape="rect" size="100%" fillColor="white" x_pos=0
> y_pos=0></fo:block>

You can overlap images with FO elements, although the lack of
implementation for relative positioned FOs makes this tricky
in the general case. Apart from this, it is almost always bad
to guess at language capabilities, a look at the spec or a good
book will take you much farther.


> 2.Is it possible with a fo-tag to define which color the printing of a
> rendered
> image should have (black in this case) ? Something like :
> 
> <fo:block line-height="12pt" font-size="10pt" font-color="black"></fo:block>

For both your problems I'd suggest to investigate in SVGs. You can
comfortably mix bitmapped images with vector graphic elements in
an SVG, and use the resulting image in FOP.

J.Pietschmann




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Insert rectangle and define color of font in fo-document

Posted by Gergely Hajdu <gh...@abprodata.com>.
Could someone PLEASE help me how to write this code,
to obtain black background ( maybe this can be set directly, or
maybe by inserting a black rectangle that covers the hole page)
for the image to be rendered ? And where should this code be
inserted ?

Thanks in advance
/Gergely


-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: Tuesday, December 09, 2003 5:51 PM
To: fop-user@xml.apache.org
Subject: RE: Insert rectangle and define color of font in fo-document


> -----Original Message-----
> From: Gergely Hajdu [mailto:ghajdu@abprodata.com]
>
> 1.Is it possible with fo-tags to insert a white rectangle into an
> image that
> will be rendered. Something like
>
> <fo:block  shape="rect" size="100%" fillColor="white" x_pos=0
> y_pos=0></fo:block>
>

Yes. Use an <fo:block-container /> with the appropriate dimensions and
background-color.
(since you want the size to be 100%, it's probably best to specify the
dimensions explicitly and give them the same value as the region-body or the
whole page... )

> 2.Is it possible with a fo-tag to define which color the printing of a
> rendered
> image should have (black in this case) ? Something like :
>

If it's the text in the <fo:block /> you're referring to, then this should
be no problem, however, I think 'color' will do just fine (instead of
'font-color').


Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Insert rectangle and define color of font in fo-document

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Gergely Hajdu [mailto:ghajdu@abprodata.com]
>
> 1.Is it possible with fo-tags to insert a white rectangle into an
> image that
> will be rendered. Something like
>
> <fo:block  shape="rect" size="100%" fillColor="white" x_pos=0
> y_pos=0></fo:block>
>

Yes. Use an <fo:block-container /> with the appropriate dimensions and
background-color.
(since you want the size to be 100%, it's probably best to specify the
dimensions explicitly and give them the same value as the region-body or the
whole page... )

> 2.Is it possible with a fo-tag to define which color the printing of a
> rendered
> image should have (black in this case) ? Something like :
>

If it's the text in the <fo:block /> you're referring to, then this should
be no problem, however, I think 'color' will do just fine (instead of
'font-color').


Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org