From 77b5df9d00862707bad60bd2aaaf466450bfef02 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 31 Jul 2022 12:23:43 -0500 Subject: [PATCH] morepretty --- src/pixie/images.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pixie/images.nim b/src/pixie/images.nim index ddc1153..68d5f67 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -1,6 +1,6 @@ import blends, bumpy, chroma, common, internal, simd, vmath -export Image, newImage, copy, dataIndex +export Image, copy, dataIndex, newImage const h = 0.5.float32 @@ -441,11 +441,15 @@ template getUncheckedArray( ): ptr UncheckedArray[ColorRGBX] = cast[ptr UncheckedArray[ColorRGBX]](image.data[image.dataIndex(x, y)].addr) -proc blitLine(a, b: ptr UncheckedArray[ColorRGBX], len: int, blender: Blender) {.inline.} = +proc blitLine( + a, b: ptr UncheckedArray[ColorRGBX], len: int, blender: Blender +) {.inline.} = for i in 0 ..< len: a[i] = blender(a[i], b[i]) -proc blitLineOverwrite(a, b: ptr UncheckedArray[ColorRGBX], len: int) {.inline.} = +proc blitLineOverwrite( + a, b: ptr UncheckedArray[ColorRGBX], len: int +) {.inline.} = copyMem(a[0].addr, b[0].addr, len * 4) proc blitLineNormal(a, b: ptr UncheckedArray[ColorRGBX], len: int) {.hasSimd.} =