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 shouldFill (QPointF 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
 
BitmapImage mReferenceImage
 
QRgb mBucketColor = 0
 
QRgb mReferenceColor = 0
 
QRgb mAppliedColor = 0
 
QPointF mBucketStartPoint
 
QRect mMaxFillRegion
 
int mTargetFillToLayerIndex = -1
 
Properties mProperties
 
bool mFirstPaint = true
 

Detailed Description

Definition at line 34 of file bitmapbucket.h.

Member Function Documentation

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 121 of file bitmapbucket.cpp.

bool BitmapBucket::shouldFill ( QPointF  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.


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