Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | draw.ID.brushFrom.ID SEARCH    

  Functions
draw.ID.brushFrom.ID
draw.ID.copyFrom.ID
draw.ID.copyMode
draw.ID.ellipse
draw.ID.getPixel
draw.ID.height
draw.ID.isEgual.ID
draw.ID.line
draw.ID.load
draw.ID.paint
draw.ID.pixelFormat
draw.ID.polygon
draw.ID.rect
draw.ID.rotate.sourceID
draw.ID.save
draw.ID.setPixel
draw.ID.size
draw.ID.text.ex
draw.ID.text.ex.getWidth
draw.ID.width
draw.isEgual.X
draw.isEgual.Y
draw.mem.create
draw.mem.createFromFile
draw.mem.delete
draw.mem.exists
draw.mx.deform
draw.mx.effects

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
draw.ID.brushFrom.ID

Language: MioScript
Product: MioFactory


Syntax

draw.ID.brushFrom.ID(FromX, FromY, FromW, FromH, ToX, ToY, Color, Alpha, AlphaChannel)


Parameters

INTFromX, FromY, FromW, FromHArea to copy in the source image
INTToX, ToYWhere to copy into the target image
COLORColorColor to be used to draw pixels
INTAlphaAlpha (0-100)
INTAlphaChannelOptional.
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()