Browse files

Fixed stars example

  • Loading branch information...
1 parent 5dd9eea commit a5be3dfc9a0243c005be73657508e2d29abad709 n ddrylliog committed Oct 21, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 stars.ooc
  2. BIN stars.png
View
7 stars.ooc
@@ -1,6 +1,9 @@
import cairo/Cairo
include math, time
+use cairo/cairo
+include cairo
+
main: func (argc: Int, argv: String*) {
"Welcome to the ooc-cairo stars generator!" println()
@@ -17,7 +20,7 @@ main: func (argc: Int, argv: String*) {
}
surface := ImageSurface new(0, w, h) /* 0 = CAIRO_FORMAT_ARGB32 */
- cr := Context new(surface)
+ cr := Context new(surface) as MyContext
cr setSourceRGB(0, 0, 0)
cr paint()
@@ -48,7 +51,7 @@ main: func (argc: Int, argv: String*) {
}
-Context: cover {
+MyContext: cover from cairo_t* extends Context {
drawStar: func (x, y, pikes: Int, radius, ratio: Float) {
View
BIN stars.png
Deleted file not rendered

0 comments on commit a5be3df

Please sign in to comment.