10-26-2021, 11:59 AM
When I read the API document of gimp_layer_new(), I'm curious about what are explicit procedure calls in the below quote.
So I looked into gimp source code for this API usage example and find they don't set the mask mode or offset before adding this layer to the image using gimp_image_insert_layer().
I have the same confusion for gimp_layer_group_new() but I find the code file above calls gimp_layer_set_mode(), gimp_layer_set_opacity() and other APIs as required in the quote below.
So the questions are: what is the explicit meaning of the two quotes? which APIs should we call and how? Must we call these APIs?
Thank you very much!
Quote: Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.
So I looked into gimp source code for this API usage example and find they don't set the mask mode or offset before adding this layer to the image using gimp_image_insert_layer().
Code:
layer = gimp_layer_new (image, _("Background"),
img_a->columns, img_a->rows,
image_type,
100,
gimp_image_get_default_new_layer_mode (image));
gimp_image_insert_layer (image, layer, NULL, 0);
I have the same confusion for gimp_layer_group_new() but I find the code file above calls gimp_layer_set_mode(), gimp_layer_set_opacity() and other APIs as required in the quote below.
Quote:Attributes such as layer mode and opacity should be set with explicit procedure calls.
So the questions are: what is the explicit meaning of the two quotes? which APIs should we call and how? Must we call these APIs?
Thank you very much!