Skip to content

Commit

Permalink
Adjust tests after modifying where to start fill
Browse files Browse the repository at this point in the history
When the point is outside the fill bounds
  • Loading branch information
MrStevns committed Aug 18, 2024
1 parent ba65c8a commit 1e8d0ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/test_bitmapbucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ TEST_CASE("BitmapBucket - Fill drag behaviour across four segments")
SECTION("When reference is current layer, only transparent color is filled")
{
properties.bucketFillReferenceMode = 0;
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);

BitmapImage* image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);

Expand All @@ -108,7 +108,7 @@ TEST_CASE("BitmapBucket - Fill drag behaviour across four segments")
{
properties.bucketFillReferenceMode = 1;

dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);

BitmapImage* image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);

Expand All @@ -126,12 +126,12 @@ TEST_CASE("BitmapBucket - Fill drag behaviour across four segments")
SECTION("When reference is current layer, only pixels matching the fill color are filled"){
properties.bucketFillReferenceMode = 0;

dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);
BitmapImage* image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);
image->writeFile(resultsPath + "test2a-first.png");

fillColor = QColor(0,255,0,255);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);

image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);
image->writeFile(resultsPath + "test2a-second.png");
Expand All @@ -143,12 +143,12 @@ TEST_CASE("BitmapBucket - Fill drag behaviour across four segments")
{
properties.bucketFillReferenceMode = 1;

dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);
BitmapImage* image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);
image->writeFile(resultsPath + "test3a-first.png");

fillColor = QColor(0,255,0,255);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 5);
dragAndFill(pressPoint, editor, fillColor, beforeFill.bounds(), properties, 4);

image = static_cast<LayerBitmap*>(strokeLayer)->getLastBitmapImageAtFrame(1);
image->writeFile(resultsPath + "test3a-second.png");
Expand Down

0 comments on commit 1e8d0ca

Please sign in to comment.