Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Inkscape
inkscape
Commits
cbeb0db7
Commit
cbeb0db7
authored
Apr 26, 2019
by
Nathan Lee
Browse files
Add out of bound checks to fill bucket
Fixes
inbox#398
Cherry-pick from
19225039
(1.0alpha)
parent
094d2341
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/tools/flood-tool.cpp
View file @
cbeb0db7
...
...
@@ -630,7 +630,7 @@ static ScanlineCheckResult perform_bitmap_scanline_check(std::deque<Geom::Point>
bool
can_paint_top
=
(
top_ty
>
0
);
bool
can_paint_bottom
=
(
bottom_ty
<
bci
.
height
);
Geom
::
Point
t
=
fill_queue
->
front
();
Geom
::
Point
front_of_queue
=
fill_queue
->
empty
()
?
Geom
::
Point
()
:
fill_queue
->
front
();
do
{
ok
=
false
;
...
...
@@ -648,8 +648,11 @@ static ScanlineCheckResult perform_bitmap_scanline_check(std::deque<Geom::Point>
paint_directions
=
paint_pixel
(
px
,
trace_px
,
orig_color
,
bci
,
current_trace_t
);
if
(
bci
.
radius
==
0
)
{
mark_pixel_checked
(
current_trace_t
);
if
((
t
[
Geom
::
X
]
==
bci
.
x
)
&&
(
t
[
Geom
::
Y
]
==
bci
.
y
))
{
fill_queue
->
pop_front
();
t
=
fill_queue
->
front
();
if
((
!
fill_queue
->
empty
())
&&
(
front_of_queue
[
Geom
::
X
]
==
bci
.
x
)
&&
(
front_of_queue
[
Geom
::
Y
]
==
bci
.
y
))
{
fill_queue
->
pop_front
();
front_of_queue
=
fill_queue
->
empty
()
?
Geom
::
Point
()
:
fill_queue
->
front
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment