Handbook
Glossary
solid
Vocabulary
ui
.
pens
.
solid
Class description
A class implementing the
draw-boundary
and
draw-interior
generic words to draw a solid outline or a solid fill, respectively. The
color
slot stores an instance of
color
.
Notes
See
Colors
.
Definition
USING:
ui.pens.caching
;
IN:
ui.pens.solid
TUPLE:
solid
<
caching-pen
color interior-vertices boundary-vertices
;
Methods
USING:
accessors
kernel
opengl
ui.pens
ui.pens.solid
ui.pens.solid.private
;
M:
solid
draw-boundary
[
(solid)
]
[
boundary-vertices>>
gl-vertex-pointer
]
bi
(gl-rect)
;
USING:
accessors
kernel
opengl
ui.pens
ui.pens.solid
ui.pens.solid.private
;
M:
solid
draw-interior
[
(solid)
]
[
interior-vertices>>
gl-vertex-pointer
]
bi
(gl-fill-rect)
;
USING:
accessors
colors
kernel
math
ui.pens
ui.pens.solid
;
M:
solid
pen-background
nip
color>>
dup
alpha>>
1
number=
[
drop
transparent
]
unless
;
USING:
accessors
kernel
opengl
ui.pens.caching
ui.pens.solid
;
M:
solid
recompute-pen
swap
dim>>
[
[
{
0 0
}
]
dip
(fill-rect-vertices)
>>interior-vertices
]
[
[
{
0 0
}
]
dip
(rect-vertices)
>>boundary-vertices
]
bi
drop
;