From fce9f12147b4d5c0f9a28d292b882cdddd27c00a Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 3 Dec 2020 21:45:25 -0600 Subject: [PATCH] add links to blend formula sources --- src/pixie/images.nim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pixie/images.nim b/src/pixie/images.nim index e02b040..7c1c3d7 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -1,4 +1,4 @@ -import chroma, blends, vmath, common +import chroma, blends, vmath, common, system/memory type Image* = ref object @@ -70,11 +70,9 @@ proc `[]=`*(image: Image, x, y: int, rgba: ColorRGBA) {.inline.} = proc fill*(image: Image, rgba: ColorRgba) = ## Fills the image with a solid color. - if rgba == rgba(0, 0, 0, 0): - zeroMem(image.data[0].addr, image.data.len * 4) - else: - for c in image.data.mitems: - c = rgba + nimSetMem(image.data[0].addr, cast[int32](rgba), image.data.len) + # for c in image.data.mitems: + # c = rgba proc invert*(image: Image) = ## Inverts all of the colors and alpha.