This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level.

16.96.11 - Obtaining information about the Selection 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)

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.

Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary
WinImages F/x, 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 6, Level A

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7
Page 269