krita

kis_random_sub_accessor.h

00001 /*
00002  *  This file is part of the KDE project
00003  *
00004  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KIS_CURVE_ITERATOR_H
00021 #define KIS_CURVE_ITERATOR_H
00022 
00023 #include "kis_point.h"
00024 #include "kis_random_accessor.h"
00025 #include "kis_types.h"
00026 
00027 class KisRandomSubAccessorPixel{
00028     public:
00029         KisRandomSubAccessorPixel(KisPaintDeviceSP device);
00030         ~KisRandomSubAccessorPixel();
00034         void sampledOldRawData(Q_UINT8* dst);
00035         void sampledRawData(Q_UINT8* dst);
00036         inline void moveTo(double x, double y) { m_currentPoint.setX(x); m_currentPoint.setY(y); }
00037         inline void moveTo(const KisPoint& p ) { m_currentPoint = p; }
00038     private:
00039         KisPaintDeviceSP m_device;
00040         int m_position, m_end;
00041         KisPoint m_currentPoint;
00042         KisRandomAccessorPixel m_randomAccessor;
00043 };
00044 
00045 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys