From 3dae3f786dd9b189a857aad54b64c07a7b7d702d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 24 Jan 2021 22:27:27 +0100 Subject: [PATCH] gg: Context.resize() --- vlib/gg/gg.v | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index bbc8620644..156fd7a7e3 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -484,6 +484,11 @@ fn abs(a f32) f32 { return -a } +pub fn (mut ctx Context) resize(width int, height int) { + ctx.width = width + ctx.height = height +} + pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) { if c.a != 255 { sgl.load_pipeline(ctx.timage_pip)