Pixel-Composer/scripts/draw_shapes/draw_shapes.gml

16 lines
647 B
Text
Raw Normal View History

2022-12-16 09:18:09 +01:00
function draw_rectangle_width(x0, y0, x1, y1, th = 1) {
draw_line_width(x0 - th / 2, y0, x1 + th / 2, y0, th);
draw_line_width(x0 - th / 2, y1, x1 + th / 2, y1, th);
draw_line_width(x0, y0 - th / 2, x0, y1 + th / 2, th);
draw_line_width(x1, y0 - th / 2, x1, y1 + th / 2, th);
}
2024-04-11 15:43:03 +02:00
function draw_rectangle_dashed(x0, y0, x1, y1, th = 1, dash = 8, shift = 0) {
draw_line_dashed(x0 - th / 2, y0, x1 + th / 2, y0, th, dash, shift);
draw_line_dashed(x0 - th / 2, y1, x1 + th / 2, y1, th, dash, shift);
2022-12-16 09:18:09 +01:00
2024-04-11 15:43:03 +02:00
draw_line_dashed(x0, y0 - th / 2, x0, y1 + th / 2, th, dash, shift);
draw_line_dashed(x1, y0 - th / 2, x1, y1 + th / 2, th, dash, shift);
2022-12-16 09:18:09 +01:00
}