PETRONODE

3.7. Raster plotting

Statement raster. Plots a raster on slide.

raster (x, y, dx, dy, Mask, Source_x, Source_y, Source_dx, Source_dy)

    x (optional) - horizontal position. Default is 0.

    y (optional) - vertical position. Default is 0.

    dx (optional) - horizontal size. Default is from the x to the slide right boundary.

    dy (optional) - vertical size. Default is from the y to the slide bottom boundary.

    Mask (optional) - mask for the file search (spaces are not allowed). *.* is a default.

    Source_x (optional) - horizontal position of the raster file. Default is 0.

    Source_y (optional) - vertical position of the raster file. Default is 0.

    Source_dx (optional) - horizontal size of the source crop area. Default is from Source_x to the end of the longest line.

    Source_dy (optional) - vertical size of the source crop area. Default is from Source_y to the end of file.


Statement rasterover. Plots the raster on slide, preserving the content of pixels based on the background color.

rasterover (x, y, dx, dy, Mask, Source_x, Source_y, Source_dx, Source_dy, tColor, tTolerance)

    x (optional) - horizontal position. Default is 0.

    y (optional) - vertical position. Default is 0.

    dx (optional) - horizontal size. Default is from the x to the slide right boundary.

    dy (optional) - vertical size. Default is from the y to the slide bottom boundary.

    Mask (optional) - mask for the file search (spaces are not allowed). *.* is a default.

    Source_x (optional) - horizontal position of the raster file. Default is 0.

    Source_y (optional) - vertical position of the raster file. Default is 0.

    Source_dx (optional) - horizontal size of the source crop area. Default is from Source_x to the end of the longest line.

    Source_dy (optional) - vertical size of the source crop area. Default is from Source_y to the end of file.

    tColor (optional) - transparent colour in ARGB format, e.g. FFFFFFFF - white. White is a default.

    tTolerance (optional) - transparent colour tolerance (by each component). 0 is a default.

The following example generates a png file with color scale example

#

# Example 7.

# Demonstrates raster usage

#

slide (Example_07, 356, 150, png)

    bColor = FFAA00AA

raster (50,50,256,50,Scale*.*,0,0,256,50)

label (50,10,256,30)

    Text =Palette Example

    fSize = 16

    lSize = 2

    tPosition = center

The resulting image is like this:

Example_07