#17449 closed bug (fixed)
Regression: selection in Wonderbrush is not transparent anymore
Reported by: | pulkomandy | Owned by: | pulkomandy |
---|---|---|---|
Priority: | critical | Milestone: | R1/beta4 |
Component: | Kits/Interface Kit | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #4401 | |
Platform: | All |
Description
The selection rectangle in wonderbrush is now opaque white, making wonderbrush essentially unusable. This used to work fine in previous Haiku versions but I have not needed Wonderbrush in a while
Change History (13)
comment:1 by , 3 years ago
Milestone: | Unscheduled → R1/beta4 |
---|
comment:2 by , 3 years ago
Priority: | normal → critical |
---|
comment:3 by , 3 years ago
comment:4 by , 3 years ago
I've seen that for a very long time. In fact, I cannot remember the selected-object-rect not being white and I always thought that intentional though a poor choice...
comment:6 by , 3 years ago
Looks like a problem in the subpixel renderer or nearby. Change antialiasing to grayscale and you get just the border in selections and the navigation view.
Clipping doesn't seem to be involved: can be reproduced with just StrokeRect (or StrokeEllipse or...) called with a pattern that is not B_SOLID_HIGH nor B_SOLID_LOW. The end result seems to be the shape is filled with low color and then stroked with pattern.
comment:7 by , 3 years ago
There is a problem with StrokeRect when using a pattern. This change to disable the pattern results in Wonderbrush drawing just the outline (as expected):
diff --git a/WonderBrush/src/canvas_view_states/PickObjectsState.cpp b/WonderBrush/src/canvas_view_states/PickObjectsState.cpp index 968b958..62f1d14 100644 --- a/WonderBrush/src/canvas_view_states/PickObjectsState.cpp +++ b/WonderBrush/src/canvas_view_states/PickObjectsState.cpp @@ -111,10 +111,10 @@ PickObjectsState::Draw(BView* into, BRect updateRect) into->SetHighColor(kBlack); into->SetLowColor(kWhite); BRect box = fCanvasView->ConvertFromCanvas(fBoundingBox); - into->StrokeRect(box, kDotted); + into->StrokeRect(box/*, kDotted*/); if (box.Width() >= 2.0 && box.Height() >= 2.0) { box.InsetBy(1.0, 1.0); - into->StrokeRect(box, kDotted); + into->StrokeRect(box/*, kDotted*/); } } }
What's strange is, I tried to disable B_SUBPIXEL_PRECISE in WonderBrush and it does not make any difference. A completely different codepath is used in app_server.
So, this is a problem in code that's shared between the two cases.
Switching to B_OP_OVER or B_OP_ADD works (but looks a bit different), so it's a problem only with B_OP_COPY mode.
comment:9 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:10 by , 3 years ago
Replying to pulkomandy:
Proposed fix: https://review.haiku-os.org/c/haiku/+/4836
How it worked before?
comment:11 by , 3 years ago
As humdinger said, this was broken for a really long time and maybe it never worked.
comment:12 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Fix merged in hrev55749.
comment:13 by , 2 years ago
Blocking: | 4401 added |
---|
Drawing is done using ConstrainClippingRegion and FillRect. As far as I can see it should only draw a stripped border around the selection, but the inside ends up being filled in white.
Possibly hrev55510 ? Can't test because building haiku on haiku 32bit is not possible currently (gcc11/gcc8 mismatches)