mirror of
https://github.com/vlang/v.git
synced 2025-09-22 20:09:04 -04:00
21 lines
322 B
V
21 lines
322 B
V
module main
|
|
|
|
import gg
|
|
|
|
fn main() {
|
|
mut context := gg.new_context(
|
|
width: 200
|
|
height: 200
|
|
window_title: 'Ellipses'
|
|
frame_fn: frame
|
|
)
|
|
context.run()
|
|
}
|
|
|
|
fn frame(mut ctx gg.Context) {
|
|
ctx.begin()
|
|
ctx.draw_ellipse_filled(100, 100, 100, 50, gg.red)
|
|
ctx.draw_ellipse_empty(100, 100, 50, 25, gg.black)
|
|
ctx.end()
|
|
}
|