19 lines
572 B
Factor
19 lines
572 B
Factor
! Copyright (C) 2009 Slava Pestov.
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
USING: accessors colors.constants kernel tools.test
|
|
ui.gadgets.labels ui.pens.caching ui.pens.gradient ;
|
|
IN: ui.pens.caching.tests
|
|
|
|
SPECIALIZED-ARRAY: float
|
|
|
|
! compute-pen
|
|
{
|
|
{ 0 0 }
|
|
float-array{ 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 }
|
|
float-array{ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 }
|
|
} [
|
|
"hi" <label> { COLOR: white COLOR: black } <gradient>
|
|
[ compute-pen ] keep
|
|
[ last-dim>> ] [ last-vertices>> ] [ last-colors>> ] tri
|
|
] unit-test
|