 
 : defaults ( -- )
   0.8    background
-  ! 0      >stroke-color
-  ! 1      >fill-color
   ! CENTER ellipse-mode
   60 frame-rate ;
 

!   stroke-color> set-color

!   quad-vertices ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! : rect-vertices ( x y width height -- )
!   GL_POLYGON glBegin
!     [ 2drop                      glVertex2d ] 4keep
!     [ drop swap >r + 1- r>       glVertex2d ] 4keep
!     [ >r swap >r + 1- r> r> + 1- glVertex2d ] 4keep
!     [ nip + 1-                   glVertex2d ] 4keep
!     4drop
!   glEnd ;

! : rect ( x y width height -- )

!   4dup

!   GL_FRONT_AND_BACK GL_FILL glPolygonMode
!   fill-color> set-color

!   rect-vertices

!   GL_FRONT_AND_BACK GL_LINE glPolygonMode
!   stroke-color> set-color

!   rect-vertices ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

GENERIC: canonical-color-value ( obj -- color )

METHOD: canonical-color-value { number } dup dup 1 4array ;
