Handbook
Glossary
write-tinyvg ( tinyvg -- )
Vocabulary
tinyvg
Inputs
tinyvg
an
object
Outputs
None
Definition
USING:
accessors
combinators
endian
io
kernel
math
namespaces
sequences
;
IN:
tinyvg
:
write-tinyvg
( tinyvg -- )
[
tinyvg-magic
write
tinyvg-version
write1
{
[
scale>>
]
[
color-encoding>>
4
shift
bitor
]
[
coordinate-range>>
6
shift
bitor
write1
]
[
width>>
]
[
height>>
]
[
coordinate-range>>
{
2 1 4
}
nth
[
>le
write
]
curry
bi@
]
[
scale>>
2^
scale-factor
set
]
[
color-encoding>>
color-encoding
set
]
[
coordinate-range>>
coordinate-range
set
]
[
color-table>>
length
write-varuint
]
[
color-table>>
[
write-color
]
each
]
[
color-table>>
color-table
set
]
[
commands>>
write-commands
]
}
cleave
]
with-scope
;