20#include <tdeapplication.h>
22#include <dcopclient.h>
24#include "kis_paint_device_iface.h"
25#include "kis_colorspace_iface.h"
26#include "kis_colorspace.h"
28#include "kis_paint_device.h"
31 : DCOPObject( "paintdevice")
36TQ_INT32 KisPaintDeviceIface::pixelSize() const
41TQ_INT32 KisPaintDeviceIface::nChannels() const
43 return m_parent->nChannels();
46TQByteArray KisPaintDeviceIface::readBytes(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
48 TQByteArray b (w * h * m_parent->pixelSize());
50 m_parent->readBytes((TQ_UINT8*)b.data(), x, y, w, h);
54void KisPaintDeviceIface::writeBytes(TQByteArray bytes, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
56 m_parent->writeBytes((TQ_UINT8*)bytes.data(), x, y, w, h);
59DCOPRef KisPaintDeviceIface::colorSpace() const
65 return DCOPRef( kapp->dcopClient()->appId(),
66 cs->dcopObject()->objId(),
67 "KisColorSpaceIface" );
70void KisPaintDeviceIface::setColorSpace(DCOPRef)
A colorspace is the definition of a certain color model in Chalk.
A paint device contains the actual pixel data and offers methods to read and write pixels.
virtual TQ_INT32 pixelSize() const Return the number of bytes a pixel takes.
|