Libraries |
|
Pixel image | Source Code |
|
|
Types | ||||
|
Function Summary | |||||
void |
| ||||
PRIMITIVE_WINDOW |
| ||||
pixelImage |
| ||||
pixelImage |
| ||||
void |
| ||||
pixelImage |
| ||||
void |
| ||||
pixelImage |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
pixelImage |
| ||||
pixelImage |
|
Function Detail |
setPixels
const proc: setPixels (inout pixelArray: imageLine, in integer: startColumn, in integer: stopColumn, in pixel: currentPixel)
-
Set pixels in an image line.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (ref pixelImage: image)
-
Create a new pixmap from a two-dimensional array of pixels. The array of pixels might come from a image file.
- Parameters:
- image - Pixel array with lines from top downward and columns from left to right.
- Returns:
- the created pixmap.
getPixelImage
const func pixelImage: getPixelImage (in PRIMITIVE_WINDOW: aWindow)
-
Get a two-dimensional array of pixels from aWindow. The array of pixels can be used to write the image to a file. This is used by the function str(aWindow, PPM):
image := getPixelImage(pixmap); for line range 1 to height do for pix range image[line] do col := pixelToColor(pix); stri &:= chr(col.redLight mdiv 256); stri &:= chr(col.greenLight mdiv 256); stri &:= chr(col.blueLight mdiv 256); end for; end for;
- Parameters:
- aWindow - Window or pixmap source to create the array of pixels.
- Returns:
- a pixel array with lines from top downward and columns from left to right.
getRotated90
const func pixelImage: getRotated90 (in pixelImage: image)
-
Return image rotated by 90 degrees counterclockwise.
rotate90
const proc: rotate90 (inout pixelImage: image)
-
Rotate the given image by 90 degrees counterclockwise.
getRotated180
const func pixelImage: getRotated180 (in pixelImage: image)
-
Return image rotated by 180 degrees.
getRotated270
const func pixelImage: getRotated270 (in pixelImage: image)
-
Return image rotated by 270 degrees counterclockwise.
rotate270
const proc: rotate270 (inout pixelImage: image)
-
Rotate the given image by 270 degrees counterclockwise.
mirrorHorizontally
const proc: mirrorHorizontally (inout pixelImage: image)
-
Mirror the given image horizontally.
mirrorVertically
const proc: mirrorVertically (inout pixelImage: image)
-
Mirror the given image vertically.
getRotated90AndMirroredHorizontally
const func pixelImage: getRotated90AndMirroredHorizontally (in pixelImage: image)
-
Return image rotated by 90 degrees counterclockwise and mirrored horizontally. This is the same as mirroring vertically and rotating by 90 degrees conterclockwise.
getRotated270AndMirroredHorizontally
const func pixelImage: getRotated270AndMirroredHorizontally (in pixelImage: image)
-
Return image rotated by 270 degrees counterclockwise and mirrored horizontally. This is the same as mirroring vertically and rotating by 270 degrees conterclockwise.
|
|