90 const float image_offset[2],
91 const float image_resolution[2],
92 float r_uv_to_texture[4][4])
const override
98 float display_offset_x = scale_x * image_offset[0] / image_resolution[0];
99 float display_offset_y = scale_y * image_offset[1] / image_resolution[1];
101 float translate_x = scale_x * -region->v2d.cur.xmin + display_offset_x;
102 float translate_y = scale_y * -region->v2d.cur.ymin + display_offset_y;
104 r_uv_to_texture[0][0] = scale_x;
105 r_uv_to_texture[1][1] = scale_y;
106 r_uv_to_texture[3][0] = translate_x;
107 r_uv_to_texture[3][1] = translate_y;
void unit_m4(float m[4][4])
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
void ED_space_image_release_buffer(SpaceImage *sima, ImBuf *ibuf, void *lock)
int ED_space_image_get_display_channel_mask(ImBuf *ibuf)
ImBuf * ED_space_image_acquire_buffer(SpaceImage *sima, void **r_lock, int tile)
Image * ED_space_image(const SpaceImage *sima)
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer) override
void init_ss_to_texture_matrix(const ARegion *region, const float image_offset[2], const float image_resolution[2], float r_uv_to_texture[4][4]) const override
Initialize r_uv_to_texture matrix to transform from normalized screen space coordinates (0....
ImBuf * acquire_image_buffer(Image *, void **lock) override
ImageUser * get_image_user() override
bool use_tile_drawing() const override
Is (wrap) repeat option enabled in the space.
void release_buffer(Image *, ImBuf *image_buffer, void *lock) override
Image * get_image(Main *) override
SpaceImageAccessor(SpaceImage *sima)