Handbook
Glossary
polygon
Vocabulary
ui
.
pens
.
polygon
Class description
A class implementing the
draw-boundary
and
draw-interior
generic words to draw a solid outline or a solid filled polygon, respectively. Instances of
polygon
have two slots:
•
color
- a
color
•
points
- a sequence of points
Definition
IN:
ui.pens.polygon
TUPLE:
polygon
color interior-vertices interior-count boundary-vertices
boundary-count
;
Methods
USING:
accessors
kernel
opengl
opengl.gl
ui.pens
ui.pens.polygon
;
M:
polygon
draw-boundary
nip
[
color>>
gl-color
]
[
boundary-vertices>>
gl-vertex-pointer
]
[
[
GL_LINE_STRIP
0
]
dip
boundary-count>>
glDrawArrays
]
tri
;
USING:
accessors
kernel
opengl
opengl.gl
ui.pens
ui.pens.polygon
;
M:
polygon
draw-interior
nip
[
color>>
gl-color
]
[
interior-vertices>>
gl-vertex-pointer
]
[
[
GL_POLYGON
0
]
dip
interior-count>>
glDrawArrays
]
tri
;
USING:
accessors
grouping
kernel
ui.gadgets
ui.pens
ui.pens.polygon
;
M:
polygon
pen-pref-dim
boundary-vertices>>
2
<groups>
max-dims
nip
;