Anonymous user
Bitmap/Bézier curves/Cubic: Difference between revisions
→[[Bitmap/Bézier_curves/Cubic#ALGOL 68]]: updated layout
(→[[Bitmap/Bézier_curves/Cubic#ALGOL 68]]: updated layout) |
|||
Line 58:
{{trans|Ada}}
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - one minor extension to language used - PRAGMA READ, similar to C's #include directive.}}
{{works with|ALGOL 68G|Any - tested with release
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of '''
'''File: prelude/Bitmap/Bezier_curves/Cubic.a68'''<lang algol68># -*- coding: utf-8 -*- #
cubic bezier OF class image :=
Line 87:
END # cubic bezier #;
SKIP</lang>'''File: test/Bitmap/Bezier_curves/Cubic.a68'''<lang algol68>#!/usr/bin/a68g --script #
# -*- coding: utf-8 -*- #
The following test▼
PR READ "prelude/Bitmap.a68" PR; # c.f. [[rc:Bitmap]] #
PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; # c.f. [[rc:Bitmap/Bresenhams_line_algorithm]] #
PR READ "prelude/Bitmap/Bezier_curves/Cubic.a68" PR;
▲# The following test #
test:(
REF IMAGE x = INIT LOC[16,16]PIXEL;
(fill OF class image)(x, (white OF class image));
(cubic bezier OF class image)(x, (16, 1), (1, 4), (3, 16), (15, 11), (black OF class image), EMPTY);
(print OF class image) (x)
<pre>
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|