23#include <tqvaluevector.h>
29#include "kis_resource.h"
30#include "kis_global.h"
31#include "kis_gradient.h"
32#include "kis_alpha_mask.h"
38struct KisPaletteEntry {
41 bool operator==( const KisPaletteEntry& rhs) const {
42 return color == rhs.color && name == rhs.name;
60 KisPalette( const TQImage * img, TQ_INT32 nColors, const TQString & name);
65 KisPalette( const KisPaintDeviceSP device, TQ_INT32 nColors, const TQString & name);
70 KisPalette( const KisGradient * gradient, TQ_INT32 nColors, const TQString & name);
88 virtual TQImage img();
93 void add( const KisPaletteEntry &);
94 void remove( const KisPaletteEntry &);
95 KisPaletteEntry getColor(TQ_UINT32 index);
109 TQValueVector<KisPaletteEntry> m_colors;
A paint device contains the actual pixel data and offers methods to read and write pixels.
Open Gimp, Photoshop or RIFF palette files.
virtual bool load() Load this resource.
KisPalette() Create an empty palette.
virtual TQImage img() Returns a TQImage representing this resource.
virtual bool save() Save this resource asynchronously.
The KisResource class provides a representation of Chalk image resources.
|