|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_brush_types.h"#include "DNA_camera_types.h"#include "DNA_mask_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_view2d_types.h"#include "BLI_listbase.h"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_threads.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_moviecache.hh"#include "BKE_context.hh"#include "BKE_image.hh"#include "BKE_paint.hh"#include "BIF_glutil.hh"#include "GPU_framebuffer.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) |
Definition at line 493 of file image_draw.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), ceilf, 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(), ELEM, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMB_moviecache_get_cache_segments(), IMB_PROXY_NONE, immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), SpaceImage::iuser, SpaceImage::mode, ImageUser::offset, pos, SI_MODE_MASK, TH_CFRAME, UI_SCALE_FAC, x, and rcti::ymin.
Referenced by image_main_region_draw().
Definition at line 452 of file image_draw.cc.
References CTX_wm_space_image(), draw_render_info(), ED_space_image(), ED_space_image_get_zoom(), IMA_SRC_VIEWER, IMA_TYPE_R_RESULT, SpaceImage::iuser, ImageUser::scene, Image::source, and Image::type.
Referenced by image_main_region_draw().
| void draw_image_sample_line | ( | SpaceImage * | sima | ) |
Definition at line 421 of file image_draw.cc.
References Histogram::co, Histogram::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, 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().
|
static |
Definition at line 66 of file image_draw.cc.
References BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), CTX_data_scene(), ED_region_info_draw(), ED_render_job_get_scene(), GPU_COMP_F32, GPU_FETCH_FLOAT, 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(), 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(), 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 116 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(), ED_region_visible_rect(), float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMB_colormanagement_pixel_to_display_space_v4(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3fvAlpha(), immUniformColor3ub(), immUniformColor4ub(), immVertexFormat(), pos, red, rgb_to_hsv(), rgb_to_yuv(), SNPRINTF, str, STRNCPY, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, UI_SCALE_FAC, UI_UNIT_X, UI_UNIT_Y, v, rcti::xmax, rcti::xmin, 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 568 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, and SI_GRID_STEPS_LEN.
Referenced by OVERLAY_grid_init(), and 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 600 of file image_draw.cc.
References SI_GRID_STEPS_LEN.
Referenced by transform_snap_grid_init().
| bool ED_space_image_show_cache | ( | const SpaceImage * | sima | ) |
Definition at line 466 of file image_draw.cc.
References ED_space_image(), ED_space_image_get_mask(), ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, SpaceImage::mode, and SI_MODE_MASK.
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 482 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 553 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 OVERLAY_grid_init(), and transform_snap_grid_init().