S
Sam (Deleted User)
Guest
This workaround has limited application, as they may fix this in the future. But draw_rectangle() is currently bugged in GMS and it draws one pixel width of an outline regardless of how many pixels it should be upscaling depending on room and view related stuff. For example, you're view could be zoomed in by 200% and the line would make sense to be 2 pixels thick, instead it is still one pixel thick.
Here's a function you can use that respects room and view zooming and window resizing / scaling....
....where as "spr_DrawRectFix" is a 1x1 pixel solid white color filled sprite.
Replace "2" with the desired pixel thickness -- search -> replace all (whole word only).
Probably other drawing primitives are also broken in the same manner. You can fix that similarly to this approach.
Here's a function you can use that respects room and view zooming and window resizing / scaling....
GML:
function draw_rectangle_patched(x1, y1, x2, y2, outline) {
left = x1;
top = y1;
width = x2 - x1;
height = y2 - y1;
if (!outline) {
draw_sprite_stretched_ext(spr_DrawRectFix, 0, left, top, width, height, draw_get_color(), draw_get_alpha());
} else {
draw_sprite_stretched_ext(spr_DrawRectFix, 0, left - 2, top - 2, width + 2, 2, draw_get_color(), draw_get_alpha());
draw_sprite_stretched_ext(spr_DrawRectFix, 0, left - 2, top - 2, 2, height + 2, draw_get_color(), draw_get_alpha());
draw_sprite_stretched_ext(spr_DrawRectFix, 0, left + width, top, 2, height + 2, draw_get_color(), draw_get_alpha());
draw_sprite_stretched_ext(spr_DrawRectFix, 0, left, top + height, width + 2, 2, draw_get_color(), draw_get_alpha());
}
}
Replace "2" with the desired pixel thickness -- search -> replace all (whole word only).
Probably other drawing primitives are also broken in the same manner. You can fix that similarly to this approach.