Pinstripe/Printer: Difference between revisions

From Rosetta Code
Content added Content deleted
(a series of)
(After the first inch of printing)
Line 3: Line 3:
The task is to demonstrate the creation of a series of 1 pixel wide vertical pinstripes with a sufficient number of pinstripes to span the entire width of the page (except for the last pinstripe). The pinstripes should alternate one pixel white, one pixel black.
The task is to demonstrate the creation of a series of 1 pixel wide vertical pinstripes with a sufficient number of pinstripes to span the entire width of the page (except for the last pinstripe). The pinstripes should alternate one pixel white, one pixel black.


After the first inch of printing, we switch to a wider 2 pixel wide vertical pinstripe pattern, alternating two pixels white, two pixels black.
After the first inch of printing, we switch to a wider 2 pixel wide vertical pinstripe pattern. alternating two pixels white, two pixels black. We then switch to 3 pixel wide for the next inch, and then 4 pixel wide, etc. This trend continues for the entire length of the page (or for 12 inches of run length in the case of a printer using continuous roll stationery). After printing the test pattern the page is ejected (or the test pattern is rolled clear of the printer enclosure, in the case of continuous roll printers).

We then switch to 3 pixel wide for the next inch, and then 4 pixels wide for the 4th inch.

The rest of the page is left blank and the page is ejected.


[[Category:Test card]]
[[Category:Test card]]

Revision as of 23:01, 10 June 2011

Pinstripe/Printer is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The task is to demonstrate the creation of a series of 1 pixel wide vertical pinstripes with a sufficient number of pinstripes to span the entire width of the page (except for the last pinstripe). The pinstripes should alternate one pixel white, one pixel black.

After the first inch of printing, we switch to a wider 2 pixel wide vertical pinstripe pattern. alternating two pixels white, two pixels black. We then switch to 3 pixel wide for the next inch, and then 4 pixel wide, etc. This trend continues for the entire length of the page (or for 12 inches of run length in the case of a printer using continuous roll stationery). After printing the test pattern the page is ejected (or the test pattern is rolled clear of the printer enclosure, in the case of continuous roll printers).