Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_draw.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| immEnd(); | immEnd(); | ||||
| } | } | ||||
| GPU_blend(GPU_BLEND_NONE); | GPU_blend(GPU_BLEND_NONE); | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| } | } | ||||
| void screen_draw_dock_preview(struct ScrArea *area, eAreaDockTarget dock_target) | |||||
| { | |||||
| if (dock_target == DOCKING_NONE) { | |||||
| return; | |||||
| } | |||||
| rctf rect; | |||||
| BLI_rctf_rcti_copy(&rect, &area->totrct); | |||||
| if (dock_target == DOCKING_RIGHT) { | |||||
| rect.xmin += area->winx / 2; | |||||
| } | |||||
| else if (dock_target == DOCKING_LEFT) { | |||||
| rect.xmax -= area->winx / 2; | |||||
| } | |||||
| else if (dock_target == DOCKING_TOP) { | |||||
| rect.ymin += area->winy / 2; | |||||
| } | |||||
| else if (dock_target == DOCKING_BOTTOM) { | |||||
| rect.ymax -= area->winy / 2; | |||||
| } | |||||
| float outline[4] = {1.0f, 1.0f, 1.0f, 0.4f}; | |||||
| float inner[4] = {1.0f, 1.0f, 1.0f, 0.15f}; | |||||
| UI_draw_roundbox_corner_set(UI_CNR_ALL); | |||||
| UI_draw_roundbox_4fv_ex(&rect, inner, NULL, 1.0f, outline, U.pixelsize, 7 * U.pixelsize); | |||||
| } | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /* Screen Thumbnail Preview */ | /* Screen Thumbnail Preview */ | ||||
| /** | /** | ||||
| * Calculates a scale factor to squash the preview for \a screen into a rectangle | * Calculates a scale factor to squash the preview for \a screen into a rectangle | ||||
| * of given size and aspect. | * of given size and aspect. | ||||
| */ | */ | ||||
| static void screen_preview_scale_get( | static void screen_preview_scale_get( | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||