Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
841144ef
Commit
841144ef
authored
Jul 09, 2005
by
Sven Neumann
Committed by
Sven Neumann
Jul 09, 2005
Browse files
formatting.
2005-07-09 Sven Neumann <sven@gimp.org> * app/base/pixel-surround.[ch]: formatting.
parent
4b29677d
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
841144ef
2005-07-09 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.[ch]: formatting.
* app/core/gimpchannel.c (gimp_channel_real_feather):
gaussian_blur_region() writes to the pixel data, need to initialize
the pixel region with dirty == TRUE;
...
...
app/base/pixel-surround.c
View file @
841144ef
...
...
@@ -33,14 +33,12 @@ pixel_surround_init (PixelSurround *ps,
TileManager
*
tm
,
gint
w
,
gint
h
,
guchar
bg
[
MAX_CHANNELS
])
const
guchar
bg
[
MAX_CHANNELS
])
{
gint
i
;
for
(
i
=
0
;
i
<
MAX_CHANNELS
;
++
i
)
{
ps
->
bg
[
i
]
=
bg
[
i
];
}
ps
->
bg
[
i
]
=
bg
[
i
];
ps
->
tile
=
NULL
;
ps
->
mgr
=
tm
;
...
...
@@ -69,10 +67,11 @@ pixel_surround_lock (PixelSurround *ps,
/* do we have the whole region? */
if
(
ps
->
tile
&&
(
i
<
(
tile_ewidth
(
ps
->
tile
)
-
ps
->
w
))
&&
(
j
<
(
tile_eheight
(
ps
->
tile
)
-
ps
->
h
)))
(
i
<
(
tile_ewidth
(
ps
->
tile
)
-
ps
->
w
))
&&
(
j
<
(
tile_eheight
(
ps
->
tile
)
-
ps
->
h
)))
{
ps
->
row_stride
=
tile_ewidth
(
ps
->
tile
)
*
ps
->
bpp
;
/* is this really the correct way? */
return
tile_data_pointer
(
ps
->
tile
,
i
,
j
);
}
...
...
@@ -87,9 +86,9 @@ pixel_surround_lock (PixelSurround *ps,
/* copy pixels, one by one */
/* no, this is not the best way, but it's much better than before */
ptr
=
ps
->
buff
;
for
(
j
=
y
;
j
<
y
+
ps
->
h
;
++
j
)
for
(
j
=
y
;
j
<
y
+
ps
->
h
;
++
j
)
{
for
(
i
=
x
;
i
<
x
+
ps
->
w
;
++
i
)
for
(
i
=
x
;
i
<
x
+
ps
->
w
;
++
i
)
{
Tile
*
tile
=
tile_manager_get_tile
(
ps
->
mgr
,
i
,
j
,
TRUE
,
FALSE
);
...
...
@@ -100,17 +99,14 @@ pixel_surround_lock (PixelSurround *ps,
j
%
TILE_HEIGHT
);
for
(
k
=
buff
;
k
<
buff
+
ps
->
bpp
;
++
k
,
++
ptr
)
{
*
ptr
=
*
k
;
}
*
ptr
=
*
k
;
tile_release
(
tile
,
FALSE
);
}
else
{
for
(
k
=
ps
->
bg
;
k
<
ps
->
bg
+
ps
->
bpp
;
++
k
,
++
ptr
)
{
*
ptr
=
*
k
;
}
for
(
k
=
ps
->
bg
;
k
<
ps
->
bg
+
ps
->
bpp
;
++
k
,
++
ptr
)
*
ptr
=
*
k
;
}
}
}
...
...
app/base/pixel-surround.h
View file @
841144ef
...
...
@@ -39,18 +39,18 @@ typedef struct _PixelSurround
void
pixel_surround_init
(
PixelSurround
*
ps
,
TileManager
*
tm
,
gint
w
,
gint
h
,
guchar
bg
[
MAX_CHANNELS
]);
TileManager
*
tm
,
gint
w
,
gint
h
,
const
guchar
bg
[
MAX_CHANNELS
]);
/* return a pointer to a buffer which contains all the surrounding pixels
* strategy: if we are in the middle of a tile, use the tile storage
* otherwise just copy into our own malloced buffer and return that
*/
guchar
*
pixel_surround_lock
(
PixelSurround
*
ps
,
gint
x
,
gint
y
);
gint
x
,
gint
y
);
gint
pixel_surround_rowstride
(
PixelSurround
*
ps
);
...
...
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