vcomputeboundingbox.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Jan Hambrecht <jaham@gmx.net>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __VCOMPUTEBOUNDINGBOX_H__
21#define __VCOMPUTEBOUNDINGBOX_H__
22
23#include "KoRect.h"
24#include "vvisitor.h"
25
26class VDocument;
27class VLayer;
28class VGroup;
29class VPath;
30class VText;
31class VImage;
32
38{
39public:
40 VComputeBoundingBox( bool omitHidden = false );
41
42 virtual void visitVDocument( VDocument& document );
43 virtual void visitVLayer( VLayer& layer );
44 virtual void visitVGroup( VGroup& group );
45 virtual void visitVPath( VPath& composite );
46 virtual void visitVText( VText& text );
47 virtual void visitVImage( VImage& img );
48
49 const KoRect& boundingRect() const;
50private:
51 bool isVisible( const VObject* object ) const;
52
53 KoRect m_boundingBox;
54 bool m_omitHidden;
55};
56
57#endif // __VCOMPUTEBOUNDINGBOX_H__
58
This visitor visits objects and calculates the combined bounding box of the objects and their child o...
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.
Definition vdocument.h:53
Base class for all sort of VObject conglomerats.
Definition vgroup.h:35
VLayer manages a set of vobjects.
Definition vlayer.h:37
The base class for all karbon objects.
Definition vobject.h:50
A composite path consists of one or many subpaths.
Definition vcomposite.h:48
The abstract visitor class.
Definition vvisitor.h:51