|
Blender V5.0
|
#include <cmath>#include <cstdlib>#include <cstring>#include "DNA_mask_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_view2d_types.h"#include "BLI_rect.h"#include "BLI_string_utf8.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "IMB_colormanagement.hh"#include "IMB_imbuf_enums.h"#include "IMB_moviecache.hh"#include "BKE_context.hh"#include "BKE_image.hh"#include "BKE_paint.hh"#include "BIF_glutil.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "BLF_api.hh"#include "ED_gpencil_legacy.hh"#include "ED_image.hh"#include "ED_mask.hh"#include "ED_render.hh"#include "ED_screen.hh"#include "ED_util.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "RE_engine.h"#include "RE_pipeline.h"#include "image_intern.hh"Go to the source code of this file.
Functions | |
| static void | draw_render_info (const bContext *C, Scene *scene, Image *ima, ARegion *region, float zoomx, float zoomy) |
| void | ED_image_draw_info (Scene *scene, ARegion *region, bool color_manage, bool use_default_view, int channels, int x, int y, const uchar cp[4], const float fp[4], const float linearcol[4]) |
| void | draw_image_sample_line (SpaceImage *sima) |
| void | draw_image_main_helpers (const bContext *C, ARegion *region) |
| bool | ED_space_image_show_cache (const SpaceImage *sima) |
| bool | ED_space_image_show_cache_and_mval_over (const SpaceImage *sima, ARegion *region, const int mval[2]) |
| void | draw_image_cache (const bContext *C, ARegion *region) |
| float | ED_space_image_zoom_level (const View2D *v2d, const int grid_dimension) |
| void | ED_space_image_grid_steps (SpaceImage *sima, float grid_steps_x[SI_GRID_STEPS_LEN], float grid_steps_y[SI_GRID_STEPS_LEN], const int grid_dimension) |
| float | ED_space_image_increment_snap_value (const int grid_dimensions, const float grid_steps[SI_GRID_STEPS_LEN], const float zoom_factor) |
| void | draw_image_uv_custom_region (const ARegion *region, const rctf &custom_region) |
Definition at line 489 of file image_draw.cc.
References C, Image::cache, ceilf, RenderData::cfra, CTX_data_scene(), CTX_wm_space_image(), ED_mask_draw_frames(), ED_region_cache_draw_background(), ED_region_cache_draw_cached_segments(), ED_region_cache_draw_curfra_label(), ED_region_visible_rect(), ED_space_image(), ED_space_image_get_mask(), ED_space_image_show_cache(), RenderData::efra, ELEM, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMB_moviecache_get_cache_segments(), IMB_PROXY_NONE, immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), SpaceImage::iuser, lock, mask(), SpaceImage::mode, ImageUser::offset, pos, Scene::r, roundf, Image::runtime, RenderData::sfra, SI_MODE_MASK, Image::source, TH_CFRAME, UI_SCALE_FAC, ARegion::winx, x, and rcti::ymin.
Referenced by image_main_region_draw().
Definition at line 440 of file image_draw.cc.
References C, CTX_data_scene(), CTX_wm_space_image(), draw_image_uv_custom_region(), draw_render_info(), ED_space_image(), ED_space_image_get_zoom(), IMA_SRC_VIEWER, IMA_TYPE_R_RESULT, SpaceImage::iuser, SpaceImage::mode, ImageUser::scene, SI_MODE_UV, Image::source, Scene::toolsettings, Image::type, ToolSettings::uv_custom_region, ToolSettings::uv_flag, and UV_FLAG_CUSTOM_REGION.
Referenced by image_main_region_draw().
| void draw_image_sample_line | ( | SpaceImage * | sima | ) |
Definition at line 409 of file image_draw.cc.
References Histogram::co, Histogram::flag, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), HISTO_FLAG_SAMPLELINE, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2fv(), immVertexFormat(), SpaceImage::sample_line_hist, and UI_SCALE_FAC.
Referenced by image_main_region_draw().
Definition at line 618 of file image_draw.cc.
References GPU_line_width(), GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertexFormat(), UI_SCALE_FAC, UI_view2d_view_to_region_rcti(), ARegion::v2d, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by draw_image_main_helpers().
|
static |
Definition at line 57 of file image_draw.cc.
References BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), C, ED_region_info_draw(), ED_render_job_get_scene(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), i, immBindBuiltinProgram(), immDrawBorderCorners(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), pos, RE_engine_get_current_tiles(), RE_GetSceneRender(), RenderResult::text, TH_FACE_SELECT, tile, tiles, UI_view2d_view_to_region(), ARegion::v2d, x, and y.
Referenced by draw_image_main_helpers().
| void ED_image_draw_info | ( | Scene * | scene, |
| ARegion * | region, | ||
| bool | color_manage, | ||
| bool | use_default_view, | ||
| int | channels, | ||
| int | x, | ||
| int | y, | ||
| const unsigned char | cp[4], | ||
| const float | fp[4], | ||
| const float | linearcol[4] ) |
Used by node view too.
Definition at line 107 of file image_draw.cc.
References BLF_color3ub(), BLF_color3ubv(), BLF_draw(), blf_mono_font, BLF_position(), BLF_size(), BLF_width(), BLI_assert, BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_init(), BLI_rcti_size_x(), BLI_YUV_ITU_BT709, col, copy_v3_v3(), copy_v4_v4(), Scene::display_settings, DISPLAY_SPACE_COLOR_INSPECTION, ED_region_visible_rect(), float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMB_colormanagement_pixel_to_display_space_v4(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3fvAlpha(), immUniformColor3ub(), immUniformColor4ub(), immVertexFormat(), pos, rgb_to_hsv(), rgb_to_yuv(), SNPRINTF_UTF8, str, STRNCPY_UTF8, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, UI_SCALE_FAC, UI_UNIT_X, UI_UNIT_Y, v, Scene::view_settings, ARegion::winrct, x, rcti::xmax, rcti::xmin, y, rcti::ymax, rcti::ymin, and zero_v4().
Referenced by ED_imbuf_sample_draw(), and blender::ed::space_node::sample_draw().
| void ED_space_image_grid_steps | ( | SpaceImage * | sima, |
| float | grid_steps_x[SI_GRID_STEPS_LEN], | ||
| float | grid_steps_y[SI_GRID_STEPS_LEN], | ||
| const int | grid_dimension ) |
Definition at line 564 of file image_draw.cc.
References BLI_assert, BLI_assert_unreachable, SpaceImage::custom_grid_subdiv, ED_space_image_get_size(), SpaceImage::grid_shape_source, IMG_SIZE_FALLBACK, powf, SI_GRID_SHAPE_DYNAMIC, SI_GRID_SHAPE_FIXED, SI_GRID_SHAPE_PIXEL, SI_GRID_STEPS_LEN, and step.
Referenced by blender::ed::transform::transform_snap_grid_init().
| float ED_space_image_increment_snap_value | ( | int | grid_dimensions, |
| const float | grid_steps[SI_GRID_STEPS_LEN], | ||
| float | zoom_factor ) |
Calculate the increment snapping value for UV/image editor based on the zoom factor The code in here (except the offset part) is used in grid_frag.glsl (see grid_res) for drawing the grid overlay for the UV/Image editor.
Definition at line 596 of file image_draw.cc.
References SI_GRID_STEPS_LEN, and step.
Referenced by blender::ed::transform::transform_snap_grid_init().
| bool ED_space_image_show_cache | ( | const SpaceImage * | sima | ) |
Definition at line 462 of file image_draw.cc.
References ED_space_image(), ED_space_image_get_mask(), ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, mask(), SpaceImage::mode, SI_MODE_MASK, and Image::source.
Referenced by draw_image_cache(), and ED_space_image_show_cache_and_mval_over().
| bool ED_space_image_show_cache_and_mval_over | ( | const SpaceImage * | sima, |
| ARegion * | region, | ||
| const int | mval[2] ) |
Definition at line 478 of file image_draw.cc.
References ED_region_visible_rect(), ED_space_image_show_cache(), UI_SCALE_FAC, and rcti::ymin.
Referenced by change_frame_invoke(), ED_imbuf_sample_invoke(), and uv_set_2d_cursor_invoke().
Definition at line 549 of file image_draw.cc.
References View2D::cur, View2D::mask, powf, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by blender::ed::transform::transform_snap_grid_init().