Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2017-04-07 02:15:26 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-07 02:15:26 +0300
commitf69678482c849d873b9686cd6068946205db7c2b (patch)
tree3ffd7dee52bac6d5706b5e6b64983290dd3ebed6 /source/blender/editors/space_view3d/view3d_ruler.c
parent934dfc420088b4ce06bb050ade1ab6a4fa8e6d72 (diff)
OpenGL: refactor UI_draw_roundbox functions
Each function takes a bool (filled vs outline) and a color. We already had multiple ways of passing color in; these are still here. Special variant for anti-aliasing. - took GLenum out of interface - removed UI_RB_ALPHA flag (only one place really used it) - use exact vertex count - removed redundant state changes (BLEND, LINE_SMOOTH)
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_ruler.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index c0618cf2c6d..edec14f92af 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -590,7 +590,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
/* draw text (bg) */
UI_draw_roundbox_corner_set(UI_CNR_ALL);
- UI_draw_roundbox(
+ UI_draw_roundbox_aa(true,
posit[0] - bg_margin, posit[1] - bg_margin,
posit[0] + bg_margin + numstr_size[0], posit[1] + bg_margin + numstr_size[1],
bg_radius, color_back);
@@ -679,7 +679,8 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
/* draw text (bg) */
UI_draw_roundbox_corner_set(UI_CNR_ALL);
- UI_draw_roundbox(posit[0] - bg_margin, posit[1] - bg_margin,
+ UI_draw_roundbox_aa(true,
+ posit[0] - bg_margin, posit[1] - bg_margin,
posit[0] + bg_margin + numstr_size[0], posit[1] + bg_margin + numstr_size[1],
bg_radius, color_back);
/* draw text */