Libraries |
|
Draw | Source Code |
|
|
Function Summary | |||||
pixel |
| ||||
color |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
void |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
PRIMITIVE_WINDOW |
| ||||
array array pixel |
| ||||
void |
| ||||
color |
|
Function Detail |
screen
const proc: screen (in integer: width, in integer: height)
-
Open the default window (curr_win) with the given width and height.
point
const proc: point (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in color: col)
-
Draws a point with the color col to the window win at the position (x, y).
point
const proc: point (in integer: x, in integer: y, in color: col)
-
Draws a point with the color col to the current window curr_win at the position (x, y).
line
const proc: line (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: delta_x, in integer: delta_y, in color: col)
-
Draws a line with the color col to the window win. The line starts at (x, y) and ends at (delta_x, delta_y). The coordinates of the endpoint are measured relative to x, y.
line
const proc: line (in integer: x, in integer: y, in integer: delta_x, in integer: delta_y, in color: col)
-
Draws a line with the color col to the current window curr_win. The line starts at (x, y) and ends at (delta_x, delta_y). The coordinates of the endpoint are measured relative to x, y.
lineTo
const proc: lineTo (inout PRIMITIVE_WINDOW: win, in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws a line with the color col to the window win. The line starts at (x1, y1) and ends at (x2, y2). The coordinates of the endpoint are measured in absolute window coordinates.
lineTo
const proc: lineTo (in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws a line with the color col to the current window curr_win. The line starts at (x1, y1) and ends at (x2, y2). The coordinates of the endpoint are measured in absolute window coordinates.
lineToAngle
const proc: lineToAngle (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: length, in float: angle, in color: col)
-
Draws a line with the color col to the window win. The line starts at (x, y), has the given length and extends in the given angle.
lineToAngle
const proc: lineToAngle (in integer: x, in integer: y, in integer: length, in float: angle, in color: col)
-
Draws a line with the color col to the current window curr_win. The line starts at (x, y), has the given length and extends in the given angle.
rect
const proc: rect (inout PRIMITIVE_WINDOW: win, in integer: x1, in integer: y1, in integer: width, in integer: height, in color: col)
-
Draws a filled rectangle with the color col to the window win. The top left edge of the rectangle is at (x1, y1). The size of the rectangle is specified with width and height.
rect
const proc: rect (in integer: x, in integer: y, in integer: width, in integer: height, in color: col)
-
Draws a filled rectangle with the color col to the current window curr_win. The top left edge of the rectangle is at (x, y). The size of the rectangle is specified with width and height.
rectTo
const proc: rectTo (inout PRIMITIVE_WINDOW: win, in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws a filled rectangle with the color col to the window win. The top left edge of the rectangle is at (x1, y1) and the lower right edge is at (x2, y2).
rectTo
const proc: rectTo (in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws a filled rectangle with the color col to the current window curr_win. The top left edge of the rectangle is at (x1, y1) and the lower right edge is at (x2, y2).
box
const proc: box (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: width, in integer: height, in color: col)
-
Draws an empty rectangle with the color col to the window win. The top left edge of the rectangle is at (x, y). The size of the rectangle is specified with width and height.
box
const proc: box (in integer: x, in integer: y, in integer: width, in integer: height, in color: col)
-
Draws an empty rectangle with the color col to the current window curr_win. The top left edge of the rectangle is at (x, y). The size of the rectangle is specified with width and height.
boxTo
const proc: boxTo (inout PRIMITIVE_WINDOW: win, in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws an empty rectangle with the color col to the window win. The top left edge of the rectangle is at (x1, y1) and the lower right edge is at (x2, y2).
boxTo
const proc: boxTo (in integer: x1, in integer: y1, in integer: x2, in integer: y2, in color: col)
-
Draws an empty rectangle with the color col to the current window curr_win. The top left edge of the rectangle is at (x1, y1) and the lower right edge is at (x2, y2).
circle
const proc: circle (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: radius, in color: col)
-
Draws a circle with the color col to the window win. The circle has the given radius and its center is at (x, y).
circle
const proc: circle (in integer: x, in integer: y, in integer: radius, in color: col)
-
Draws a circle with the color col to the current window curr_win. The circle has the given radius and its center is at (x, y).
fcircle
const proc: fcircle (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: radius, in color: col)
-
Draws a filled circle with the color col to the window win. The circle has the given radius and its center is at (x, y).
fcircle
const proc: fcircle (in integer: x, in integer: y, in integer: radius, in color: col)
-
Draws a filled circle with the color col to the current window curr_win. The circle has the given radius and its center is at (x, y).
arc
const proc: arc (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: radius, in float: startAngle, in float: sweepAngle, in color: col)
-
Draws an arc with the color col to the window win. The arc has the given radius and its center is at (x, y). The arc begins at startAngle and spans over sweepAngle.
arc
const proc: arc (in integer: x, in integer: y, in integer: radius, in float: startAngle, in float: sweepAngle, in color: col)
-
Draws an arc with the color col to the current window curr_win. The arc has the given radius and its center is at (x, y). The arc begins at startAngle and spans over sweepAngle.
arc
const proc: arc (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in integer: radius, in float: startAngle, in float: sweepAngle, in integer: width, in color: col)
-
Draws an arc with the color col to the window win. The arc has the given radius and its center is at (x, y). The arc begins at startAngle and spans over sweepAngle.
arc
const proc: arc (in integer: x, in integer: y, in integer: radius, in float: startAngle, in float: sweepAngle, in integer: width, in color: col)
-
Draws an arc with the color col to the current window curr_win. The arc has the given radius and its center is at (x, y). The arc begins at startAngle and spans over sweepAngle.
pieslice
const proc: pieslice (in integer: x, in integer: y, in integer: radius, in float: startAngle, in float: sweepAngle, in color: col)
-
Draws a filled sector with color col to curr_win. The sector has the given radius and its center is at (x, y). The sector begins at startAngle and spans over sweepAngle.
clear
const proc: clear (inout PRIMITIVE_WINDOW: win, in color: col)
-
Clears the window win with the color col.
polyLine
const proc: polyLine (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in pointList: points, in color: col)
-
Draws lines with the color col to the window win. The lines connect the points and are drawn at the position (x, y).
polyLine
const proc: polyLine (in integer: x, in integer: y, in pointList: points, in color: col)
-
Draws lines with the color col to the current window curr_win. The lines connect the points and are drawn at the position (x, y).
fpolyLine
const proc: fpolyLine (inout PRIMITIVE_WINDOW: win, in integer: x, in integer: y, in pointList: points, in color: col)
-
Draws a filled polygon with the color col to the window win. The corners of the polygon are given with points. The polygon is drawn at the position (x, y).
fpolyLine
const proc: fpolyLine (in integer: x, in integer: y, in pointList: points, in color: col)
-
Draws a filled polygon with the color col to the current window curr_win. The corners of the polygon are given with points. The polygon is drawn at the position (x, y).
put
const proc: put (inout PRIMITIVE_WINDOW: destWindow, in integer: xDest, in integer: yDest, in PRIMITIVE_WINDOW: pixmap)
-
Put pixmap to the given position at destWindow. The top left edge of pixmap is put at (xDest, yDest).
- Parameters:
- destWindow - Destination Window.
- xDest - X-coordinate of the destination position.
- yDest - Y-coordinate of the destination position.
- pixmap - Source window to be put to the destination.
put
const proc: put (in integer: xDest, in integer: yDest, in PRIMITIVE_WINDOW: pixmap)
-
Put pixmap to the given position at the current window 'curr_win'. The top left edge of pixmap is put at (xDest, yDest).
- Parameters:
- xDest - X-coordinate of the destination position.
- yDest - Y-coordinate of the destination position.
- pixmap - Source window to be put to the destination.
put
const proc: put (inout PRIMITIVE_WINDOW: destWindow, in integer: xDest, in integer: yDest, in integer: width, in integer: height, in PRIMITIVE_WINDOW: pixmap)
-
Put a scaled pixmap to the given rectangle at destWindow. The top left edge of the destination rectangle is at (xDest, yDest).
- Parameters:
- destWindow - Destination Window.
- xDest - X-coordinate of the destination rectangle.
- yDest - Y-coordinate of the destination rectangle.
- width - Width of the destination rectangle.
- height - Height of the destination rectangle.
- pixmap - Source window to be scaled to the rectangle.
newPixmap
const func PRIMITIVE_WINDOW: newPixmap (in integer: width, in integer: height)
-
Create a new pixmap with the given width and height.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (in PRIMITIVE_WINDOW: sourceWin, in integer: left, in integer: upper, in integer: width, in integer: height)
-
Create a new pixmap with the given width and height from sourceWin. A rectangle with the upper left corner at (left, upper) and the given width and height is copied from sourceWin to the new pixmap. The rectangle may extend to areas outside of sourceWin. The rectangle areas outside of sourceWin are colored with black.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (in integer: left, in integer: upper, in integer: width, in integer: height)
-
Create a new pixmap with the given width and height from curr_win. A rectangle with the upper left corner at (left, upper) and the given width and height is copied from curr_win to the new pixmap. The rectangle may extend to areas outside of sourceWin. The rectangle areas outside of sourceWin are colored with black.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (in PRIMITIVE_WINDOW: sourceWin)
-
Create a new pixmap with the contents of sourceWin. The content of sourceWin is copied the new pixmap.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (in PRIMITIVE_WINDOW: sourceWin, in integer: left, in integer: upper, in integer: width, in integer: height, in color: background)
-
Create a new pixmap with the given width and height from sourceWin. A rectangle with the upper left corner at (left, upper) and the given width and height is copied from sourceWin to the new pixmap. The rectangle may extend to areas outside of sourceWin. The rectangle areas outside of sourceWin are colored with the given background color.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (in PRIMITIVE_WINDOW: sourceWin, in integer: left, in integer: upper, in integer: width, in integer: height, in integer: resultWidth, in integer: resultHeight, in color: background)
-
Create a new pixmap with the given resultWidth and resultHeight from sourceWin. A rectangle with the upper left corner at (left, upper) and the given width and height is copied from sourceWin. The rectangle may extend to areas outside of sourceWin. The rectangle areas outside of sourceWin are colored with the given background color. The copied rectangle is scaled to resultWidth and resultHeight and returned as new pixmap.
- Returns:
- the created pixmap.
getPixmap
const func PRIMITIVE_WINDOW: getPixmap (ref array array pixel: 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.
getPixelArray
const func array array pixel: getPixelArray (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 := getPixelArray(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.
setTransparentColor
const proc: setTransparentColor (in PRIMITIVE_WINDOW: pixmap, in color: col)
-
Sets the transparent color of a pixmap.
getPixelColor
const func color: getPixelColor (in PRIMITIVE_WINDOW: aWindow, in integer: x, in integer: y)
-
Retrieve the color at pixel position (x, y) from aWindow.
- Returns:
- the pixel color at position (x, y).
|
|