Colour pinstripe/Display: Difference between revisions
Content deleted Content added
Add Plain English |
|||
Line 1,084: | Line 1,084: | ||
(prinl 255) |
(prinl 255) |
||
(for Y Ppm (for X Y (apply wr X))) ) )</lang> |
(for Y Ppm (for X Y (apply wr X))) ) )</lang> |
||
=={{header|Plain English}}== |
|||
<lang plainenglish>To run: |
|||
Start up. |
|||
Clear the screen. |
|||
Imagine a box with the screen's left and the screen's top and the screen's right and the screen's bottom divided by 4. |
|||
Make a color pinstripe given 1 pixel and the box. |
|||
Draw the color pinstripe. |
|||
Draw the next color pinstripe given the color pinstripe. |
|||
Draw the next color pinstripe given the color pinstripe. |
|||
Draw the next color pinstripe given the color pinstripe. |
|||
Refresh the screen. |
|||
Wait for the escape key. |
|||
Shut down. |
|||
A color pinstripe has a width and a box. |
|||
To make a color pinstripe given a width and a box: |
|||
Put the width into the color pinstripe's width. |
|||
Put the box into the color pinstripe's box. |
|||
To draw a color pinstripe: |
|||
Put the color pinstripe's box into a bound box. |
|||
Put the color pinstripe's width into a width. |
|||
Imagine a box with the bound's left and the bound's top and the width and the bound's bottom. |
|||
Put the bound's right divided by the width into an amount. |
|||
Loop. |
|||
If a counter is past the amount, exit. |
|||
Draw and fill the box with the black color. Move the box right the width. |
|||
Draw and fill the box with the red color. Move the box right the width. |
|||
Draw and fill the box with the green color. Move the box right the width. |
|||
Draw and fill the box with the blue color. Move the box right the width. |
|||
Draw and fill the box with the magenta color. Move the box right the width. |
|||
Draw and fill the box with the cyan color. Move the box right the width. |
|||
Draw and fill the box with the yellow color. Move the box right the width. |
|||
Draw and fill the box with the white color. |
|||
Repeat. |
|||
To draw the next color pinstripe given a color pinstripe: |
|||
Add 1 pixel to the color pinstripe's width. |
|||
Move the color pinstripe's box down the color pinstripe's box's height. |
|||
Draw the color pinstripe.</lang> |
|||
=={{header|PureBasic}}== |
=={{header|PureBasic}}== |