Michael Natterer
9774bb62e7
app: use hard-edges = TRUE when GEGL-scaling drawables
2012-05-02 17:46:07 +02:00
Michael Natterer
d5795c0081
app: use a GeglBuffer instead of TileManager as storage in drawables \o/
2012-05-02 17:46:06 +02:00
Michael Natterer
765c2cfea2
app: replace GimpDraable's type by a Babl format
...
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
Michael Natterer
525a405270
app: port the entire transform API from TileManager to GeglBuffer
2012-05-02 17:46:06 +02:00
Michael Natterer
b89a912cc7
app: use gimp_drawable_set_buffer() in a few places
2012-05-02 17:46:05 +02:00
Øyvind Kolås
f8b1372038
app: make use of GIMP_GEGL_RECT in more places
2012-05-02 17:46:05 +02:00
Michael Natterer
6274b269ca
app: add gimp_drawable_set_buffer() and set_buffer_full()
2012-05-02 17:46:05 +02:00
Øyvind Kolås
fe3220ae6f
app: remove write property of GeglBuffer backend
2012-05-02 17:46:05 +02:00
Michael Natterer
0bcae125b5
app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
...
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer
69c52173fb
app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
...
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
Michael Natterer
58dfa962a1
app: port simple rotating and flipping to GEGL
...
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
Michael Natterer
62a23f8a89
app: port drawable'e and projection's get_pixel_at() to gegl_buffer_sample()
2012-05-02 17:46:02 +02:00
Michael Natterer
906176831d
app: add image API to get Babl formats based on GimpImageType
...
because we often have only a type and an image, but no drawable
(yet) to ask for its types.
2012-05-02 17:46:00 +02:00
Michael Natterer
b05e213d6d
app: stop using gegl_color_set_pixel() with hand-transformed pixels
...
instead, simply use rgb values and rely on the subsequent
gegl_buffer_set_color() to do the right thing because the buffer know
their indexed format now.
2012-05-02 17:45:59 +02:00
Michael Natterer
75467664be
app: enable GEGL scaling of indexed drawables in gimp_drawable_scale()
...
by simply using gimp_drawable_apply_operation_to_buffer() and the
right Babl format on the buffer.
2012-05-02 17:45:58 +02:00
Michael Natterer
9ecdea30b8
app: add gimp_drawable_get_format_without_alpha()
2012-05-02 17:45:58 +02:00
Michael Natterer
9a09d3a762
app: drop "babl" from gimp_foo_get_babl_format[_with_alpha]()
2012-05-02 17:45:58 +02:00
Michael Natterer
e9ecc40f02
app: add GimpPickable::get_babl_format_with_alpha()
2012-05-02 17:45:58 +02:00
Michael Natterer
3ce071b89a
app: let Babl handle converting layers to indexed
...
Except of course the initial indexed conversion which needs more logic
than a simple color mapping.
2012-05-02 17:45:57 +02:00
Michael Natterer
e309e009f7
app: let Babl handle color conversion in gimp_drawable_fill()
2012-05-02 17:45:57 +02:00
Michael Natterer
d146cc40ea
app: require a Babl for all buffers created on top of tiles
...
Fixes quite some introduced glitches with indexed mode because
the buffers use the right pixel format now.
2012-05-02 17:45:56 +02:00
Michael Natterer
e03dcc074b
app: use the new Babl palette format to implement indexed images
...
- keep babl palette formats around in the image in indexed mode
- create drawables with the right format
- as first test, convert indexed drawabled to rgb/gray by simply
calling gegl_buffer_convert()
2012-05-02 17:45:56 +02:00
Michael Natterer
f05de34cd6
app: add GimpPickable::get_babl_format()
2012-05-02 17:45:55 +02:00
Michael Natterer
acad9ac510
app: flush both write and write buffer in gimp_drawable_update()
...
so tiles and buffers are up-to-date before anyone has a chance to
access the modified pixels.
2012-05-02 17:45:55 +02:00
Michael Natterer
105aff0296
app: flush the drawable_s write_buffer in gimp_drawable_update()
...
because it's called after each drawable modification and therefore a
good place to sync buffrs and tiles.
2012-05-02 17:45:55 +02:00
Michael Natterer
169221bc51
app: replace some color_region() and pattern_region() by GEGL code
2012-05-02 17:45:52 +02:00
Michael Natterer
54108d9413
app: add gimp_drawable_get_babl_format()
2012-05-02 17:45:51 +02:00
Michael Natterer
d127e3ad35
app: use gegl_buffer_copy() in gimp_drawable_resize()
2012-05-02 17:45:51 +02:00
Øyvind Kolås
8f3f600eb3
app: remove unused #includes
2012-05-02 17:45:51 +02:00
Øyvind Kolås
1ee041600f
app: replace direct low-level GeglBuffer calls with utility.
...
gimp_drawable_real_update exists, so use it
2012-05-02 17:45:50 +02:00
Michael Natterer
77bbbab5c6
app: make sure TileManagers and the GeglBuffers backed by them are in sync
...
by adding gegl_buffer_flush() and gegl_tile_source_reinit() in the
drawable's buffer and tiles API, and at some half-ported places that
mix legacy and gegl code.
2012-05-02 17:45:50 +02:00
Michael Natterer
7c3a796dfc
app: added GimpPickable::get_buffer()
...
Add cached buffers to GimpProjection and GimpImageMap, and use
the new API where possible.
2012-05-02 17:45:50 +02:00
Michael Natterer
8ba8710982
app: use gegl_buffer_copy() in gimp_drawable_real_push_undo()
2012-05-02 17:45:49 +02:00
Michael Natterer
3814c9f0a6
app: add gimp_drawable_apply_operation_to_buffer() and use it in ony place
2012-05-02 17:45:48 +02:00
Michael Natterer
4d18bda0c7
app: cache readable and writable buffers in the drawable
...
As API, replace gimp_drawable_create_buffer() by
gimp_drawable_get_read_buffer() and gimp_drawable_get_write_buffer().
2012-05-02 17:45:48 +02:00
Michael Natterer
b95fc4f8d5
app: rename gimp_drawable_get_buffer() and gimp_tile_manager_get_gegl_buffer()
...
to foo_create_buffer() because they return new objects.
2012-05-02 17:45:47 +02:00
Michael Natterer
0d236ee351
app: replace some copy_region() by gegl_buffer_copy()
2012-05-02 17:45:47 +02:00
Michael Natterer
9720eb6c78
app: cleanup in the new GimpDrawable tile source code
2012-05-02 17:45:46 +02:00
Øyvind Kolås
8c14f55e98
app: make gimp_drawable_get_source_node use GeglBuffer
...
Relies on fresh GEGL (db43a7d8a42f0ae) to compile.
2012-05-02 17:45:45 +02:00
Michael Natterer
3bd8ee1a63
app: move new get_buffer() functions around; some general cleanup
2012-05-02 17:45:44 +02:00
Michael Natterer
944f6a529d
Bug 656512 - Moving a floating selection - objects disappear
...
Fix typo in gimp_drawable_fs_update(): use the drawable's x and y
offsets to calculate the intersection with the fs' update area, and
not the y offset for both axes.
2011-09-23 22:34:25 +02:00
Michael Natterer
e8f64664c9
app: properly detach floating selection in dispose()
...
We crash when closing an image that has a floating selection and the
GEGL projection is being used. Detach the floating selection when
either the FS or the drawable it's attached to are disposed. This fix
only makes it crash later, but makes sense as separate commit.
2011-09-23 19:55:24 +02:00
Michael Natterer
5c8ded8960
app: let the drawable keep around a pointer to its floating selection
...
Instead of getting the floating selection from the image. Change
gimp_drawable_has_floating_sel() to get_floating_sel() and remove the
"floating_sel" parameter from gimp_drawable_deatch_floating_sel().
This cleanup is one more step towards sanitizing floating selections,
and makes the crash fix in the next commit much much simpler.
2011-09-23 19:31:50 +02:00
Martin Nordholts
9f1187f6a5
app: Prefix TileManager functions
...
read_pixel_data() -> tile_manager_read_pixel_data()
write_pixel_data() -> tile_manager_write_pixel_data()
read_pixel_data_1() -> tile_manager_read_pixel_data_1()
write_pixel_data_1() -> tile_manager_write_pixel_data_1()
for consistency.
2011-09-07 12:08:43 +02:00
Michael Natterer
c35ff719a7
app/libgimp*: remove stuff found by -Wunused-but-set-variable
2011-05-01 23:23:19 +02:00
Michael Natterer
cc47b2a600
libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
...
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Mikael Magnusson
71541db52d
app: Make scale timer output depend on GIMP_UNSTABLE
2011-04-08 14:04:36 +02:00
Michael Natterer
047d31fa68
app: gimp_drawable_transform: place new the tiles at offset_x, offset_y
...
and not at offset_y, offset_y (typo).
2011-03-26 16:50:38 +01:00
Michael Natterer
bc8d5f84d6
app: remove the "offset" API from TileManager
...
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Michael Natterer
c07811f0a3
app: remove unused variables in gimp_drawable_duplicate()
2011-03-16 02:06:21 +01:00