All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BitmapBucket Class Reference

Public Member Functions

 BitmapBucket (Editor *editor, QColor color, QRect maxFillRegion, QPointF fillPoint, Properties properties)
 
void paint (const QPointF updatedPoint, std::function< void(BucketState, int, int)> progress)
 Will paint at the given point, given that it makes sense. More...
 

Private Member Functions

bool allowFill (const QPoint &checkPoint) const
 Based on the various factors dependant on which tool properties are set, the result will: More...
 
std::pair< Layer *, int > findBitmapLayerBelow (Layer *targetLayer, int layerIndex) const
 
BitmapImage flattenBitmapLayersToImage ()
 

Private Attributes

EditormEditor = nullptr
 
LayermTargetFillToLayer = nullptr
 
QHash< QRgb, bool > * mPixelCache
 
BitmapImage mReferenceImage
 
QRgb mBucketColor = 0
 
QRgb mStartReferenceColor = 0
 
QRect mMaxFillRegion
 
int mTolerance = 0
 
int mTargetFillToLayerIndex = -1
 
Properties mProperties
 

Detailed Description

Definition at line 34 of file bitmapbucket.h.

Member Function Documentation

bool BitmapBucket::allowFill ( const QPoint checkPoint) const
private

Based on the various factors dependant on which tool properties are set, the result will:

BucketProgress: BeforeFill to allow filling

Parameters
checkPoint
Returns
True if you are allowed to fill, otherwise false

Definition at line 71 of file bitmapbucket.cpp.

void BitmapBucket::paint ( const QPointF  updatedPoint,
std::function< void(BucketState, int, int)>  progress 
)

Will paint at the given point, given that it makes sense.

. canUse is always called prior to painting

Parameters
updatedPoint- the point where to point
progress- a function that returns the progress of the paint operation, the layer and frame that was affected at the given point.

Definition at line 101 of file bitmapbucket.cpp.


The documentation for this class was generated from the following files: