Algosim documentation: DrawRect

DrawRect

Draws a pixmap onto a part of another pixmap.

Syntax

Description

DrawRect(bg, fg, x, y, opacity, bm) draws the pixmap fg onto bg with the top-left corner of fg at coordinates (x, y) in bg. fg is drawn with opacity opacity and the blend mode named bm.

If omitted, x and y default to 0, opacity to 1.0, and bm to "normal".

Examples

DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 0.5)

Image 1

DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "burn")

Image 2

DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "green")

Image 3

DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "negation")

Image 4

See also