From 188f6e931e70340cdac1682fe3e6459ed0c736a5 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sat, 6 Aug 2022 15:30:12 -0500 Subject: [PATCH 1/4] add mix to bindings --- bindings/bindings.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/bindings.nim b/bindings/bindings.nim index 1563309..68537e0 100644 --- a/bindings/bindings.nim +++ b/bindings/bindings.nim @@ -306,6 +306,7 @@ exportProcs: scale(float32, float32) inverse(Matrix3) snapToPixels + mix(Color, Color, float32) writeFiles("bindings/generated", "Pixie") From 02b0a91ea18e78f77fe86747c5925aae42667d4e Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sat, 6 Aug 2022 20:49:55 -0500 Subject: [PATCH 2/4] dimension check --- src/pixie/fileformats/gif.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pixie/fileformats/gif.nim b/src/pixie/fileformats/gif.nim index 88d0d2e..1349758 100644 --- a/src/pixie/fileformats/gif.nim +++ b/src/pixie/fileformats/gif.nim @@ -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() From d9a427a72f2d72d4bb2820f406e9abd0748e6e28 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sat, 6 Aug 2022 22:12:17 -0500 Subject: [PATCH 3/4] unused --- src/pixie/blends.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pixie/blends.nim b/src/pixie/blends.nim index 26804ef..519a82b 100644 --- a/src/pixie/blends.nim +++ b/src/pixie/blends.nim @@ -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 From 2e59533628d8dfe9a45afbc81a336883e91599a9 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 7 Aug 2022 14:41:58 -0500 Subject: [PATCH 4/4] rm --- src/pixie/paths.nim | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pixie/paths.nim b/src/pixie/paths.nim index bf7908c..2e16005 100644 --- a/src/pixie/paths.nim +++ b/src/pixie/paths.nim @@ -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