21#include "vcomputeboundingbox.h"
25#include "vcomposite.h"
29VComputeBoundingBox::VComputeBoundingBox(
bool omitHidden )
30: m_omitHidden( omitHidden )
37 VLayerListIterator itr( document.
layers() );
39 for( ; itr.current(); ++itr )
44 if( m_omitHidden && ! isVisible( itr.current() ) )
46 itr.current()->accept( *
this );
53 VObjectListIterator itr( layer.
objects() );
55 for( ; itr.current(); ++itr )
60 if( m_omitHidden && ! isVisible( itr.current() ) )
62 itr.current()->accept( *
this );
69 VObjectListIterator itr( group.
objects() );
71 for( ; itr.current(); ++itr )
76 if( m_omitHidden && ! isVisible( itr.current() ) )
78 itr.current()->accept( *
this );
91 m_boundingBox |= text.boundingBox();
97 m_boundingBox |= img.boundingBox();
101VComputeBoundingBox::isVisible(
const VObject*
object )
const
107VComputeBoundingBox::boundingRect()
const
109 return m_boundingBox;
virtual void visitVText(VText &text)
Visit method for a VText.
virtual void visitVPath(VPath &composite)
Visit method for a VPath.
virtual void visitVLayer(VLayer &layer)
Visit method for a VLayer.
virtual void visitVGroup(VGroup &group)
Visit method for a VGroup.
virtual void visitVImage(VImage &img)
Visit method for a VImage.
virtual void visitVDocument(VDocument &document)
Visit method for a VDocument.
All non-visual, static doc info is in here.
const VLayerList & layers() const
Returns the list of layers.
Base class for all sort of VObject conglomerats.
const VObjectList & objects() const
Read only access to the grouped objects.
VLayer manages a set of vobjects.
The base class for all karbon objects.
@ hidden_locked
hidden and locked (r/o)
@ deleted
deleted, nearly dead
A composite path consists of one or many subpaths.
virtual const KoRect & boundingBox() const
Calculates the tightest bounding box around the object.