Syntax
| draw.ID.brushFrom.ID(FromX, FromY, FromW, FromH, ToX, ToY, Color, Alpha, AlphaChannel) |
Parameters
| INT | FromX, FromY, FromW, FromH | Area to copy in the source image
| | INT | ToX, ToY | Where to copy into the target image
| | COLOR | Color | Color to be used to draw pixels
| | INT | Alpha | Alpha (0-100)
| | INT | AlphaChannel | Optional. 0,1 or 2 for red, green or blue channel |
Return value
No value is returned.
Description
Copy a part of a bitmap into another bitmap using one of the color channels as an alpha channel.
Each pixel of the source image is mixed with the pixel of the target image depending on:
- the Alpha value specified in argument
- the level of the color of the specified Alpha channel in the source image.
This effect is useful for creating visual effects and animations. |
MioScript Sample Code
&myImage = loadImage("myImage.jpg")
draw.main.brushFrom.&myImage(
0,0,100,100,
0,0,
num.rgb(255,0,0),
0
)
draw.main.paint() |
|