Warning, file /office/calligra/libs/flake/KoFilterEffectRenderContext.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002  * Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Lesser General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2.1 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Lesser General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KOFILTEREFFECTRENDERCONTEXT_H
0021 #define KOFILTEREFFECTRENDERCONTEXT_H
0022 
0023 #include "flake_export.h"
0024 
0025 #include <QtGlobal>
0026 
0027 class QRectF;
0028 class QPointF;
0029 class KoViewConverter;
0030 
0031 /// This class provides the render context for filter effects
0032 class FLAKE_EXPORT KoFilterEffectRenderContext
0033 {
0034 public:
0035     explicit KoFilterEffectRenderContext(const KoViewConverter &converter);
0036     ~KoFilterEffectRenderContext();
0037 
0038     /// Returns the filter region the filter is applied to
0039     QRectF filterRegion() const;
0040 
0041     /// Sets the filter region the filter is applied to
0042     void setFilterRegion(const QRectF &filterRegion);
0043 
0044     /// Sets the shape bounding box used to convert to user space coordinates
0045     void setShapeBoundingBox(const QRectF &bound);
0046 
0047     /// Converts point from bounding box coordinates to user space coordinates
0048     QPointF toUserSpace(const QPointF &value) const;
0049 
0050     /// Converts x-coordinate from bounding box coordinates to user space coordinates
0051     qreal toUserSpaceX(qreal value) const;
0052 
0053     /// Converts y-coordinate from bounding box coordinates to user space coordinates
0054     qreal toUserSpaceY(qreal value) const;
0055 
0056     /// Returns the view converter
0057     const KoViewConverter *viewConverter() const;
0058 
0059 private:
0060     class Private;
0061     Private * const d;
0062 };
0063 
0064 #endif // KOFILTEREFFECTRENDERCONTEXT_H