149 if (!destination)
return;
156 if (!dst || !src)
return;
285 quint8 *data =
new quint8[w * h];
287 ba = QByteArray((
const char*)data, (
int)(w * h));
float value(const T *src, size_t ch)
const quint8 OPACITY_OPAQUE_U8
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
static KisClipboard * instance()
void setLayers(KisNodeList nodes, KisImageSP image, const QRect referenceRect, bool forceCopy=false)
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
void clearSelection(KisSelectionSP selection)
KisDefaultBoundsBaseSP defaultBounds() const
void readBytes(quint8 *data, qint32 x, qint32 y, qint32 w, qint32 h) const
void writeBytes(const quint8 *data, qint32 x, qint32 y, qint32 w, qint32 h)
static void copyAreaOptimized(const QPoint &dstPt, KisPaintDeviceSP src, KisPaintDeviceSP dst, const QRect &originalSrcRect)
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
QRect changeRect(const QRect &rect, KisDefaultBoundsBaseSP defaultBounds) override
void process(KisPixelSelectionSP pixelSelection, const QRect &rect) override
void resize(int w, int h)
void cut(Node *node)
cut erases the area defined by the selection from the node and puts a copy on the clipboard.
void intersect(Selection *selection)
void copy(Node *node)
copy copies the area defined by the selection from the node to the clipboard.
Selection(KisSelectionSP selection, QObject *parent=0)
void paste(Node *destination, int x, int y)
paste pastes the content of the clipboard to the given node, limited by the area of the current selec...
void selectAll(Node *node, int value)
KisSelectionSP selection() const
bool operator==(const Selection &other) const
void shrink(int xRadius, int yRadius, bool edgeLock)
Selection * duplicate() const
void subtract(Selection *selection)
void setPixelData(QByteArray value, int x, int y, int w, int h)
setPixelData writes the given bytes, of which there must be enough, into the Selection.
void border(int xRadius, int yRadius)
QByteArray pixelData(int x, int y, int w, int h) const
pixelData reads the given rectangle from the Selection's mask and returns it as a byte array....
void grow(int xradius, int yradius)
bool operator!=(const Selection &other) const
void add(Selection *selection)
void select(int x, int y, int w, int h, int value)
void replace(Selection *selection)
void symmetricdifference(Selection *selection)
virtual QRect exactBounds() const
virtual KisPaintDeviceSP paintDevice() const =0
bool hasEditablePaintDevice() const
void moveTo(const QPoint &pt) override
void select(const QRect &r, quint8 selectedness=MAX_SELECTED)
void applySelection(KisPixelSelectionSP selection, SelectionAction action)
KisPixelSelectionSP projection() const
bool hasNonEmptyPixelSelection() const
KisPixelSelectionSP pixelSelection
QRect selectedExactRect() const
Slow, but exact way of determining the rectangle that encloses the selection.