[ CCode ( has_construct_function = false ) ]
[ Version ( since = "2.8" ) ]
public Layer.from_surface (Image image, string name, Surface surface, double progress_start, double progress_end)
Create a new layer from a [type@cairo.
Surface].
This procedure creates a new layer from the given [type@cairo.Surface]. The image has to be an RGB image and just like with Layer you will still need to add the layer to it.
If you pass progress_end > progress_start to this function,
progress_update will be called for. You have to call
progress_init beforehand then.
| image |
The RGB image to which to add the layer. |
| name |
The layer name. |
| surface |
A Cairo image surface. |
| progress_start |
start of progress |
| progress_end |
end of progress |
|
The newly created layer. The object belongs to libgimp and you should not free it. |