Class new title: Form subclassof: Object fields: 'extent bits offset figure ground' declare: 'blankcursor brush over dotsetter aurora reverse aurorarunning SPARE black formmenu white color under ' asForm asInstance | t1 [t1 _ Stream new default. t1 nextPoint_ extent. t1 nextPoint_ offset. t1 nextword_ figure. t1 nextword_ ground. t1 nextString_ bits. t1 contents] bits [bits] bits: t1 [bits _ t1] black | t1 [for t1 to: bits length do [bits  t1 _ 0 - 1]] black: t1 [0  0  t1 and t1  extent  [dotsetter destbase_ bits. dotsetter destraster_ extent x + 15 / 16. dotsetter destx_ t1 x. dotsetter desty_ t1 y. dotsetter fill: storing color: black]] close copy | t1 [t1 _ Form new extent: extent. t1 bits: bits copy. t1] displayat: t1 effect: t2 clippedBy: t3 | t4 t5 t6 [t1 is: Point  [t4 _ Rectangle new origin: t1 extent: self extent. t4 bitsFromString: bits mode: t2 clippedBy: t3. aurorarunning  [user displayoffwhile [t6 _ t4 intersect: user screenrect. aurora destination: t6. aurora source: t6. aurora figure: figure. aurora ground: ground. aurora function: 1103. aurora doit. aurora function: 0. aurora doit. nil]]] t1 is: Path  [for t5 to: t1 length do [self displayat: t1  t5 effect: t2 clippedBy: t3]]] extent [extent] extent: t1 [extent _ t1. self extent: extent figure: 0 ground: 1 offset: 0  0] extent: t1 bits: t2 offset: t3 [extent _ t1. bits _ t2. offset _ t3] extent: t1 figure: t2 ground: t3 offset: t4 [extent _ t1. figure _ t2. ground _ t3. offset _ t4. bits _ String new: 2 * extent y * (extent x + 15 / 16)] figure [figure] figure: t1 [figure _ t1] fromImage: t1 [self extent: t1 extent. bits _ t1 rectangle bitsIntoString] fromInstance: t1 [extent _ t1 nextPoint. offset _ t1 nextPoint. figure _ t1 nextword. ground _ t1 nextword. bits _ t1 nextString] fromrectangle: t1 [self extent: t1 extent. bits _ t1 bitsIntoString] fromuser | t1 [t1 _ Rectangle new fromuser. self extent: t1 extent. bits _ t1 bitsIntoString] fromuserevenword | t1 [t1 _ Rectangle new fromuserevenword. self extent: t1 extent. bits _ t1 bitsIntoString] gray | t1 [for t1 to: bits length do [bits  t1 _ 10922]] ground [ground] ground: t1 [ground _ t1] height [extent y] hideData: t1 | t2 t3 [t2 _ String new: 12. t3 _ Stream new. t3 of: t2. t3 nextPoint_ extent. t3 nextPoint_ offset. t3 nextword_ figure. t3 nextword_ ground. t2] length [bits length] offset [offset  nil  [0  0] offset] offset: t1 [offset _ t1] pressCode [5] read: t1 | t2 t3 t4 t5 t6 t7 t8 t9 [t2 _ dp0 file: t1. t4 _ t2 nextword. t5 _ t2 nextword. extent _ t4  t5. t4 * t5 < 64000  [bits _ (Form new extent: extent) bits. t2 into: bits. t2 close] t2 close. user notify: 'too many bits to be a Form'] setfigure: t1 [figure _ figure + 1 \ 14. self displayat: t1 origin effect: 0 clippedBy: user screenrect] setground: t1 [ground _ ground + 1 \ 14. self displayat: t1 origin effect: 0 clippedBy: user screenrect] white | t1 [for t1 to: bits length do [bits  t1 _ 0]] width [extent x] write: t1 | t2 [t2 _ dp0 file: t1. t2 nextword_ self width. t2 nextword_ self height. t2 append: bits. t2 close]