Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module main
- import gg
- import gx
- fn main() {
- mut ctx := gg.new_context(
- bg_color: gx.white
- width: 600
- height: 780
- create_window: true
- window_title: 'Lines'
- frame_fn: frame
- sample_count: 4
- )
- ctx.run()
- }
- fn frame(mut ctx gg.Context) {
- window_size := ctx.window_size()
- ctx.begin()
- for l := 30; l <= window_size.height; l += window_size.height / 10 {
- for r := 30; r <= window_size.height; r += window_size.height / 10 {
- ctx.draw_line(10, l, window_size.width - 10, r, gx.black)
- }
- }
- ctx.end()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement