test2   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/drawing.xtm

Implementation

;; draw animated circles to an opengl context
(bind-func test2
  (let ((surface (cairo_image_surface_create CAIRO_FORMAT_RGB24 900 600))
  (image (cairo_image_surface_create_from_png "/path/to/image.png"))
  (cr (cairo_create surface))
  (i 0.0)
  (width 0.0)
  (height 0.0))
    (lambda (t:double)
      ;; scale image to fullscreen background
      (set! width (i32tod (cairo_image_surface_get_width image)))
      (set! height (i32tod (cairo_image_surface_get_height image)))
      (cairo_draw_image cr image 0.0 0.0 width height 0.0 0.0 900.0 600.0)


Back to Index

Similar Entries

  • array-test2    xtlang
  • callback-test2-helper    xtlang
  • eq_test2    xtlang
  • map_test2    xtlang
  • my-test20    xtlang
  • my-test25    xtlang
  • my-test26    xtlang
  • my-test27    xtlang
  • my-test28    xtlang
  • my-test29    xtlang
  • pmap_test2    xtlang
  • vector-test2    xtlang