kis_paint_device.h
248 virtual void convertTo(KisColorSpace * dstColorSpace, TQ_INT32 renderingIntent = INTENT_PERCEPTUAL);
260 virtual void convertFromTQImage(const TQImage& img, const TQString &srcProfileName, TQ_INT32 offsetX = 0, TQ_INT32 offsetY = 0);
274 virtual TQImage convertToTQImage(KisProfile * dstProfile, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, float exposure = 0.0f);
432 KisRectIteratorPixel createRectIterator(TQ_INT32 left, TQ_INT32 top, TQ_INT32 w, TQ_INT32 h, bool writable);
A colorspace is the definition of a certain color model in Chalk.
Definition kis_colorspace.h:58
KisDataManager defines the interface that modules responsible for storing and retrieving data must in...
Definition kis_datamanager.h:45
The pixel iterators are high level iterarators.
Definition kis_iterators_pixel.h:33
A paint device contains the actual pixel data and offers methods to read and write pixels.
Definition kis_paint_device.h:76
KisImage * image() const
Return the image that contains this paint device, or 0 if it is not part of an image.
Definition kis_paint_device.cpp:366
virtual TQImage convertToTQImage(KisProfile *dstProfile, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, float exposure=0.0f)
Create an RGBA TQImage from a rectangle in the paint device.
Definition kis_paint_device.cpp:853
KisRandomSubAccessorPixel createRandomSubAccessor()
This function create a random accessor which can easily access to sub pixel values.
Definition kis_paint_device.cpp:1001
KisRectIteratorPixel createRectIterator(TQ_INT32 left, TQ_INT32 top, TQ_INT32 w, TQ_INT32 h, bool writable)
This function return an iterator which points to the first pixel of an rectangle.
Definition kis_paint_device.cpp:969
KisPaintDevice(KisColorSpace *colorSpace, const char *name=0)
Create a new paint device with the specified colorspace.
Definition kis_paint_device.cpp:204
TQ_INT32 rowStride(TQ_INT32 x, TQ_INT32 y)
Get the row stride at pixel (x, y).
Definition kis_paint_device.cpp:1213
virtual void writeBytes(const TQ_UINT8 *data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
Copy the bytes in data into the rect specified by x, y, w, h.
Definition kis_paint_device.cpp:1248
bool hasExifInfo()
This function return true if the layer has exif info associated with it.
Definition kis_paint_device.h:517
KisVLineIteratorPixel createVLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 h, bool writable)
This function return an iterator which points to the first pixel of a vertical line.
Definition kis_paint_device.cpp:985
virtual bool read(KoStore *store)
Fill this paint device with the pixels from the specified file store.
Definition kis_paint_device.cpp:708
KisLayer * parentLayer() const
Returns the KisLayer that contains this paint device, or 0 if this is not part of a layer.
Definition kis_paint_device.cpp:346
TDE_DEPRECATED const TQ_UINT8 * pixel(TQ_INT32 x, TQ_INT32 y)
Get a read-only pointer to pixel (x, y).
Definition kis_paint_device.cpp:1218
virtual void readBytes(TQ_UINT8 *data, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
Read the bytes representing the rectangle described by x, y, w, h into data.
Definition kis_paint_device.cpp:1243
virtual void setProfile(KisProfile *profile)
Changes the profile of the colorspace of this paint device to the given profile.
Definition kis_paint_device.cpp:771
KisColor colorAt(TQ_INT32 x, TQ_INT32 y)
Return the KisColor of the pixel at x,y.
Definition kis_paint_device.cpp:1169
KisExifInfo * exifInfo()
Return the exifInfo associated with this layer.
Definition kis_paint_device.cpp:1259
KisSelectionSP selection()
Get the current selection or create one if this paintdevice hasn't got a selection yet.
Definition kis_paint_device.cpp:1020
virtual void setDirty(const TQRect &rc)
Add the specified rect top the parent layer (if present).
Definition kis_paint_device.cpp:356
void setParentLayer(KisLayer *parentLayer)
Set the KisLayer that contains this paint device, or 0 if this is not part of a layer.
Definition kis_paint_device.cpp:351
void clearSelection()
Clear the selected pixels from the paint device.
Definition kis_paint_device.cpp:1081
bool contains(TQ_INT32 x, TQ_INT32 y) const
Returns true of x,y is within the extent of this paint device.
void addSelection(KisSelectionSP selection)
Adds the specified selection to the currently active selection for this paintdevice.
Definition kis_paint_device.cpp:1062
bool selectionDeselected()
Whether the previous selection was deselected.
Definition kis_paint_device.cpp:1042
virtual void convertTo(KisColorSpace *dstColorSpace, TQ_INT32 renderingIntent=INTENT_PERCEPTUAL)
Converts the paint device to a different colorspace.
Definition kis_paint_device.cpp:716
TQ_INT32 numContiguousRows(TQ_INT32 y, TQ_INT32 minX, TQ_INT32 maxX)
Get the number of contiguous rows starting at y, valid for all values of x between minX and maxX.
Definition kis_paint_device.cpp:1208
virtual KNamedCommand * moveCommand(TQ_INT32 x, TQ_INT32 y)
Move the paint device to the specified location and make it possible to undo the move.
Definition kis_paint_device.cpp:401
TDE_DEPRECATED TQ_UINT8 * writablePixel(TQ_INT32 x, TQ_INT32 y)
Get a read-write pointer to pixel (x, y).
Definition kis_paint_device.cpp:1223
virtual void convertFromTQImage(const TQImage &img, const TQString &srcProfileName, TQ_INT32 offsetX=0, TQ_INT32 offsetY=0)
Fill this paint device with the data from img; starting at (offsetX, offsetY).
Definition kis_paint_device.cpp:804
void crop(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
Cut the paint device down to the specified rect.
Definition kis_paint_device.cpp:610
KisPaintDeviceSP createThumbnailDevice(TQ_INT32 w, TQ_INT32 h)
Creates a paint device thumbnail of the paint device, retaining the aspect ratio.
Definition kis_paint_device.cpp:873
bool extentIsValid() const
XXX: This should be a temporay hack, awaiting a proper fix.
Definition kis_paint_device.cpp:423
virtual TQ_INT32 pixelSize() const
Return the number of bytes a pixel takes.
Definition kis_paint_device.h:566
virtual bool write(KoStore *store)
Write the pixels of this paint device into the specified file store.
Definition kis_paint_device.cpp:700
virtual void move(TQ_INT32 x, TQ_INT32 y)
Moves the device to these new coordinates (so no incremental move or so).
Definition kis_paint_device.cpp:376
void applySelectionMask(KisSelectionSP mask)
Apply a mask to the image data, i.e.
Definition kis_paint_device.cpp:1110
KisSelectionSP setSelection(KisSelectionSP selection)
Sets the selection of this paint device to the new selection, returns the old selection,...
Definition kis_paint_device.cpp:1131
KisHLineIteratorPixel createHLineIterator(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, bool writable)
This function return an iterator which points to the first pixel of a horizontal line.
Definition kis_paint_device.cpp:977
KisRandomAccessorPixel createRandomAccessor(TQ_INT32 x, TQ_INT32 y, bool writable)
This function creates a random accessor which allow to randomly access any pixels on the paint device...
Definition kis_paint_device.cpp:994
void emitSelectionChanged()
Notify the owning image that the current selection has changed.
Definition kis_paint_device.cpp:1006
virtual TQ_INT32 nChannels() const
Return the number of channels a pixel takes.
Definition kis_paint_device.h:572
bool setPixel(TQ_INT32 x, TQ_INT32 y, const TQColor &c, TQ_UINT8 opacity)
Set the specified pixel to the specified color.
Definition kis_paint_device.cpp:1176
bool hasSelection()
Whether there is a valid selection for this paintdevice.
Definition kis_paint_device.cpp:1037
void setExtentIsValid(bool isValid)
Convience method for the above.
Definition kis_paint_device.cpp:428
virtual void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const
Retrieve the bounds of the paint device.
Definition kis_paint_device.cpp:409
TQ_INT32 numContiguousColumns(TQ_INT32 x, TQ_INT32 minY, TQ_INT32 maxY)
Get the number of contiguous columns starting at x, valid for all values of y between minY and maxY.
Definition kis_paint_device.cpp:1203
virtual void exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const
Get the exact bounds of this paint device.
Definition kis_paint_device.cpp:433
void subtractSelection(KisSelectionSP selection)
Subtracts the specified selection from the currently active selection for this paindevice.
Definition kis_paint_device.cpp:1070
void setData(KisDataManagerSP data, KisColorSpace *colorSpace)
Replace the pixel data, color strategy, and profile.
Definition kis_paint_device.cpp:783
virtual TQImage createThumbnail(TQ_INT32 maxw, TQ_INT32 maxh)
Creates a thumbnail of the paint device, retaining the aspect ratio.
Definition kis_paint_device.cpp:921
void fill(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const TQ_UINT8 *fillPixel)
Fill the given rectangle with the given pixel.
Definition kis_paint_device.cpp:626
