Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

pdf::page::CXObjInst Class Reference

an instance of an xobject More...

#include <XObjInst.hh>

Collaboration diagram for pdf::page::CXObjInst:

Collaboration graph
List of all members.

Public Methods

Private Attributes

Detailed Description

an instance of an xobject

this class represents an instance of an xobject inside a page. it contains information of drawing an xobject on a page. a page can contain multiple instance of the same xobject, such that the same xobject will be drawn more than once.

the CXObjInst class contains a pointer to an xobject as well as a transformation matrix. before the xobject is drawn the transformation matrix will be applied. you should use the transformation matrix to specify position and size of the xobject's appearance.

Constructor & Destructor Documentation

pdf::page::CXObjInst::CXObjInst const graph::CXObject   xobj,
double    x,
double    y,
double    width,
double    height

this constructor will calculate a transformation from its parameters.

xobj  a pointer to the xobject to be drawn. must not be zero.
x  x coordinate of the xobject in the page, in user space units (1/72 inches by default).
y  y coordinate. same unit as x.
width  width of the xobject. same unit as x and y.
height  height of the xobject. same unit as width.

00045     : m_transform( width, 0, 0, height, x, y ), m_xobj( xobj )
00046 {
00047     assert( xobj != 0 ) ;
00048 }

pdf::page::CXObjInst::CXObjInst const graph::CXObject   xobj,
const util::CMatrix2D   transform

this constructor will copy the parameters to the members.

xobj  a pointer to the xobject to be drawn. must not be zero.
transform  a 2D matrix specifying the transformation of the xobject in the page.

00057     : m_transform( transform ), m_xobj( xobj )
00058 {
00059     assert( xobj != 0 ) ;
00060 }


destructor does nothing.

00065 {
00066 }

Member Function Documentation

std::ostream & pdf::page::CXObjInst::Write std::ostream &    os const

write the code to draw an xobject to the output stream. note that this function will not print the content of the xobject to the output stream.

os  the output stream
the parameter os

00075 {
00076     assert( m_xobj != 0 ) ;
00078     return os << "q\n" << m_transform << " cm\n" << m_xobj->Name( )
00079               << " Do\nQ\n" ;
00080 }

const graph::CXObject * pdf::page::CXObjInst::XObj   const

returns the underlying xobject pointer.

00085 {
00086     assert( m_xobj != 0 ) ;
00088     return m_xobj ;
00089 }

Member Data Documentation

util::CMatrix2D pdf::page::CXObjInst::m_transform [private]

transformation matrix

const graph::CXObject* pdf::page::CXObjInst::m_xobj [private]

the underlying xobject

The documentation for this class was generated from the following files:
Generated on Sun Feb 2 09:17:32 2003 for libpdf++ by doxygen1.2.16