From abd211dfbe0b0daff5629f65973ade9ebd6fa731 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 23 Feb 2009 18:01:40 +0000 Subject: [PATCH] Some imp docs for subpixel rendering git-svn-id: svn://ultimatepp.org/upp/trunk@900 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- .../Painter/srcimp.tpp/SubpixelFiller$en-us.tpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/uppsrc/Painter/srcimp.tpp/SubpixelFiller$en-us.tpp b/uppsrc/Painter/srcimp.tpp/SubpixelFiller$en-us.tpp index 7e2547b6c..353ed6c66 100644 --- a/uppsrc/Painter/srcimp.tpp/SubpixelFiller$en-us.tpp +++ b/uppsrc/Painter/srcimp.tpp/SubpixelFiller$en-us.tpp @@ -8,10 +8,22 @@ topic ""; [s1;%- &] [s2;:SubpixelFiller`:`:Write`(int`):%- [@(0.0.255) void]_[* Write]([@(0.0.255) int]_[*@3 len]) &] -[s3; This function flushes the content of filtered subpixel buffer.&] -[s0; Important note: due to rounding errors during filtering, sometimes +[s3; This function writes the filtered subpixel buffer to RGBA output, +performing per`-channel (subpixel) alpha blending. Note that +it is only possible to do correct per`-channel blending when +target is opaque (a `=`= 255). If it is not, normal anti`-aliasing +is used, using average.&] +[s3; Important note: due to rounding errors during filtering, sometimes the subpixel value can be 257. This is remedied by using 257 instead of 256 in the pixel blending command.&] [s0; &] [s4; &] +[s1;%- &] +[s2;:SubpixelFiller`:`:RenderN`(int`,int`,int`):%- [@(0.0.255) void]_[* RenderN]([@(0.0.255) i +nt]_[*@3 val], [@(0.0.255) int]_[*@3 h], [@(0.0.255) int]_[*@3 n])&] +[s3; This function adds 1 `- 6 val values to filtered subpixel buffer +in single pass (6 is just enough needed for Render optimizations). +Case variants are created by adding shifted Render filtering +procedures.&] +[s4; &] [s0; ] \ No newline at end of file