Advertisement
Guest User

Untitled

a guest
Apr 11th, 2014
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. #include <os.h>
  2. #include <nspireio2.h>
  3. #include <ngc.h>
  4. #define TRUE 1
  5. #define FALSE 0
  6.  
  7. int main(void) {
  8.     /* Get the gc */
  9.   Gc gc = *gui_gc_global_GC_ptr;
  10.  
  11.   /* Initialization */
  12.   gui_gc_setRegion(gc, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
  13.   gui_gc_begin(gc);
  14.  
  15.   /* Draw */
  16.   gui_gc_clipRect(gc, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, GC_CRO_SET);
  17.   gui_gc_fillRect(gc, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); /* Will only draw a 10x10 rectangle */
  18.  
  19.     wait_key_pressed();
  20.    
  21.     /* Blit & finish */
  22.   gui_gc_blit_to_screen(gc);
  23.   gui_gc_finish(gc);
  24.  
  25.   return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement