Handbook
Glossary
theme-pen
Vocabulary
ui
.
pens
.
theme
Definition
USING:
ui.pens.caching
;
IN:
ui.pens.theme
TUPLE:
theme-pen
<
caching-pen
background foreground interior-vertices boundary-vertices
;
Methods
USING:
accessors
combinators
kernel
opengl
ui.pens
ui.pens.caching
ui.pens.theme
;
M:
theme-pen
draw-boundary
[
compute-pen
]
[
background>>
( -- color )
call-effect
gl-color
]
[
boundary-vertices>>
gl-vertex-pointer
]
tri
(gl-rect)
;
USING:
accessors
combinators
kernel
opengl
ui.pens
ui.pens.caching
ui.pens.theme
;
M:
theme-pen
draw-interior
[
compute-pen
]
[
background>>
( -- color )
call-effect
gl-color
]
[
interior-vertices>>
gl-vertex-pointer
]
tri
(gl-fill-rect)
;
USING:
accessors
colors
combinators
kernel
math
ui.pens
ui.pens.theme
;
M:
theme-pen
pen-background
nip
background>>
( -- color )
call-effect
dup
alpha>>
1
number=
[
drop
transparent
]
unless
;
USING:
accessors
colors
combinators
kernel
math
ui.pens
ui.pens.theme
;
M:
theme-pen
pen-foreground
nip
foreground>>
( -- color )
call-effect
dup
alpha>>
1
number=
[
drop
transparent
]
unless
;
USING:
accessors
kernel
opengl
ui.pens.caching
ui.pens.theme
;
M:
theme-pen
recompute-pen
swap
dim>>
[
[
{
0 0
}
]
dip
(fill-rect-vertices)
>>interior-vertices
]
[
[
{
0 0
}
]
dip
(rect-vertices)
>>boundary-vertices
]
bi
drop
;