Libraries
Pixel image Source Code
 previous   up   next 

Types
pixelImage
Two dimensional array of pixels.

pixelImage

const type: pixelImage

Two dimensional array of pixels.


Function Summary
void
setPixels (inout pixelArray: imageLine, in integer: startColumn, in integer: stopColumn, in pixel: currentPixel)
Set pixels in an image line.
PRIMITIVE_WINDOW
getPixmap (ref pixelImage: image)
Create a new pixmap from a two-dimensional array of pixels.
pixelImage
getPixelImage (in PRIMITIVE_WINDOW: aWindow)
Get a two-dimensional array of pixels from aWindow.
pixelImage
getRotated90 (in pixelImage: image)
Return image rotated by 90 degrees counterclockwise.
void
rotate90 (inout pixelImage: image)
Rotate the given image by 90 degrees counterclockwise.
pixelImage
getRotated180 (in pixelImage: image)
Return image rotated by 180 degrees.
void
rotate180 (inout pixelImage: image)
Rotate the given image by 180 degrees.
pixelImage
getRotated270 (in pixelImage: image)
Return image rotated by 270 degrees counterclockwise.
void
rotate270 (inout pixelImage: image)
Rotate the given image by 270 degrees counterclockwise.
void
mirrorHorizontally (inout pixelImage: image)
Mirror the given image horizontally.
void
mirrorVertically (inout pixelImage: image)
Mirror the given image vertically.
pixelImage
getRotated90AndMirroredHorizontally (in pixelImage: image)
Return image rotated by 90 degrees counterclockwise and mirrored horizontally.
pixelImage
getRotated270AndMirroredHorizontally (in pixelImage: image)
Return image rotated by 270 degrees counterclockwise and mirrored horizontally.

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.


rotate180

const proc: rotate180 (inout pixelImage: image)

Rotate the given image 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.



 previous   up   next