Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Bitmap/PL-I/bitmap.pli
Normal file
26
Task/Bitmap/PL-I/bitmap.pli
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* Declaration for an image, suitable for BMP files. */
|
||||
declare image(0:500, 0:500) bit (24) aligned;
|
||||
|
||||
image = '000000000000000011111111'b;
|
||||
/* Sets the entire image to red. */
|
||||
|
||||
image(10,40) = '111111110000000000000000'b;
|
||||
/* Sets one pixel to blue. */
|
||||
|
||||
declare color bit (24) aligned;
|
||||
color = image(20,50); /* Obtain the color of a pixel */
|
||||
|
||||
|
||||
|
||||
/* To allocate an image of size (x,y) */
|
||||
allocate_image: procedure (image, x, y);
|
||||
declare image (*, *) controlled bit (24) aligned;
|
||||
declare (x, y) fixed binary (31);
|
||||
|
||||
allocate image (0:x, 0:y);
|
||||
end allocate_image;
|
||||
|
||||
/* To use the above procedure, it's necessary to define */
|
||||
/* the image in the calling program thus, for BMP images: */
|
||||
|
||||
declare image(*,*) controlled bit (24) aligned;
|
||||
Loading…
Add table
Add a link
Reference in a new issue