note 95536 deleted from function.ps-setflat by danbrown

From: Date: Thu, 07 Jan 2010 18:33:28 +0000
Subject: note 95536 deleted from function.ps-setflat by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164761@lists.php.net to get a copy of this message
Note Submitter: wampler dot chris at gmail dot com ---- The valid range for the value parameter in the source code is 0.2 < val < 100.0 source executes the C function call ps_printf(p, "%f setflat\n", value); which places the 'setflat' postscript directive in the output file From http://atrey.karlin.mff.cuni.cz /~milanek/PostScript/Reference/PSL2s.html num setflat - sets the flatness parameter in the graphics state to num, which must be a positive number. This controls the accuracy with which curved path segments are to be rendered on the raster output device by operators such as stroke, fill, and clip. Those operators render curves by approximating them with a series of straight line segments. "Flatness" is an informal term for the error tolerance of this approximation; it is the maximum distance of any point of the approximation from the corresponding point on the true curve, measured in output device pixels. If the flatness parameter is large enough to cause visible straight line segments to appear, the result is unpredictable. The purpose of setflat is to control the accuracy of curve rendering, not to draw inscribed polygons. The choice of flatness value is a trade-off between accuracy and execution efficiency. Very small values (less than 1 device pixel) produce very accurate curves at high cost, because enormous numbers of tiny line segments must be produced. Larger values produce cruder approximations with substantially less computation. A default value of the flatness parameter is established by the device setup routine for each raster output device. This value is based on characteristics of that device and is the one suitable for most applications. The acceptable range of values for num is 0.2 to 100. Values outside this range are forced into range without error indication. setflat sets a graphics state parameter whose effect is device dependent. It should not be used in a page description that is intended to be device independent.

« previous php.notes (#164761) next »