Blender V5.3
blender::image_engine::AbstractSpaceAccessor Class Referenceabstract

#include <image_space.hh>

Inherited by blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

Public Member Functions

virtual ~AbstractSpaceAccessor ()=default
virtual blender::Image * get_image (Main *bmain)=0
virtual blender::ImageUser * get_image_user ()=0
virtual ImBuf * acquire_image_buffer (blender::Image *image, void **lock)=0
virtual void release_buffer (blender::Image *image, ImBuf *image_buffer, void *lock)=0
virtual void get_shader_parameters (ShaderParameters &r_shader_parameters, ImBuf *image_buffer)=0
virtual bool use_tile_drawing () const =0
 Is (wrap) repeat option enabled in the space.
virtual bool use_display_window () const =0
 Draw image with display window offsets.
virtual float get_zoom () const =0
 Gets the zoom factor of the space. A factor of 2 is a zoom-in by two times.
virtual float get_aspect_ratio () const =0
 Gets the aspect ratio of the image. The ratio is for the vertical axis.
virtual float2 get_pan_offset () const =0
 Gets the pan offset of the space in image pixel space.

Detailed Description

Space accessor.

Image engine is used to draw the images inside multiple spaces

See also
SpaceLink. The AbstractSpaceAccessor is an interface to communicate with a space.

Definition at line 31 of file image_space.hh.

Constructor & Destructor Documentation

◆ ~AbstractSpaceAccessor()

virtual blender::image_engine::AbstractSpaceAccessor::~AbstractSpaceAccessor ( )
virtualdefault

Member Function Documentation

◆ acquire_image_buffer()

virtual ImBuf * blender::image_engine::AbstractSpaceAccessor::acquire_image_buffer ( blender::Image * image,
void ** lock )
pure virtual

Acquire the image buffer of the image.

Parameters
imageImage to get the buffer from. Image is the same as returned from the get_image member.
lockpointer to a lock object.
Returns
Image buffer of the given image.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

References lock.

◆ get_aspect_ratio()

virtual float blender::image_engine::AbstractSpaceAccessor::get_aspect_ratio ( ) const
pure virtual

Gets the aspect ratio of the image. The ratio is for the vertical axis.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_image()

virtual blender::Image * blender::image_engine::AbstractSpaceAccessor::get_image ( Main * bmain)
pure virtual

Return the active image of the space.

The returned image will be drawn in the space.

The return value is optional.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_image_user()

virtual blender::ImageUser * blender::image_engine::AbstractSpaceAccessor::get_image_user ( )
pure virtual

Return the ImageUser of the space.

The return value is optional.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_pan_offset()

virtual float2 blender::image_engine::AbstractSpaceAccessor::get_pan_offset ( ) const
pure virtual

Gets the pan offset of the space in image pixel space.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ get_shader_parameters()

virtual void blender::image_engine::AbstractSpaceAccessor::get_shader_parameters ( ShaderParameters & r_shader_parameters,
ImBuf * image_buffer )
pure virtual

Update the r_shader_parameters with space specific settings.

Only update the #ShaderParameters.flags and #ShaderParameters.shuffle. Other parameters are updated inside the image engine.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

Referenced by blender::image_engine::ShaderParameters::update().

◆ get_zoom()

virtual float blender::image_engine::AbstractSpaceAccessor::get_zoom ( ) const
pure virtual

Gets the zoom factor of the space. A factor of 2 is a zoom-in by two times.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ release_buffer()

virtual void blender::image_engine::AbstractSpaceAccessor::release_buffer ( blender::Image * image,
ImBuf * image_buffer,
void * lock )
pure virtual

Release a previous locked image from acquire_image_buffer.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

References lock.

◆ use_display_window()

virtual bool blender::image_engine::AbstractSpaceAccessor::use_display_window ( ) const
pure virtual

Draw image with display window offsets.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.

◆ use_tile_drawing()

virtual bool blender::image_engine::AbstractSpaceAccessor::use_tile_drawing ( ) const
pure virtual

Is (wrap) repeat option enabled in the space.

Implemented in blender::image_engine::SpaceImageAccessor, and blender::image_engine::SpaceNodeAccessor.


The documentation for this class was generated from the following file: