Page 215
Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>


Creating New Selections in your scripts

a=SELOVAL(x,y,xwidth,ywidth)

This over-rides the area selection the user made and creates an oval area selection as specified. Once used, the original area selection is discarded.

a=SELRECT(x1,y1,x2,xy)

This over-rides the area selection the user made and creates a rectangular area selection as specified. Once used, the original area selection is discarded. Note that the order of x1,x2 and y1,y2 does not matter; they are sorted before being used so that x1 and y1 are left and top, so you can supply them in any order. That means this produces legal rectangles:

10 xw = GETXW(0)
20 yw = GETYW(0)
30 FOR i=1 TO 100
40 x1 = RND()*xw
50 x2 = RND()*xw
60 y1 = RND()*yw
70 y2 = RND()*yw
80 a=SELRECT(x1,y1,x2,y2)
90 a=COLORFILL(RND()*255,RND()*255,RND()*255)
100 NEXT i
a=SETALPHAMASK(0/1) [returns previous value]

If set to one, masks will be combined with the alpha channel of an image or layer prior to any operator being applied. If set to zero, masks are generated using only the area selection, and operators will affect the entire selection regardless of the alpha channel of the image (though you might not see the effect, as the image may remain transparent there for many operations.)

For instance, to create a text effect in a transparent layer or image, you might create a colored area using colorfill with this set to 0 - that will create alpha where the selection exists; then, set it to 1 and all further operations will take place within the originally selected region.


Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>
Page 215

WinImages F/x, WinImages Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions

WinImages F/x Manual Version 7, Revision 5, Level B

HTML Documentation Management System © 1992-2007 Black Belt Systems