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


General Masking (selection) Script Commands

HFMASK (harden feathered mask regions)

This command causes all non-zero mask elements (1-255) to become 255 (fully selected.)

MASKRECT(x1,y1,x2,y2,value)

Fills a rectangle in the mask with value. x1,y1,x2,y2 are sorted and limited to the mask by WinImages F/x area before being used. Does not affect mask elements that the rectangle does not overlap.

NFMASK (no feathered mask regions)

This command causes all non-255 mask elements (0-254) to become 0 (fully deselected.)

a=FEATHERMASK(distance_x_10[0-200]))

This command will feather the current mask. The parameter is in 10ths of a pixel.

a=EXPAND(pixels,refeather)

This will enlarge the current mask around all of its boundaries. Enlargement is not exact, and in particular, around corners changes in mask shape can occur. The enlarged mask is entirely "hard" if refeather is zero, that is, there are no soft pixels in it anywhere. If you would like a soft edge, supply a refeather value in 10ths of pixels.

a=CONTRACT(pixels,refeather)

This will enlarge the current mask around all of its boundaries. Contraction is not exact, and in particular, around corners changes in mask shape can occur. The contracted mask is entirely "hard" if refeather is zero, that is, there are no soft pixels in it anywhere. If you would like a soft edge, supply a refeather value in 10ths of pixels.

INVERTMASK

This inverts the entire current selection.

INVERTSEL

This inverts only the portion of the mask that was at least partially selected. Areas that were not already selected (0) are not inverted.

a=SETMASK(value[0-255])

Sets the entire mask to the passed value.

a=SETSEL(value[0-255])

Sets only the area of the mask that was at least partially selected. Areas that were not already selected (0) are not set.

MASKCHANGED

If you change the contents of the mask yourself using the PUTM() command, you must, prior to using the mask (any call to an operator uses the mask) call MASKCHANGED. This allows WinImages F/x to adjust its internal masking operations to account for the changes you made. Changes made with other mask operations such as POPMASK and SMASKCOMBINE take care of this issue and you don't have to call MASKCHANGED in those cases unless you did indeed change the mask yourself using PUTM().

a=PUTM(x,y,value[0-255]) This allows you to set values in the mask, thus adjusting the selection. 0 is completely deselected, and 255 is fully selected. Values in between represent partially selected mask regions. Don't write outside the extents of the image,use 0 to the image height and width, minus one. Use GETXW and GETYW to retreive image extents.

a=GETTM(x,y) This allows you to retrieve values from the mask. 0 is completely deselected, and 255 is fully selected. Values in between represent partially selected mask regions. Don't read outside the extents of the image, use 0 to the image height and width, minus one. Use GETXW and GETYW to retreive image extents.


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

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