DrawRect
Draws a pixmap onto a part of another pixmap.
Syntax
-
DrawRect(bg, fg[, x[, y[, opacity[, bm]]]])
-
bg
is a pixmap -
fg
is a pixmap -
x
andy
are non-negative integers -
opacity
is a number in [0, 1] -
bm
is a string
-
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)
DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "burn")
DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "green")
DrawRect(ExampleData("rabbit"), ExampleData("harvestman"), 0, 0, 1, "negation")