chalk

kis_paint_device_iface.h
1/*
2 * This file is part of the KDE project
3 *
4 * Copyright (C) 2005 Boudewijn Rempt <boud@valdyas.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef _KIS_PAINT_DEVICE_IFACE_H
21#define _KIS_PAINT_DEVICE_IFACE_H
22
23#include <dcopref.h>
24#include <dcopobject.h>
25
26#include <tqstring.h>
27
28class KisPaintDevice;
29
30class KisPaintDeviceIface : virtual public DCOPObject
31{
32 K_DCOP
33public:
34 KisPaintDeviceIface( KisPaintDevice * parent );
35k_dcop:
36
40 TQ_INT32 pixelSize() const;
41
45 TQ_INT32 nChannels() const;
46
57 TQByteArray readBytes(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
58
67 void writeBytes(TQByteArray bytes, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
68
72 DCOPRef colorSpace() const;
73
77 void setColorSpace(DCOPRef colorSpace);
78
79
80private:
81
82 KisPaintDevice *m_parent;
83};
84
85#endif
A paint device contains the actual pixel data and offers methods to read and write pixels.