[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.5.4 TXTEXT Subfunction 4: Mask - random flipped dots

Syntax: TXTEXT 4 flipratio

Like subfunction 3, TXTEXT subfunction 4 takes one argument, a flipratio between 0 and 1.0. It first recalls the saved bounds for the last text written (see section TXTEXT Subfunction 1). Each pixel within these bounds is then flipped (ie, if white it becomes black, if black it becomes white(2)) with a probability of fillratio. Note that pixels not flipped are left as is. This creates an semi-inverted "flicker" effect on the existing image.

In the following testlist, the word `flick' is written into a picture, and then 50 different pictures are drawn, each with approximately 20% of the pixels within the text bounds flipped:

 
%X[txtext.xr]
%M2%C2
%I[1,1,160,100,flick]
%I[50,4,.2]
%K[2,51,3]

Here is the base picture (#1) and three examples of the generated pics (#2-50):

images/txtext09
images/txtext10
images/txtext11
images/txtext12



This document was generated by Usman Muzaffar on June, 28 2000 using texi2html