diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-07 04:35:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-07 04:35:33 +0300 |
commit | 77c0a7e1d578f915ffbd4d127d0d5acb96a8a1d6 (patch) | |
tree | 926d6914be09efb2afb13d0c554d0a9154eaea17 | |
parent | 5940ea11ce89ce16db1cfa956b80efcfddc2e2c8 (diff) |
Fix missing line width for helper line drawing
Also scale by pixel size.
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_ruler.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ruler.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index ec36f97ebd1..6bb6a022a82 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -520,7 +520,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) /* anti-aliased lines for more consistent appearance */ GPU_line_smooth(true); - GPU_line_width(1.0f); + GPU_line_width(1.0f * U.pixelsize); BLF_enable(blf_mono_font, BLF_ROTATION); BLF_size(blf_mono_font, 14 * U.pixelsize, U.dpi); diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index ea3896d1f30..d6637c2209e 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -433,7 +433,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a /* anti-aliased lines for more consistent appearance */ GPU_line_smooth(true); - GPU_line_width(1.0f); + GPU_line_width(1.0f * U.pixelsize); BLF_enable(blf_mono_font, BLF_ROTATION); BLF_size(blf_mono_font, 14 * U.pixelsize, U.dpi); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 35a77fcd4c0..6c4f963b011 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -344,6 +344,8 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info const uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + GPU_line_width(1.0f * U.pixelsize); + immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); float viewport_size[4]; |