|
virtual void | destroy_all () |
|
unsigned int | get_width () const |
| Returns the width of the layer.
|
|
unsigned int | get_height () const |
| Returns the height of the layer.
|
|
ModuleImage * | get_parent_image () const |
| Returns the ModuleImage containing the layer.
|
|
const double & | get_opacity () const |
| Returns the opacity of the layer.
|
|
const int & | get_blending_mode () const |
| Returns the blending mode of the layer.
|
|
bool | is_active () const |
| Returns whether the current layer is active or not. Inactive layers are not composited in the final image.
|
|
virtual ImageHandle | get_image (const ModuleImageQuality::Level &quality, const GMathVec4f *region=0) const |
| Returns a handle to the image for the specified quality. If the image is not already available, a render is started. The function returns only when the render is finished.
|
|
virtual bool | is_image_dirty (const ModuleImageQuality::Level &quality, const bool &strict=false) const |
| Checks if the specified quality has already been computed.
|
|
const ImageCanvas * | peek_source_image (const ModuleImageQuality::Level &quality) const |
| Just returns a handle to the current image; does not launch evaluation.
|
|
bool | add_image_level_update_callback (void *data, ModuleImageLevelUpdateCallback on_image_level_update) |
| This function registers a new "image level update" callback item. The callback function is called every time a new render is finished (for each quality).
|
|
void | remove_image_level_update_callback (void *data) |
| Removes an image level updated receiver.
|
|
unsigned int | get_image_level_update_receivers_count () const |
| Removes an image level updated receiver.
|
|
void | start_progress (const ModuleImageQuality::Level &quality) |
| Starts the mechanism allowing the display of a progress image.
|
|
void | stop_progress (ImageHandle *image) |
| Stops the mechanism allowing the display of a progress image.
|
|
void | update_region (const GMathVec4i ®ion, bool set_progress=true, float progress=-1.0f) const |
| This function indicates that a new region of the image has been computed.
|
|
void | bucket_render_start (const GMathVec4i ®ion, unsigned int thread_id) |
|
|
|
void | bucket_render_end (const GMathVec4i ®ion, unsigned int thread_id) |
|
|
|
virtual void | dirty_layer (const bool &dirty_source) |
| Invalidate images, set dirtiness flags for all qualities.
|
|
virtual void | mark_as_dirty () |
| Set the dirtiness flags of all the ImageCanvas stored in the layer.
|
|
void | dirty_layer_border (GMathVec4f ®ion) |
| Dirty all the tiles of the ImageCanvas that intersect the region.
|
|
void | on_update_visible (const GMathBbox2f &old_region, const GMathBbox2f &new_region) |
| Updates the image channels after the visible part of the region has been modified.
|
|
const bool & | is_evaluating () const |
| Returns true if a render is in progress.
|
|
ModuleImageQuality::Level | get_nearest_quality (const unsigned int &w, const unsigned int h) const |
| Returns the first quality for which the size of the image is greater than the parameters given.
If none is found, QUALITY_FULL is returned.
|
|
void | image_level_update (const ModuleImageQuality::Level &quality) const |
| Call the image level update callbacks for all registered requesters.
|
|
const int & | get_render_region_mode () const |
| Returns how render region is used: is it inherited from the parent image, or defined in the layer itself ?
|
|
const GMathVec4f & | get_render_region_bbox () const |
| Returns the values of the render region box.
|
|
GMathVec4i | get_overscan (const ModuleImageQuality::Level &quality) const |
| Returns the overscan, in pixel for the current render.
|
|
GMathVec4f | get_overscan () const |
| Returns the overscan values (ratio).
|
|
GMathVec4i | get_data_window (const ModuleImageQuality::Level &quality) const |
| Returns the data region [ x0, y0, w, h].
|
|
bool | update_overscan () |
| Updates the overscan variables from the object attribute values.
|
|
ImageHandle * | get_pyramid_source_image (const ModuleImageQuality::Level &quality) const |
| Returns the ImageCanvas stored in the source pyramid for the specified quality.
|
|
void | resize_image (const ImageCanvas &source, ImageCanvas &dest, const ModuleImageQuality::Level &quality, const int &width, const int &height, const GMathVec4f *render_region) const |
| Resize an image.
|
|
char * | get_progress_buffer () const |
| Returns the pointer to the buffer that will be used to retrive recently computed pixels.
|
|
void | init_progress_buffer (const int &quality) |
|
void | update_progress (ModuleImage &image, const EventInfo &event, void *data) |
|
ImageHandle * | get_highest_quality_image () const |
| Returns the pointer to the best image quality that has been computed. Used to initialize the progress image.
|
|
virtual size_t | get_memory_size () const override |
| Returns the memory used by the current instance.
|
|
void | set_finalize_image (bool _finalize_image=true) |
|
bool | get_finalize_image () const |
|
ModuleImageFilter * | add_filter (const CoreString &class_name, const CoreString &filter_name) |
| Adds a new filter.
|
|
bool | has_active_filters () const |
|
int | get_progress_pixel_count () const |
| For internal use.
|
|
int | get_progress_pixel_count_max () const |
| For internal use.
|
|
float | get_progress_pixel_percent () const |
| For internal use.
|
|
void | set_progress_pixel_count (int count) |
| For internal use.
|
|
|
typedef void(* | EventInfoFunction )(EventObject &, const EventInfo &, void *) |
| event callback signature for free functions / static methods.
|
|
typedef void(EventObject::* | EventInfoMethod )(EventObject &, const EventInfo &, void *) |
| event callback signature for methods.
|
|
typedef void(* | EventFunction )(EventObject &, const CoreString &, void *) |
|
typedef void(EventObject::* | EventMethod )(EventObject &, const CoreString &, void *) |
|
static ResourceID | declare_resource (const char *tag) |
|
static ResourceID | declare_resource (const CoreString &tag) |
|
static bool | declare_resource (ResourceID id, const char *tag) |
|
static bool | declare_resource (ResourceID id, const CoreString &tag) |
|
static ResourceID | get_resource_id (const char *tag) |
|
static ResourceID | get_resource_id (const CoreString &tag) |
|
static const char * | get_resource_tag (ResourceID id) |
|
static void | clear_unused_resources (SysThreadManager &thread_manager, const CoreBasicArray< OfObject * > &objects) |
|
static constexpr unsigned int | null_variation = 0 |
| Key of the null resource variation.
|
|
This class implements a Layer object in Clarisse.
The Layer objects contains two arrays (internally called pyramids) that store the renders of various qualities that have been computed. One array stores the raw image (the source pyramid), the other one the result after filters have been applied.
Dirtiness information is associated with each of theses renders.
The canvas of these images matches the parent image's, or the render region if one is set.