Merge pull request #495 from treeform/guzba

little things
This commit is contained in:
Andre von Houck 2022-08-08 11:42:17 -07:00 committed by GitHub
commit 14b79c85c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View file

@ -306,6 +306,7 @@ exportProcs:
scale(float32, float32)
inverse(Matrix3)
snapToPixels
mix(Color, Color, float32)
writeFiles("bindings/generated", "Pixie")

View file

@ -1,6 +1,6 @@
## Blending modes.
import chroma, common, std/math
import chroma, common
# See https://www.w3.org/TR/compositing-1/
# See https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_blend_equation_advanced.txt

View file

@ -105,6 +105,9 @@ proc decodeGif*(data: string): Gif {.raises: [PixieError].} =
pos += 9
if imageWidth > screenWidth or imageHeight > screenHeight:
raise newException(PixieError, "Invalid GIF frame dimensions")
if pos + localColorTableSize * 3 > data.len:
failInvalid()

View file

@ -270,7 +270,6 @@ proc transform*(path: Path, mat: Mat3) {.raises: [].} =
path.commands[0] = Move.float32
var i: int
# for command in path.commands.mitems:
while i < path.commands.len:
let kind = path.commands[i].PathCommandKind
inc i