18#ifndef KIS_SELECTION_H_
19#define KIS_SELECTION_H_
24#include "kis_paint_device.h"
26#include <koffice_export.h>
29enum enumSelectionMode {
68 TQ_UINT8 selected(TQ_INT32 x, TQ_INT32 y);
70 void setSelected(TQ_INT32 x, TQ_INT32 y, TQ_UINT8 s);
74 void select(TQRect r);
83 bool isTotallyUnselected(TQRect r);
91 bool isProbablyTotallyUnselected(TQRect r);
97 TQRect selectedRect() const;
103 TQRect selectedExactRect() const;
105 void paintSelection(TQImage img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h);
106 void paintSelection(TQImage img, const TQRect& scaledImageRect, const TQSize& scaledImageSize, const TQSize& imageSize);
108 void startCachingExactRect();
109 void stopCachingExactRect();
113 void setInterestedInDirtyness( bool b) { m_dirty = b; }
114 bool interestedInDirtyness() const { return m_dirty; }
116 virtual void setDirty( const TQRect & rc);
118 inline KisPaintDeviceSP parentPaintDevice() { return m_parentPaintDevice; }
120 void paintUniformSelectionRegion(TQImage img, const TQRect& imageRect, const TQRegion& uniformRegion);
125 void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const
132 void exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const
137 TQRect exactBounds() const
142 TQRect exactBoundsOldMethod() const
144 return KisPaintDevice::exactBoundsOldMethod();
147 TQRect exactBoundsImprovedOldMethod() const
149 return KisPaintDevice::exactBoundsImprovedOldMethod();
154 KisPaintDeviceSP m_parentPaintDevice;
155 bool m_doCacheExactRect;
156 TQRect m_cachedExactRect;
A paint device contains the actual pixel data and offers methods to read and write pixels.
virtual void clear() Complete erase the current paint device.
virtual void setDirty() Set the parent layer completely dirty, if this paint device has one.
virtual void extent(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const Retrieve the bounds of the paint device.
virtual void exactBounds(TQ_INT32 &x, TQ_INT32 &y, TQ_INT32 &w, TQ_INT32 &h) const Get the exact bounds of this paint device.
KisSelection contains a byte-map representation of a layer, where the value of a byte signifies wheth...
|