Blender  V3.3
Functions
image_draw.c File Reference
#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.

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], const int *zp, const float *zpf)
 
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[SI_GRID_STEPS_LEN], const int grid_dimension)
 
float ED_space_image_increment_snap_value (const int grid_dimesnions, const float grid_steps[SI_GRID_STEPS_LEN], const float zoom_factor)
 

Function Documentation

◆ draw_image_cache()

void draw_image_cache ( const bContext C,
ARegion region 
)

◆ draw_image_main_helpers()

void draw_image_main_helpers ( const bContext C,
ARegion region 
)

◆ draw_image_sample_line()

void draw_image_sample_line ( SpaceImage sima)

◆ draw_render_info()

static void draw_render_info ( const bContext C,
Scene scene,
Image ima,
ARegion region,
float  zoomx,
float  zoomy 
)
static

◆ ED_image_draw_info()

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 
)

◆ ED_space_image_grid_steps()

void ED_space_image_grid_steps ( SpaceImage sima,
float  grid_steps[SI_GRID_STEPS_LEN],
const int  grid_dimension 
)

◆ ED_space_image_increment_snap_value()

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().

◆ ED_space_image_show_cache()

bool ED_space_image_show_cache ( const SpaceImage sima)

◆ 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] 
)

◆ ED_space_image_zoom_level()

float ED_space_image_zoom_level ( const View2D v2d,
const int  grid_dimension 
)