Principle
A brush is an anyflo
object
used in conjunction with images in
palette mode.
When combined with the mouse (the default) is
displayed at the clicked point on the screen or on image id2 with the property
image brush(id1)=id2.
It may consist of:
a monocolor (default) or rectangle
or , with properties:
nbsp;
col
nbsp;
transp
nbsp;
texture
In program mode is displayed at the poi brush(id)=x,y.
It is necessary to do yes brush that brushes
are taken into account.
image(id1,id2)line(L)poi(x,y)adjust puis image brush(id)=id2.
It can be possibly managed by a neural network.
We can also cut out a rectangular window to make it a
texture brush,
or within a line by
image(id1,id2)line(L)poi(x,y)adjust then image brush(id)=id2.
brush
brush(id)
Sets a brush identifier id, type disk, color white ane
radius 12. Any single property may be set at the time:
brush(id)propr1(p1)propr(p2)...;
col
col brush(id)
Returnes the color of brush id (white default).
col brush(id)=r,g,b
Changes this color.
Options:
col(r1,g2,b1, r2,g2,b2): graduation between (r1,g1,b1) at center
and (r2,g2,b2) on edge.
Dynamic brush
When displayed on a dynamic image its footprint
continues to live diring time frames.
Mouse mode
They can "paint" directly (left click) in the bitmap graphic card or on an
image.
Programmable brush
As general objects anyflo they support all simple or
multiple, properties, trajectories
can be assigned to them, they can be considered individuals of
genetic populations, connect the outputs of
neural networks whose inputs can be connected to
sensors.
Notes:
It is necessary to do close brush(id)=1
to dissociate the brush of the mouse and join other anyflo commands.
To animate a brush with trajectories must define paths on each
point, even if there is one, by:
traj(ni)transf(p)vertex(num)brush(id);
It is necessary to do yes traj to make the trajectories taken
into account.
Example:
traj(100)tran(-200,0,0, 0,200,0, 200,0,0)ext(5,1,0)vertex(1)brush(1)period(-1);
Defines a path of travel through an arc of 100 points for point 1 of brush 1 with a period -1.
Neural brush
network brush(id)=idr
brush id is associated with neural network idr.
The brush captures an imageIc in a Motif convolution of it, which is passed as input to the network which gives an output Law
which is extended into an image Ie:
Ic ==>[ convolution]==> Motif ==>[Réseau]==> Loi ==>[extension]==> Ie
Ic has dimensions ray brush.
The extension algorithm is determined by:
local(0)brush(id)="f" where f() is a
function written in language anyflo, or:
local(0)brush(id)=num où num is the "case" of the function
EXEC_PINCEAU_C(struct Objet *p_obj, long num) of file utilb.c
Law is stored as meta brush property, the local function should return the image Ie
in the same property.
transp
transp brush(id)
Returnes the transparency of brush id (opaque default).
col brush(id)=t
Changes this transparency.
Options:
transp(t1, t2): graduation between (t1) at center
and (t2) on edge.
Multiple properties
type brush
Returns the type of brush id
disk brush(id)="ttt"
Changes this type:
disk
"disk": of size radius brush(id) brush.
rectangle
"rectangle": of size radius brush(id) brush.
line
"line": must be brush(id1)image(id2).
See also: