Michael Natterer
909c4b4084
app: add a GimpCpmponentType parameter to GimpDrawable::estimate_memsize()
...
so we can also estimate converting the drawable to other precisions.
2014-06-14 23:12:22 +02:00
Michael Natterer
ee3846cc8b
app: make the gimp_drawable_fill*() API symmetric to gimp_edit_fill*()
2014-06-03 14:11:59 +02:00
Michael Natterer
8e0563954d
app: add gimp_drawable_get_component_format() and _component_index()
2014-06-02 02:31:42 +02:00
Michael Natterer
caf73f5f35
Add support for both gamma-corrected and linear for all bit depths
...
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
GimpPrecision enum values is loaded correctly
This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer
9c93df2d4b
app: add gimp_drawable_get_linear() which currently always returns FALSE
...
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer
39ab59e032
app: add gimp_drawable_get_floating_sel_filter()
2013-04-12 16:57:39 +02:00
Michael Natterer
4ca746eab7
app: move the "is-last-node" property and API from drawable to filter
2013-04-11 12:25:11 +02:00
Michael Natterer
c914aa805d
Bug 675747 - Layers with some modes get hidden in layer groups
...
Add a boolean "is-last-node" property to GimpDrawable and set it from
GimpDrawableStack, which is the place that easily has the information.
In GimpLayer, connect to "notify" and make sure we use NORMAL mode
unless the layer is in NORMAL or DISSOLVE mode.
2012-11-12 10:55:41 +01:00
Michael Natterer
60305c11d5
app: add "const Babl *new_format" to GimpDrawable::convert_type()
...
but only to the virtual function, not the public API. Implement it in
GimpSelection and GimpLayerMask, and pass the correct mask format down
to the parent class which does the actual conversion.
2012-10-13 22:56:32 +02:00
Michael Natterer
5dbcdef477
app: implement optional dithering when converting to lower bit depth
...
Add "layer_dither_type" and "mask_dither_type" to
GimpDrawable::convert_type(), pass around the dither type from the
dialog, and implement dithering using gegl:color-reduction.
2012-10-13 21:46:56 +02:00
Michael Natterer
aee7ddd56d
app: remove the !use_gegl case from gimp_drawable_apply_buffer()
...
and its last three parameters because they were only used for legacy
floating selection projection.
2012-05-19 00:14:51 +02:00
Michael Natterer
d294cfb8b2
app: remove the legacy projection construction code
2012-05-19 00:06:03 +02:00
Michael Natterer
010418d874
app: remove gimp_drawable_get_tiles()
2012-05-06 04:39:23 +02:00
Michael Natterer
d81ea1315e
app: implement active, affected components in GEGL
...
Add GimpOperationMaskComponents, enum GimpComponentMask, and image and
drawable infrastructure to get the right mask, and plug the mask
operation into gimp_gegl_create_apply_buffer_node().
2012-05-02 17:51:17 +02:00
Michael Natterer
f164069c9c
app: remove gimp_drawable_bytes() and ask its format instead
2012-05-02 17:51:16 +02:00
Michael Natterer
e15702cbe5
app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
...
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer
96ebc6f848
app: add "new_precision" argument to gimp_drawable_convert_type()
...
for clarity and consistency with the "new_base_type" argument.
2012-05-02 17:51:15 +02:00
Michael Natterer
a016b8102b
app: change the maskPR in gimp_drawable_replace_buffer() to GeglBuffer
2012-05-02 17:51:12 +02:00
Michael Natterer
c07325a005
app: add "precision" argument to gimp_image_new()
2012-05-02 17:51:09 +02:00
Michael Natterer
ec2d5647c0
app: remove gimp_drawable_type_with_alpha()
2012-05-02 17:50:57 +02:00
Michael Natterer
2b18645fb5
app: use gimp_drawable_get_base_type() instead of GIMP_IMAGE_TYPE_BASE_TYPE()
2012-05-02 17:50:57 +02:00
Michael Natterer
f6f7d53020
app: add gimp_drawable_get_base_type()
2012-05-02 17:50:57 +02:00
Michael Natterer
afe8eaf256
app: remove GimpImageType based API and macro junk
2012-05-02 17:50:57 +02:00
Michael Natterer
7223af17a2
app: completely port GimpDrawable::apply_region()'s API to GeglBuffer
...
and pass lots of coords that were hidden inside PixelRegions
explicitly.
2012-05-02 17:46:12 +02:00
Michael Natterer
061e044e0a
app: change GimpDrawable::replace_region() by ::replace_buffer()
2012-05-02 17:46:12 +02:00
Michael Natterer
4bcddb04a2
app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer
2012-05-02 17:46:11 +02:00
Michael Natterer
579d894778
app: turn GimpDrawable::apply_region() into ::apply_buffer()
...
and GimpDrawableUndo.src2_tiles into applied_buffer.
2012-05-02 17:46:11 +02:00
Michael Natterer
dbc881376e
app: add gimp_drawable_apply_buffer() and port edit, bucket fill, stroke
2012-05-02 17:46:10 +02:00
Michael Natterer
904a35d722
app: remove width, height from GimpDrawableUndo and GimpDrawable::swap_tiles()
...
because we always store/swap a buffer of the actual size now.
2012-05-02 17:46:09 +02:00
Michael Natterer
a0c1007b66
app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()
...
which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
2012-05-02 17:46:08 +02:00
Michael Natterer
a982a5ea3a
app: change GimpDrawable::get_tiles() to ::get_buffer()
...
and shuffle code around because the other API is now virtual.
2012-05-02 17:46:07 +02:00
Michael Natterer
f8f4455459
app: change GimpDrawable::set_tiles() to ::set_buffer()
...
and remove the "type" argument, GeglBuffers have a format.
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
6274b269ca
app: add gimp_drawable_set_buffer() and set_buffer_full()
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
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
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
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
54108d9413
app: add gimp_drawable_get_babl_format()
2012-05-02 17:45:51 +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
3bd8ee1a63
app: move new get_buffer() functions around; some general cleanup
2012-05-02 17:45:44 +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
Michael Natterer
9f30550f9a
app: move drawable->type to private
2011-03-16 02:02:47 +01:00
Michael Natterer
a62071e9eb
app: remove mamber GimpDrawable::bytes
...
because it's always the same as GIMP_IMAGE_TYPE_BYTES(drawable->type)
2011-03-16 00:16:31 +01:00
Michael Natterer
eacd80446d
app: finally get rid of gimp_item_configure() and drawable_configure()
...
and turn them into gimp_item_new() and gimp_drawable_new()
2011-02-01 12:47:24 +01:00
Michael Natterer
5c8ec234cc
app: add "image" as construct property to GimpItem
...
- The image *must* now be passed to g_object_new() when creating items
- Remove the "image" parameter from all item configure() functions
- Set the item's ID in gimp_item_set_image() if it has none yet
2011-02-01 10:28:10 +01:00