karbon

vcomputeboundingbox.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Jan Hambrecht <jaham@gmx.net>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __VCOMPUTEBOUNDINGBOX_H__
00021 #define __VCOMPUTEBOUNDINGBOX_H__
00022 
00023 #include "KoRect.h"
00024 #include "vvisitor.h"
00025 
00026 class VDocument;
00027 class VLayer;
00028 class VGroup;
00029 class VPath;
00030 class VText;
00031 class VImage;
00032 
00037 class VComputeBoundingBox : public VVisitor
00038 {
00039 public:
00040     VComputeBoundingBox( bool omitHidden = false );
00041 
00042     virtual void visitVDocument( VDocument& document );
00043     virtual void visitVLayer( VLayer& layer );
00044     virtual void visitVGroup( VGroup& group );
00045     virtual void visitVPath( VPath& composite );
00046     virtual void visitVText( VText& text );
00047     virtual void visitVImage( VImage& img );
00048 
00049     const KoRect& boundingRect() const;
00050 private:
00051     bool isVisible( const VObject* object ) const;
00052 
00053     KoRect m_boundingBox;
00054     bool m_omitHidden;
00055 };
00056 
00057 #endif // __VCOMPUTEBOUNDINGBOX_H__
00058 
KDE Home | KDE Accessibility Home | Description of Access Keys