Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_draw.c
| Show First 20 Lines • Show All 443 Lines • ▼ Show 20 Lines | static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, float x2, float y2) | ||||
| } | } | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| GPU_blend(false); | GPU_blend(false); | ||||
| } | } | ||||
| /* clamp handles to defined size in pixel space */ | /* clamp handles to defined size in pixel space */ | ||||
| static float draw_seq_handle_size_get_clamped(Sequence *seq, const float pixelx) | float sequence_handle_size_get_clamped(Sequence *seq, const float pixelx) | ||||
| { | { | ||||
| const float minhandle = pixelx * SEQ_HANDLE_SIZE_MIN; | const float minhandle = pixelx * SEQ_HANDLE_SIZE_MIN; | ||||
| const float maxhandle = pixelx * SEQ_HANDLE_SIZE_MAX; | const float maxhandle = pixelx * SEQ_HANDLE_SIZE_MAX; | ||||
| float size = CLAMPIS(seq->handsize, minhandle, maxhandle); | float size = CLAMPIS(seq->handsize, minhandle, maxhandle); | ||||
| /* ensure we're not greater than half width */ | /* ensure we're not greater than half width */ | ||||
| return min_ff(size, ((float)(seq->enddisp - seq->startdisp) / 2.0f) / pixelx); | return min_ff(size, ((float)(seq->enddisp - seq->startdisp) / 2.0f) / pixelx); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | static void draw_seq_strip(const bContext *C, | ||||
| ARegion *ar, | ARegion *ar, | ||||
| Sequence *seq, | Sequence *seq, | ||||
| int outline_tint, | int outline_tint, | ||||
| float pixelx) | float pixelx) | ||||
| { | { | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| float x1, x2, y1, y2; | float x1, x2, y1, y2; | ||||
| unsigned char col[4], background_col[4], is_single_image; | unsigned char col[4], background_col[4], is_single_image; | ||||
| const float handsize_clamped = draw_seq_handle_size_get_clamped(seq, pixelx); | const float handsize_clamped = sequence_handle_size_get_clamped(seq, pixelx); | ||||
| /* we need to know if this is a single image/color or not for drawing */ | /* we need to know if this is a single image/color or not for drawing */ | ||||
| is_single_image = (char)BKE_sequence_single_check(seq); | is_single_image = (char)BKE_sequence_single_check(seq); | ||||
| /* body */ | /* body */ | ||||
| x1 = (seq->startstill) ? seq->start : seq->startdisp; | x1 = (seq->startstill) ? seq->start : seq->startdisp; | ||||
| y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; | y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; | ||||
| x2 = (seq->endstill) ? (seq->start + seq->len) : seq->enddisp; | x2 = (seq->endstill) ? (seq->start + seq->len) : seq->enddisp; | ||||
| ▲ Show 20 Lines • Show All 1,278 Lines • Show Last 20 Lines | |||||