RE: (Postscript) transformation of block-container

2007-08-06 Thread Peter Coppens

 Give your block-container an id. If you render your document using -at,
 you get an XML file. Locate the block element that has a prod-id
 attribute with the id you've given the block-container. There may be
 more than one. Choose the one that has is-viewport-area=true. There,
 you'll find an attribute called ctm. That's a transformation matrix.
 If you manipulate it you may be able to achieve the effect you seek.
 After modifying the XML you can render the XML file to PostScript using
 -atin instead of -fo.
 
 More info: http://xmlgraphics.apache.org/fop/0.93/intermediate.html
 
 HTH
Yes it does. Thanks for the tip. I am most certainly going to try this.

Finally got around trying this. It works...more or less.

If I start from 

  fo:block-container id='totransform' height=100.0pt width=100.0pt 
  overflow=hidden background-color=rgb(0,0,255)
  position=absolute top=30pt left=30pt  
fo:block linefeed-treatment=ignore white-space-treatment=ignore
white-space-collapse=true  
   color=cmyk(0,0,1,0) font-size=8pt background-color=rgb(0,0,0)
jaja
/fo:block
/fo:block-container

and change the ctm as in 


block ipd=10 bpd=10
  ipda=10 bpda=10 bap=0 0 0 0
  prod-id=totransform is-viewport-area=true
  background=color=#ff
  bkg-color=java.awt.Color[r=0,g=0,b=255]
  left-position=3 top-position=3
  ctm=[0.7071 0.7071 -0.7071 0.7071 3.0 3.0]
  clipped=true positioning=absolute


This does not rotate the 'background' of the block-container, but only its'
'content'.

http://www.nabble.com/file/p12018237/fo.pdf fo.pdf 

Would anyone have any thoughts?

Thanks,

Peter
-- 
View this message in context: 
http://www.nabble.com/%28Postscript%29-transformation-of-block-container-tf3632392.html#a12018237
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Postscript) transformation of block-container

2007-04-24 Thread Jeremias Maerki
Hi Peter

On 23.04.2007 17:30:04 Peter Coppens wrote:
 
 Gentlepeople,
 
 Does anyone know how I could apply a postscript transformation on the
 content of a block-container.

No, I'm afraid, that's not possible. Not from XSL-FO anyway.

 What I currently do is render the container content to png and then use svg
 to do the transformation. 
 
 I would however like to keep the content as text and have not found a way to
 achieve that.

How about doing the whole thing in SVG?

 The basic use case is arbitrary rotation of (fop formatted) text blocks, but
 scaling and skewing might be nice to have as well.
 
 Any guidance, as always, most warmly welcomed!

There's one hack you can try (0.93 or later): Manipulating the area tree
XML

Give your block-container an id. If you render your document using -at,
you get an XML file. Locate the block element that has a prod-id
attribute with the id you've given the block-container. There may be
more than one. Choose the one that has is-viewport-area=true. There,
you'll find an attribute called ctm. That's a transformation matrix.
If you manipulate it you may be able to achieve the effect you seek.
After modifying the XML you can render the XML file to PostScript using
-atin instead of -fo.

More info: http://xmlgraphics.apache.org/fop/0.93/intermediate.html

HTH

Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: (Postscript) transformation of block-container

2007-04-24 Thread Peter

 How about doing the whole thing in SVG?

Problem is that I then loose the text formatting features fo offers. I am
assuming that outputting fo(p) input to svg output is not anywhere near
production quality, but I am not sure that assumptions is true.

 There's one hack you can try (0.93 or later): Manipulating the area tree
 XML
 
 Give your block-container an id. If you render your document using -at,
 you get an XML file. Locate the block element that has a prod-id
 attribute with the id you've given the block-container. There may be
 more than one. Choose the one that has is-viewport-area=true. There,
 you'll find an attribute called ctm. That's a transformation matrix.
 If you manipulate it you may be able to achieve the effect you seek.
 After modifying the XML you can render the XML file to PostScript using
 -atin instead of -fo.
 
 More info: http://xmlgraphics.apache.org/fop/0.93/intermediate.html
 
 HTH
Yes it does. Thanks for the tip. I am most certainly going to try this.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]