Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_draw.c
| Show First 20 Lines • Show All 1,205 Lines • ▼ Show 20 Lines | if (sseq->overlay_type == SEQ_DRAW_OVERLAY_RECT) { | ||||
| tot_clip.xmax = v2d->tot.xmin + (fabsf(BLI_rctf_size_x(&v2d->tot)) * scene->ed->over_border.xmax); | tot_clip.xmax = v2d->tot.xmin + (fabsf(BLI_rctf_size_x(&v2d->tot)) * scene->ed->over_border.xmax); | ||||
| tot_clip.ymax = v2d->tot.ymin + (fabsf(BLI_rctf_size_y(&v2d->tot)) * scene->ed->over_border.ymax); | tot_clip.ymax = v2d->tot.ymin + (fabsf(BLI_rctf_size_y(&v2d->tot)) * scene->ed->over_border.ymax); | ||||
| glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmin, tot_clip.ymin); | glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmin, tot_clip.ymin); | ||||
| glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmin, tot_clip.ymax); | glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmin, tot_clip.ymax); | ||||
| glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmax, tot_clip.ymax); | glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmax, tot_clip.ymax); | ||||
| glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmax, tot_clip.ymin); | glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmax, tot_clip.ymin); | ||||
| } | } | ||||
| else if (sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) { | else if (sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) { | ||||
campbellbarton: code style, spaces after `,` | |||||
| glTexCoord2f(0.0f, 0.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymin); | glTexCoord2f(0.0f, 0.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymin); | ||||
| glTexCoord2f(0.0f, 1.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymax); | glTexCoord2f(0.0f, 1.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymax); | ||||
| glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax); | glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax); | ||||
| glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin); | glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin); | ||||
Not Done Inline Actionscode style, space if ( campbellbarton: code style, space `if (` | |||||
| } | } | ||||
| } | } | ||||
Not Done Inline ActionsPreferred style is: uiDrawSafeZones(x1, x2, y1, y2, centersafes); sergey: Preferred style is:
uiDrawSafeZones(x1, x2, y1, y2, centersafes); | |||||
| else if (draw_backdrop) { | else if (draw_backdrop) { | ||||
| float aspect = BLI_rcti_size_x(&ar->winrct) / (float)BLI_rcti_size_y(&ar->winrct); | float aspect = BLI_rcti_size_x(&ar->winrct) / (float)BLI_rcti_size_y(&ar->winrct); | ||||
| float image_aspect = viewrectx / viewrecty; | float image_aspect = viewrectx / viewrecty; | ||||
| float imagex, imagey; | float imagex, imagey; | ||||
| if (aspect >= image_aspect) { | if (aspect >= image_aspect) { | ||||
| imagex = image_aspect / aspect; | imagex = image_aspect / aspect; | ||||
| imagey = 1.0f; | imagey = 1.0f; | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { | ||||
| glBegin(GL_LINE_LOOP); | glBegin(GL_LINE_LOOP); | ||||
| glVertex2f(x1 - 0.5f, y1 - 0.5f); | glVertex2f(x1 - 0.5f, y1 - 0.5f); | ||||
| glVertex2f(x1 - 0.5f, y2 + 0.5f); | glVertex2f(x1 - 0.5f, y2 + 0.5f); | ||||
| glVertex2f(x2 + 0.5f, y2 + 0.5f); | glVertex2f(x2 + 0.5f, y2 + 0.5f); | ||||
| glVertex2f(x2 + 0.5f, y1 - 0.5f); | glVertex2f(x2 + 0.5f, y1 - 0.5f); | ||||
| glEnd(); | glEnd(); | ||||
| /* safety border */ | /* safety border */ | ||||
| if ((sseq->flag & SEQ_DRAW_SAFE_MARGINS) != 0) { | if (sseq->flag & SEQ_DRAW_SAFE_MARGINS) { | ||||
| float fac = 0.1; | UI_draw_safe_areas(x1, x2, y1, y2, | ||||
| scene->safe_areas.title, | |||||
| float a = fac * (x2 - x1); | scene->safe_areas.action); | ||||
| x1 += a; | |||||
| x2 -= a; | if (sseq->flag & SEQ_DRAW_CENTER_SAFE) { | ||||
| UI_draw_safe_areas(x1, x2, y1, y2, | |||||
| a = fac * (y2 - y1); | scene->safe_areas.title_center, | ||||
| y1 += a; | scene->safe_areas.action_center); | ||||
| y2 -= a; | } | ||||
| glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | |||||
| UI_draw_roundbox_corner_set(UI_CNR_ALL); | |||||
| UI_draw_roundbox_gl_mode(GL_LINE_LOOP, x1, y1, x2, y2, 12.0); | |||||
| glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | |||||
| } | } | ||||
| setlinestyle(0); | setlinestyle(0); | ||||
| } | } | ||||
| if (sseq->flag & SEQ_SHOW_GPENCIL) { | if (sseq->flag & SEQ_SHOW_GPENCIL) { | ||||
| if (is_imbuf) { | if (is_imbuf) { | ||||
| /* draw grease-pencil (image aligned) */ | /* draw grease-pencil (image aligned) */ | ||||
| ▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines | |||||
code style, spaces after ,