1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: add draw_ellipse_filled() + draw_ellipse_empty() APIs (#12869)

This commit is contained in:
Benjamin Stigsen
2021-12-17 20:19:18 +01:00
committed by GitHub
parent 08766da7e8
commit 75830f1fe3
5 changed files with 105 additions and 0 deletions

21
vlib/gg/testdata/draw_elipses.vv vendored Normal file
View File

@@ -0,0 +1,21 @@
module main
import gg
import gx
fn main() {
mut context := gg.new_context(
width: 200
height: 200
window_title: 'Elipses'
frame_fn: frame
)
context.run()
}
fn frame(mut ctx gg.Context) {
ctx.begin()
ctx.draw_ellipse_filled(100, 100, 100, 50, gx.red)
ctx.draw_ellipse_empty(100, 100, 50, 25, gx.black)
ctx.end()
}