Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
GIMP
Commits
9719dff9
Commit
9719dff9
authored
Jan 17, 2019
by
Ell
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: convert gimppickable-contiguous-region to C++
parent
0a952a34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
app/core/Makefile.am
app/core/Makefile.am
+1
-1
app/core/gimppickable-contiguous-region.cc
app/core/gimppickable-contiguous-region.cc
+9
-4
No files found.
app/core/Makefile.am
View file @
9719dff9
...
...
@@ -411,7 +411,7 @@ libappcore_a_sources = \
gimppickable.h
\
gimppickable-auto-shrink.c
\
gimppickable-auto-shrink.h
\
gimppickable-contiguous-region.c
\
gimppickable-contiguous-region.c
c
\
gimppickable-contiguous-region.h
\
gimpprogress.c
\
gimpprogress.h
\
...
...
app/core/gimppickable-contiguous-region.c
→
app/core/gimppickable-contiguous-region.c
c
View file @
9719dff9
...
...
@@ -26,6 +26,9 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
extern
"C"
{
#include "core-types.h"
#include "gegl/gimp-babl.h"
...
...
@@ -240,8 +243,8 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable,
while
(
gegl_buffer_iterator_next
(
iter
))
{
const
gfloat
*
src
=
iter
->
items
[
0
].
data
;
gfloat
*
dest
=
iter
->
items
[
1
].
data
;
const
gfloat
*
src
=
(
const
gfloat
*
)
iter
->
items
[
0
].
data
;
gfloat
*
dest
=
(
gfloat
*
)
iter
->
items
[
1
].
data
;
gint
count
=
iter
->
length
;
while
(
count
--
)
...
...
@@ -427,7 +430,7 @@ gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
NULL
);
while
(
!
g_queue_is_empty
(
queue
))
{
BorderPixel
*
c
=
g_queue_pop_head
(
queue
);
BorderPixel
*
c
=
(
BorderPixel
*
)
g_queue_pop_head
(
queue
);
if
(
mask
[
c
->
x
+
c
->
y
*
width
]
!=
1.0
)
{
...
...
@@ -766,7 +769,7 @@ find_contiguous_segment (const gfloat *col,
row
,
GEGL_AUTO_ROWSTRIDE
,
GEGL_ABYSS_NONE
);
s
=
row
+
initial_x
*
n_components
;
#else
s
=
g_alloca
(
n_components
*
sizeof
(
gfloat
));
s
=
(
gfloat
*
)
g_alloca
(
n_components
*
sizeof
(
gfloat
));
gegl_sampler_get
(
src_sampler
,
initial_x
,
initial_y
,
NULL
,
s
,
GEGL_ABYSS_NONE
);
...
...
@@ -971,3 +974,5 @@ line_art_queue_pixel (GQueue *queue,
g_queue_push_head
(
queue
,
p
);
}
}
/* extern "C" */
Ell
@ell
mentioned in commit
cfd1d046
·
Jan 17, 2019
mentioned in commit
cfd1d046
mentioned in commit cfd1d0463f43d940a7ac925c32608dcdbfb35d4d
Toggle commit list
Write
Preview
Markdown
is supported
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