Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions about how to use API gimp_layer_new()
#1
When I read the API document of gimp_layer_new(), I'm curious about what are explicit procedure calls in the below quote. 


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!
Reply


Messages In This Thread
Questions about how to use API gimp_layer_new() - by arya - 10-26-2021, 11:59 AM

Forum Jump: