X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Ftinyvg%2Ftinyvg.factor;h=8500bd8830a6ca2d870c08a24ac593ae002c97c4;hp=9407b937f8034b6bd1cf985f1178c18c6b609005;hb=1b09f93777bb30cffc7af9314a51446bf9b06408;hpb=e23bcdef804a1e6a96186b4bc97ad6f144c0846b diff --git a/extra/tinyvg/tinyvg.factor b/extra/tinyvg/tinyvg.factor index 9407b937f8..8500bd8830 100644 --- a/extra/tinyvg/tinyvg.factor +++ b/extra/tinyvg/tinyvg.factor @@ -3,7 +3,7 @@ USING: accessors colors combinators endian generalizations io io.encodings.binary io.files io.streams.byte-array kernel math -math.bitwise namespaces sequences ; +math.bitwise math.functions namespaces sequences ; IN: tinyvg @@ -38,7 +38,7 @@ ERROR: invalid-length n ; [ read1 255 /f ] 4 call-n ; : write-rgba-8888 ( rgba -- ) - >rgba-components [ 255 * >integer write1 ] 4 napply ; + >rgba-components [ 255 * round >integer write1 ] 4 napply ; : read-rgb-565 ( -- rgba ) 2 read le>