This commit is contained in:
Ingy döt Net 2013-04-10 16:19:29 -07:00
parent e5e8880e41
commit 518da4a923
1019 changed files with 15877 additions and 0 deletions

View file

@ -0,0 +1,21 @@
package main
// Files required to build supporting package raster are found in:
// * This task (immediately above)
// * Bitmap
// * Write a PPM file
import (
"raster"
"fmt"
)
func main() {
b := raster.NewBitmap(400, 300)
b.FillRgb(0xffdf20) // yellow
// large circle, demonstrating clipping to image boundaries
b.CircleRgb(300, 249, 200, 0xff2020) // red
if err := b.WritePpmFile("circle.ppm"); err != nil {
fmt.Println(err)
}
}