Fix missing line width for helper line drawing
Also scale by pixel size.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user