|
Blender V4.3
|
#include <algorithm>#include "MEM_guardedalloc.h"#include "BLI_math_vector_types.hh"#include "BLI_rect.h"#include "BKE_colortools.hh"#include "BKE_context.hh"#include "BKE_image.hh"#include "ED_image.hh"#include "ED_screen.hh"#include "ED_space_api.hh"#include "GPU_immediate.hh"#include "GPU_state.hh"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "SEQ_render.hh"#include "SEQ_sequencer.hh"#include "UI_view2d.hh"#include "WM_api.hh"#include "WM_types.hh"#include "sequencer_intern.hh"#include "ED_util_imbuf.hh"Go to the source code of this file.
Classes | |
| struct | ImageSampleInfo |
Functions | |
Image Pixel Sample | |
| static void | image_sample_pixel_color_ubyte (const ImBuf *ibuf, const int coord[2], uchar r_col[4], float r_col_linear[4]) |
| static void | image_sample_pixel_color_float (ImBuf *ibuf, const int coord[2], float r_col[4]) |
Image Pixel Region Sample | |
| static void | image_sample_rect_color_ubyte (const ImBuf *ibuf, const rcti *rect, uchar r_col[4], float r_col_linear[4]) |
| static void | image_sample_rect_color_float (ImBuf *ibuf, const rcti *rect, float r_col[4]) |
Image Pixel Sample (Internal Utilities) | |
| static void | image_sample_apply (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | sequencer_sample_apply (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | ed_imbuf_sample_apply (bContext *C, wmOperator *op, const wmEvent *event) |
Image Pixel Sample (Public Operator Callback) | |
Callbacks for the sample operator, used by sequencer and image spaces. | |
| void | ED_imbuf_sample_draw (const bContext *C, ARegion *region, void *arg_info) |
| void | ED_imbuf_sample_exit (bContext *C, wmOperator *op) |
| int | ED_imbuf_sample_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| int | ED_imbuf_sample_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| void | ED_imbuf_sample_cancel (bContext *C, wmOperator *op) |
| bool | ED_imbuf_sample_poll (bContext *C) |
|
static |
Definition at line 356 of file ed_util_imbuf.cc.
References CTX_wm_area(), image_sample_apply(), sequencer_sample_apply(), SPACE_IMAGE, and SPACE_SEQ.
Referenced by ED_imbuf_sample_invoke(), and ED_imbuf_sample_modal().
| void ED_imbuf_sample_cancel | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 506 of file ed_util_imbuf.cc.
References ED_imbuf_sample_exit().
Referenced by IMAGE_OT_curves_point_set(), IMAGE_OT_sample(), and SEQUENCER_OT_sample().
Definition at line 383 of file ed_util_imbuf.cc.
References BLI_rctf_init_pt_radius(), ImageSampleInfo::channels, ImageSampleInfo::colfp, ImageSampleInfo::color_manage, ImageSampleInfo::colp, CTX_data_scene(), CTX_wm_area(), CTX_wm_space_image(), CTX_wm_window(), ImageSampleInfo::draw, ED_image_draw_info(), wmWindow::eventstate, float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_logic_op_xor_set(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor3fv(), immVertexFormat(), ImageSampleInfo::linearcol, pos, ImageSampleInfo::sample_size, SPACE_IMAGE, ImageSampleInfo::use_default_view, ImageSampleInfo::x, rctf::xmax, rctf::xmin, ImageSampleInfo::y, rctf::ymax, rctf::ymin, and SpaceImage::zoom.
Referenced by ED_imbuf_sample_invoke().
| void ED_imbuf_sample_exit | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 438 of file ed_util_imbuf.cc.
References ImageSampleInfo::art, CTX_wm_area(), wmOperator::customdata, ImageSampleInfo::draw_handle, ED_area_tag_redraw(), ED_region_draw_cb_exit(), and MEM_freeN().
Referenced by ED_imbuf_sample_cancel(), and ED_imbuf_sample_modal().
| int ED_imbuf_sample_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| const wmEvent * | event ) |
Definition at line 447 of file ed_util_imbuf.cc.
References ImageSampleInfo::art, CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, ImageSampleInfo::draw_handle, ed_imbuf_sample_apply(), ED_imbuf_sample_draw(), ED_region_draw_cb_activate(), ED_space_image_has_buffer(), ED_space_image_show_cache_and_mval_over(), MEM_callocN, wmEvent::mval, OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, REGION_DRAW_POST_PIXEL, RGN_TYPE_WINDOW, RNA_int_get(), ImageSampleInfo::sample_size, SPACE_IMAGE, SPACE_SEQ, and WM_event_add_modal_handler().
Referenced by IMAGE_OT_curves_point_set(), IMAGE_OT_sample(), and SEQUENCER_OT_sample().
| int ED_imbuf_sample_modal | ( | bContext * | C, |
| wmOperator * | op, | ||
| const wmEvent * | event ) |
Definition at line 488 of file ed_util_imbuf.cc.
References ed_imbuf_sample_apply(), ED_imbuf_sample_exit(), KM_RELEASE, LEFTMOUSE, MOUSEMOVE, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, wmEvent::type, and wmEvent::val.
Referenced by IMAGE_OT_curves_point_set(), IMAGE_OT_sample(), and SEQUENCER_OT_sample().
| bool ED_imbuf_sample_poll | ( | bContext * | C | ) |
Definition at line 511 of file ed_util_imbuf.cc.
References CTX_data_edit_object(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), ED_space_image_show_uvedit(), SpaceSeq::mainb, SpaceImage::mode, RGN_TYPE_PREVIEW, SEQ_DRAW_IMG_IMBUF, SEQ_editing_get(), SI_MODE_VIEW, SPACE_IMAGE, and SPACE_SEQ.
Referenced by IMAGE_OT_sample(), and SEQUENCER_OT_sample().
|
static |
Definition at line 155 of file ed_util_imbuf.cc.
References BKE_curvemapping_set_black_white(), BKE_image_get_tile_from_pos(), ImBuf::byte_buffer, ImageSampleInfo::channels, ImBuf::channels, ImageSampleInfo::col, ImageSampleInfo::colf, ImageSampleInfo::colfp, ImageSampleInfo::color_manage, ImageSampleInfo::colp, copy_v4_v4(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), CTX_wm_space_image(), wmOperator::customdata, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImageSampleInfo::draw, ED_area_tag_redraw(), ED_space_image(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), ImBuf::float_buffer, G, ImageSampleInfo::height, IMA_VIEW_AS_RENDER, SpaceImage::image, image_sample_rect_color_float(), image_sample_rect_color_ubyte(), int, ImageSampleInfo::linearcol, lock, max_ii(), wmEvent::mval, NC_WINDOW, wmOperator::ptr, rgba_uchar_to_float(), RNA_enum_get(), RNA_struct_find_property(), ImageSampleInfo::sample_size, SPACE_NODE, tile, UI_view2d_region_to_view(), ImageSampleInfo::use_default_view, ImageSampleInfo::width, WM_event_add_notifier(), ImageSampleInfo::x, ImBuf::x, x, rcti::xmax, rcti::xmin, ImageSampleInfo::y, ImBuf::y, y, rcti::ymax, rcti::ymin, ImageSampleInfo::zfp, and ImageSampleInfo::zp.
Referenced by ed_imbuf_sample_apply().
|
static |
Definition at line 91 of file ed_util_imbuf.cc.
References ImBuf::channels, copy_v4_v4(), ImBufFloatBuffer::data, ImBuf::float_buffer, and ImBuf::x.
Referenced by image_sample_rect_color_float().
|
static |
Definition at line 79 of file ed_util_imbuf.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::colorspace, copy_v4_v4_uchar(), ImBufByteBuffer::data, IMB_colormanagement_colorspace_to_scene_linear_v4(), rgba_uchar_to_float(), and ImBuf::x.
Referenced by image_sample_rect_color_ubyte().
|
static |
Definition at line 133 of file ed_util_imbuf.cc.
References add_v4_v4(), image_sample_pixel_color_float(), mul_v4_fl(), rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and zero_v4().
Referenced by image_sample_apply().
|
static |
Definition at line 103 of file ed_util_imbuf.cc.
References add_v4_v4(), image_sample_pixel_color_ubyte(), mul_v4_fl(), rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and zero_v4().
Referenced by image_sample_apply().
|
static |
Definition at line 276 of file ed_util_imbuf.cc.
References ImBuf::byte_buffer, ImageSampleInfo::channels, ImBuf::channels, ImageSampleInfo::col, ImageSampleInfo::colf, ImageSampleInfo::colfp, ImageSampleInfo::color_manage, ImBufByteBuffer::colorspace, ImageSampleInfo::colp, copy_v4_v4(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), wmOperator::customdata, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImageSampleInfo::draw, ED_area_tag_redraw(), float, ImBuf::float_buffer, IMB_colormanagement_colorspace_to_scene_linear_v4(), IMB_freeImBuf(), int, ImageSampleInfo::linearcol, wmEvent::mval, SEQ_render_pixel_from_sequencer_space_v4(), sequencer_ibuf_get(), UI_view2d_region_to_view(), ImageSampleInfo::x, ImBuf::x, x, ImageSampleInfo::y, ImBuf::y, and y.
Referenced by ed_imbuf_sample_apply().