Handbook
Glossary
write-instruction ( instruction -- )
Vocabulary
tinyvg
Inputs
instruction
an
object
Outputs
None
Definition
IN:
tinyvg
GENERIC:
write-instruction
( instruction -- )
Methods
USING:
accessors
combinators
tinyvg
;
M:
arc-circle
write-instruction
{
[
4
write-tag
]
[
write-arc
]
[
radius>>
write-unit
]
[
target>>
write-point
]
}
cleave
;
USING:
accessors
combinators
tinyvg
;
M:
arc-ellipse
write-instruction
{
[
5
write-tag
]
[
write-arc
]
[
radius-x>>
write-unit
]
[
radius-y>>
write-unit
]
[
rotation>>
write-unit
]
[
target>>
write-point
]
}
cleave
;
USING:
tinyvg
;
M:
close-path
write-instruction
6
write-tag
;
USING:
accessors
combinators
tinyvg
;
M:
cubic-bezier
write-instruction
{
[
3
write-tag
]
[
control0>>
write-point
]
[
control1>>
write-point
]
[
point1>>
write-point
]
}
cleave
;
USING:
accessors
kernel
tinyvg
;
M:
diagonal-line
write-instruction
[
0
write-tag
]
[
position>>
write-point
]
bi
;
USING:
accessors
kernel
tinyvg
;
M:
horizontal-line
write-instruction
[
1
write-tag
]
[
x>>
write-unit
]
bi
;
USING:
accessors
kernel
tinyvg
;
M:
quadratic-bezier
write-instruction
[
7
write-tag
]
[
control>>
write-point
]
[
point1>>
write-point
]
tri
;
USING:
accessors
kernel
tinyvg
;
M:
vertical-line
write-instruction
[
2
write-tag
]
[
y>>
write-unit
]
bi
;