XEROX FILLREGION 2 4 1 FILLREGION 1 4 By: Mike Bird (Inference Corp., Los Angeles, CA) Jim Wogulis (Wogulis@ICS.UCI.EDU) Greg Wexler (Wexler.pasa@Xerox) INTRODUCTION The Fillregion package provides a function which will allow the user to "fill in" arbitrary regions of a bitmap or window with a shade or bitmap (or any valid shade argument to BITBLT).. The regions must be defined by a black or white outline. There are two functions provided to the user: FILL.REGION and AUTO.FILL. (FILL.REGION window.or.bm interior.pos shade) [Function] window.or.bm : Must be either a window or bitmap otherwise an error occurs. interior.pos : Must be a position within window.or.bm that is within the interior of the region to be filled. shade : Shade can be any valid shade argument that BITBLT will accept. This will return the window.or.bm with the specified region filled in. The region to be filled is determined by the pixel specified at interior.pos. If the pixel is black, all the connected black regions will be shaded, otherwise, if the pixel is white, all the connected white region will be filled. If the user aborts the function before completion, the orginal window.or.bm will be restored. (AUTO.FILL shade) [Function] shade : Shade can be any valid shade argument that BITBLT will accept. With your mouse pointing inside the appropriate region in a window, this function will fill in the region with the shade specified. This package only works for one bit per pixel bitmaps, color is not supported. Example: (AUTO.FILL 1234) ???xx8x8x88888888888x8?xx8~|x<xpppp?pp>?p<pxx~xxxppxp|?p<|p~xx?8>8|88<<>?????|?|>0< < 88p<px<px<?<|x?8<<?0<<8<x8>x||x?x<x<|?<<x<<xxp?<?<?8xx?results in: ???wwwwxpqwwwwww|xȈpqwwwwx>x9>?w|w<ȉxpwpwȉp?pxwȉ<>wwwwww>>|yywwwwwwww<Ȉwwwwwww||x=wwwwwpww興www?wwwxx=?wwwwwpw~<||><wwwwwww|pwwwwwwwwwwȈwwwwwwwww興?wwwwwwww<?wwwwww?wwwwwwwwwwwww興wwwwwwwww<=wwwwwwx興?wwwwww|Ȉq|wwwwwwwȼ808xwwwwww<??~wwwwwȈp>pypwwwwwp8<x=8www~wxȏ舸=8y8www}wwxȽȋ=?xǑ9pwwywwwp舏舟p>wwwwwwxx=y?w?wwwwx>x|qwwww興~Ȟ|? Comments and suggetions are welcome. (LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 93) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(((8( (8D PAGEHEADING RUNNINGHEAD MODERN TERMINAL MODERN  TIMESROMAN TERMINAL  HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   2"  ?!   A c D     D   BMOBJ.GETFN3 TIMESROMAN   BMOBJ.GETFN3% Vz