chalk

kis_colorspace_iface.cpp
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#include <tdeapplication.h>
21
22#include "kis_colorspace_iface.h"
23#include "kis_colorspace.h"
24
25#include <dcopclient.h>
26
27KisColorSpaceIface::KisColorSpaceIface( KisColorSpace * parent )
28 : DCOPObject(parent->id().id().latin1())
29{
30 m_parent = parent;
31}
32
33TQByteArray KisColorSpaceIface::invertColor(TQByteArray src, TQ_INT32 nPixels)
34{
35 m_parent->invertColor((TQ_UINT8*)src.data(), nPixels);
36 return src;
37
38}
39
A colorspace is the definition of a certain color model in Chalk.
virtual void invertColor(TQ_UINT8 *src, TQ_INT32 nPixels)=0
Invert color channels of the given pixels.