Blender  V3.3
Functions
mask_draw.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_mask.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "ED_clip.h"
#include "ED_mask.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "BIF_glutil.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "GPU_shader.h"
#include "GPU_state.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "DEG_depsgraph_query.h"

Go to the source code of this file.

Functions

static void mask_spline_color_get (MaskLayer *mask_layer, MaskSpline *spline, const bool is_sel, uchar r_rgb[4])
 
static void mask_spline_feather_color_get (MaskLayer *UNUSED(mask_layer), MaskSpline *UNUSED(spline), const bool is_sel, uchar r_rgb[4])
 
static void mask_point_undistort_pos (SpaceClip *sc, float r_co[2], const float co[2])
 
static void draw_single_handle (const MaskLayer *mask_layer, const MaskSplinePoint *point, const eMaskWhichHandle which_handle, const int draw_type, const float handle_size, const float point_pos[2], const float handle_pos[2])
 
static void draw_spline_points (const bContext *C, MaskLayer *mask_layer, MaskSpline *spline, const char draw_type)
 
static void mask_color_active_tint (uchar r_rgb[4], const uchar rgb[4], const bool is_active)
 
static void mask_draw_array (uint pos, GPUPrimType prim_type, const float(*points)[2], uint vertex_len)
 
static void mask_draw_curve_type (const bContext *C, MaskSpline *spline, float(*orig_points)[2], int tot_point, const bool is_feather, const bool is_active, const uchar rgb_spline[4], const char draw_type)
 
static void draw_spline_curve (const bContext *C, MaskLayer *mask_layer, MaskSpline *spline, const char draw_type, const bool is_active, const int width, const int height)
 
static void draw_layer_splines (const bContext *C, MaskLayer *layer, const char draw_type, const int width, const int height, const bool is_active)
 
static void draw_mask_layers (const bContext *C, Mask *mask, const char draw_type, const int width, const int height)
 
static floatmask_rasterize (Mask *mask, const int width, const int height)
 
void ED_mask_draw_region (Depsgraph *depsgraph, Mask *mask_, ARegion *region, const char draw_flag, const char draw_type, const eMaskOverlayMode overlay_mode, const float blend_factor, const int width_i, const int height_i, const float aspx, const float aspy, const bool do_scale_applied, const bool do_draw_cb, float stabmat[4][4], const bContext *C)
 
void ED_mask_draw_frames (Mask *mask, ARegion *region, const int cfra, const int sfra, const int efra)
 

Function Documentation

◆ draw_layer_splines()

static void draw_layer_splines ( const bContext C,
MaskLayer layer,
const char  draw_type,
const int  width,
const int  height,
const bool  is_active 
)
static

◆ draw_mask_layers()

static void draw_mask_layers ( const bContext C,
Mask mask,
const char  draw_type,
const int  width,
const int  height 
)
static

◆ draw_single_handle()

static void draw_single_handle ( const MaskLayer mask_layer,
const MaskSplinePoint point,
const eMaskWhichHandle  which_handle,
const int  draw_type,
const float  handle_size,
const float  point_pos[2],
const float  handle_pos[2] 
)
static

◆ draw_spline_curve()

static void draw_spline_curve ( const bContext C,
MaskLayer mask_layer,
MaskSpline spline,
const char  draw_type,
const bool  is_active,
const int  width,
const int  height 
)
static

◆ draw_spline_points()

static void draw_spline_points ( const bContext C,
MaskLayer mask_layer,
MaskSpline spline,
const char  draw_type 
)
static

◆ ED_mask_draw_frames()

void ED_mask_draw_frames ( Mask mask,
ARegion region,
const int  cfra,
const int  sfra,
const int  efra 
)

◆ ED_mask_draw_region()

void ED_mask_draw_region ( Depsgraph depsgraph,
Mask mask_,
ARegion region,
const char  draw_flag,
const char  draw_type,
const eMaskOverlayMode  overlay_mode,
const float  blend_factor,
const int  width_i,
const int  height_i,
const float  aspx,
const float  aspy,
const bool  do_scale_applied,
const bool  do_draw_cb,
float  stabmat[4][4],
const bContext C 
)

◆ mask_color_active_tint()

static void mask_color_active_tint ( uchar  r_rgb[4],
const uchar  rgb[4],
const bool  is_active 
)
static

Definition at line 349 of file mask_draw.c.

References usdtokens::rgb().

Referenced by mask_draw_curve_type().

◆ mask_draw_array()

static void mask_draw_array ( uint  pos,
GPUPrimType  prim_type,
const float(*)  points[2],
uint  vertex_len 
)
static

Definition at line 362 of file mask_draw.c.

References immBegin(), immEnd(), immVertex2fv(), and pos.

Referenced by mask_draw_curve_type().

◆ mask_draw_curve_type()

static void mask_draw_curve_type ( const bContext C,
MaskSpline spline,
float(*)  orig_points[2],
int  tot_point,
const bool  is_feather,
const bool  is_active,
const uchar  rgb_spline[4],
const char  draw_type 
)
static

◆ mask_point_undistort_pos()

static void mask_point_undistort_pos ( SpaceClip sc,
float  r_co[2],
const float  co[2] 
)
static

◆ mask_rasterize()

static float* mask_rasterize ( Mask mask,
const int  width,
const int  height 
)
static

◆ mask_spline_color_get()

static void mask_spline_color_get ( MaskLayer mask_layer,
MaskSpline spline,
const bool  is_sel,
uchar  r_rgb[4] 
)
static

Definition at line 41 of file mask_draw.c.

References MaskLayer::act_spline.

Referenced by draw_spline_curve(), and draw_spline_points().

◆ mask_spline_feather_color_get()

static void mask_spline_feather_color_get ( MaskLayer UNUSEDmask_layer,
MaskSpline UNUSEDspline,
const bool  is_sel,
uchar  r_rgb[4] 
)
static

Definition at line 63 of file mask_draw.c.

Referenced by draw_spline_curve().