diff --git a/docs/pixie.html b/docs/pixie.html index e5b7127..7c727a0 100644 --- a/docs/pixie.html +++ b/docs/pixie.html @@ -533,7 +533,7 @@ Strokes a polygon. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:51 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:22 UTC</small> </div> </div> </div> diff --git a/docs/pixie/blends.html b/docs/pixie/blends.html index 64a41cd..7bdba09 100644 --- a/docs/pixie/blends.html +++ b/docs/pixie/blends.html @@ -206,28 +206,28 @@ window.addEventListener('DOMContentLoaded', main); <dt><pre><a href="blends.html#Blender"><span class="Identifier">Blender</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">backdrop</span><span class="Other">,</span> <span class="Identifier">source</span><span class="Other">:</span> <span class="Identifier">ColorRGBA</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">ColorRGBA</span></pre></dt> <dd> - +Function signature returned by blender. </dd> <a id="Masker"></a> <dt><pre><a href="blends.html#Masker"><span class="Identifier">Masker</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">backdrop</span><span class="Other">,</span> <span class="Identifier">source</span><span class="Other">:</span> <span class="Identifier">uint8</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">uint8</span></pre></dt> <dd> - +Function signature returned by masker. </dd> <a id="BlenderSimd"></a> <dt><pre><a href="blends.html#BlenderSimd"><span class="Identifier">BlenderSimd</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">blackdrop</span><span class="Other">,</span> <span class="Identifier">source</span><span class="Other">:</span> <span class="Identifier">M128i</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">M128i</span></pre></dt> <dd> - +Function signature returned by blenderSimd. </dd> <a id="MaskerSimd"></a> <dt><pre><a href="blends.html#MaskerSimd"><span class="Identifier">MaskerSimd</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">blackdrop</span><span class="Other">,</span> <span class="Identifier">source</span><span class="Other">:</span> <span class="Identifier">M128i</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">M128i</span></pre></dt> <dd> - +Function signature returned by maskerSimd. </dd> @@ -310,7 +310,7 @@ Is there a blend masking function with SIMD support? <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:49 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:20 UTC</small> </div> </div> </div> diff --git a/docs/pixie/common.html b/docs/pixie/common.html index 92130b8..4bc716b 100644 --- a/docs/pixie/common.html +++ b/docs/pixie/common.html @@ -228,7 +228,7 @@ Converts a color from premultiplied alpha to straight alpha. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:49 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:20 UTC</small> </div> </div> </div> diff --git a/docs/pixie/fileformats/bmp.html b/docs/pixie/fileformats/bmp.html index c75b463..173d801 100644 --- a/docs/pixie/fileformats/bmp.html +++ b/docs/pixie/fileformats/bmp.html @@ -185,7 +185,7 @@ Encodes an image into the BMP file format. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:21 UTC</small> </div> </div> </div> diff --git a/docs/pixie/fileformats/jpg.html b/docs/pixie/fileformats/jpg.html index 41ec5eb..f701f58 100644 --- a/docs/pixie/fileformats/jpg.html +++ b/docs/pixie/fileformats/jpg.html @@ -185,7 +185,7 @@ Encodes Image into a JPEG data string. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:21 UTC</small> </div> </div> </div> diff --git a/docs/pixie/fileformats/png.html b/docs/pixie/fileformats/png.html index 5c34f95..70001c9 100644 --- a/docs/pixie/fileformats/png.html +++ b/docs/pixie/fileformats/png.html @@ -204,7 +204,7 @@ Encodes the mask data into the PNG file format. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:21 UTC</small> </div> </div> </div> diff --git a/docs/pixie/fileformats/svg.html b/docs/pixie/fileformats/svg.html index 777e3ce..dda48fd 100644 --- a/docs/pixie/fileformats/svg.html +++ b/docs/pixie/fileformats/svg.html @@ -174,7 +174,7 @@ Render SVG file and return the image. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:51 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:22 UTC</small> </div> </div> </div> diff --git a/docs/pixie/images.html b/docs/pixie/images.html index 6147038..4cf08d4 100644 --- a/docs/pixie/images.html +++ b/docs/pixie/images.html @@ -579,7 +579,7 @@ Shifts the target by offset. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:21 UTC</small> </div> </div> </div> diff --git a/docs/pixie/masks.html b/docs/pixie/masks.html index 90c6e6c..13ef1a4 100644 --- a/docs/pixie/masks.html +++ b/docs/pixie/masks.html @@ -357,7 +357,7 @@ A value of 0 stays 0. Anything else turns into 255. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:49 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:20 UTC</small> </div> </div> </div> diff --git a/docs/pixie/paints.html b/docs/pixie/paints.html index 50446f0..b5156f2 100644 --- a/docs/pixie/paints.html +++ b/docs/pixie/paints.html @@ -272,7 +272,7 @@ Angular gradient. <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:50 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:21 UTC</small> </div> </div> </div> diff --git a/docs/pixie/paths.html b/docs/pixie/paths.html index 2bfe4b1..34613d4 100644 --- a/docs/pixie/paths.html +++ b/docs/pixie/paths.html @@ -628,7 +628,7 @@ Return elements in pairs: (1st, 2nd), (2nd, 3rd) ... (n - 1, last). <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:51 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:22 UTC</small> </div> </div> </div> diff --git a/docs/theindex.html b/docs/theindex.html index 4ad2ce1..94898ad 100644 --- a/docs/theindex.html +++ b/docs/theindex.html @@ -917,7 +917,7 @@ window.addEventListener('DOMContentLoaded', main); <div class="twelve-columns footer"> <span class="nim-sprite"></span> <br/> - <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:15:51 UTC</small> + <small style="color: var(--hint);">Made with Nim. Generated: 2021-02-25 15:26:22 UTC</small> </div> </div> </div> diff --git a/src/pixie/blends.nim b/src/pixie/blends.nim index 0e47b06..7623207 100644 --- a/src/pixie/blends.nim +++ b/src/pixie/blends.nim @@ -35,8 +35,11 @@ type bmIntersectMask bmExcludeMask - Blender* = proc(backdrop, source: ColorRGBA): ColorRGBA - Masker* = proc(backdrop, source: uint8): uint8 + + Blender* = proc(backdrop, source: ColorRGBA): ColorRGBA ## Function signature + ## returned by blender. + Masker* = proc(backdrop, source: uint8): uint8 ## Function signature returned + ## by masker. when defined(release): {.push checks: off.} @@ -513,8 +516,10 @@ when defined(amd64) and not defined(pixieNoSimd): import nimsimd/sse2 type - BlenderSimd* = proc(blackdrop, source: M128i): M128i - MaskerSimd* = proc(blackdrop, source: M128i): M128i + BlenderSimd* = proc(blackdrop, source: M128i): M128i ## Function signature + ## returned by blenderSimd. + MaskerSimd* = proc(blackdrop, source: M128i): M128i ## Function signature + ## returned by maskerSimd. proc packAlphaValues*(v: M128i): M128i {.inline.} = ## Shuffle the alpha values for these 4 colors to the first 4 bytes