Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#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 "PIL_time.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_moviecache.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_paint.h"
#include "BIF_glutil.h"
#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "BLF_api.h"
#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_mask.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RE_engine.h"
#include "RE_pipeline.h"
#include "image_intern.h"
Go to the source code of this file.
Definition at line 513 of file image_draw.c.
References BLI_mutex_lock(), BLI_mutex_unlock(), C, 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_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, image(), IMB_moviecache_get_cache_segments(), IMB_PROXY_NONE, immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), SpaceImage::iuser, mask(), SpaceImage::mode, NULL, ImageUser::offset, pos, Scene::r, scene, RenderData::sfra, SI_MODE_MASK, TH_CFRAME, UI_DPI_FAC, ARegion::winx, x, and rcti::ymin.
Referenced by image_main_region_draw().
Definition at line 472 of file image_draw.c.
References C, 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 442 of file image_draw.c.
References Histogram::co, Histogram::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_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_DPI_FAC.
Referenced by image_main_region_draw().
|
static |
Definition at line 67 of file image_draw.c.
References BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), C, 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_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immDrawBorderCorners(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), MEM_freeN, NULL, pos, RE_engine_get_current_tiles(), RE_GetSceneRender(), scene, 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 | ( | struct Scene * | scene, |
struct 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], | ||
const int * | zp, | ||
const float * | zpf | ||
) |
Used by node view too.
Definition at line 122 of file image_draw.c.
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, blue, channels(), col, copy_v3_v3(), copy_v4_v4(), Scene::display_settings, 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_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), green, hue, IMB_colormanagement_pixel_to_display_space_v4(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3fvAlpha(), immUniformColor3ub(), immUniformColor4ub(), immVertexFormat(), NULL, pos, red, rgb_to_hsv(), rgb_to_yuv(), usdtokens::rgba(), scene, SNPRINTF, str, STRNCPY, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, 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[SI_GRID_STEPS_LEN], | ||
const int | grid_dimension | ||
) |
Definition at line 587 of file image_draw.c.
References SpaceImage::custom_grid_subdiv, SpaceImage::flag, float(), powf, SI_CUSTOM_GRID, and SI_GRID_STEPS_LEN.
Referenced by initSnapSpatial(), and OVERLAY_grid_init().
float ED_space_image_increment_snap_value | ( | int | grid_dimesnions, |
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 604 of file image_draw.c.
References offset, and SI_GRID_STEPS_LEN.
Referenced by initSnapSpatial().
bool ED_space_image_show_cache | ( | const SpaceImage * | sima | ) |
Definition at line 486 of file image_draw.c.
References ED_space_image(), ED_space_image_get_mask(), ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, image(), mask(), SpaceImage::mode, NULL, 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 502 of file image_draw.c.
References ED_region_visible_rect(), ED_space_image_show_cache(), UI_DPI_FAC, and rcti::ymin.
Definition at line 572 of file image_draw.c.
References View2D::cur, View2D::mask, powf, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.