这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@J5lx
Copy link
Member

@J5lx J5lx commented Oct 14, 2022

This PR fixes the three issues Jose reported recently:

@J5lx J5lx added Bug UX Related to the way users interact with the program Select Tool Camera Canvas Crash File Import labels Oct 14, 2022
@J5lx
Copy link
Member Author

J5lx commented Oct 14, 2022

Still had to fix a test case that actually relied on BitmapImage using different image formats in different situations… But now the PR is ready for review.

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks mostly good to me although as mentioned, i'd prefer if we could keep such format conversions to be inside bitmapimage and not littered around the codebase.

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce work, merging!

@MrStevns MrStevns merged commit 8b85162 into pencil2d:master Oct 14, 2022
@J5lx J5lx deleted the fixes/misc branch October 14, 2022 17:47
MrStevns added a commit to MrStevns/pencil that referenced this pull request Nov 1, 2022
The real problem causing this has been fixed via pencil2d#1729
J5lx added a commit that referenced this pull request Jan 8, 2023
…as expected (#1667)

* Fix a few cases where fill drag behaviour didn't work as expected

- Filling on layer below when reference layer was all layers, would not allow stroke filling
- Filling with overlay would result in multiple undo operations for one paint operation...
- Click fill with tablet would result in two fill events.

* Fix variable case

* Use pixelformat to check if color is premultiplied when blending occurs

- Use compareColor instead of raw pixel comparison for the ability to fill when the pixel is in average the same.

* Fix linux compilation error

* Fix compiler error caused by inline function definition

* Cleanup

* Fix now unnecessary check for premult

The real problem causing this has been fixed via #1729

* Fix filling was not allowed when fillTo mode was "layer below"

Layer setup:
Bitmap Layer Stroke
Bitmap Layer Fill

1. draw a circle on the stroke layer and slice it up with lines, so you can fill individual parts
2. set fillTo mode to "layer below" and reference to "all layers"
3. fill and drag a color, eg. red.. across the slices
4. Change fillTo mode to "current layer"
5. repeat step 3 with a different color

* Rewrite test cases

* Simplify allowFill function

* Rework drag to fill behavior again

* Fix / simplify allowFill()

* Reference mode should enforce fillTo mode when currentLayer is set.

- Also fixed a few confusing variables

* Fix build error

Co-authored-by: scribblemaniac <scribblemaniac@users.noreply.github.com>
Co-authored-by: Jakob Gahde <j5lx@fmail.co.uk>
@MrStevns MrStevns added this to the v0.6.7 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Camera Canvas Crash File Import Select Tool UX Related to the way users interact with the program

Projects

Status: No status

2 participants