•  Back 
  •  Line-A Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Filev_contourfill()
$A00F - Seed Fill                                                    Line-A

Function      Seed fill an irregularly shaped region.

Parameters    INTIN points to a word value which specifies the mode of
              this function. If the value is negative, color mode is used.
              In color mode, the fill spreads from the initial point until
              it hits a color other than that of the initial point. If the
              value is positive, outline mode is used. It then is
              interpreted as the VDI color index value at which to stop
              the fill. PTSIN points to an array of two WORDs which specify
              the X and Y coordinates respectively of the inital fill
              point. CUR_WORK should point to a WORD array of 16 words with
              the sixteenth WORD being the fill color specified as a VDI
              color index. WRMODE specified the VDI writing mode of the fill
              (03). PATPTR and PATMSK define the fill pattern (as defined
              in 'Horizontal Line'). SEEDABORT points to a user routine
              which can abort the fill, if desired, when called. This
              routine is called once for each line of the fill. It should
              zero register D0 to continue or place a non-zero value in it
              to abort.

Example       ; Seed fill an area starting at ( 100, 100 )
Binding       ; in color mode with a clip region defined
              ; as the VDI rectangle ( 50, 50 ), ( 200, 200 ).

                 move.l   #intin,8(a5)        ; INTIN
                 move.l   #ptsin,12(a5)       ; PTSIN
                 move.l   #cur_work,-464(a5)  ; CUR_WORK
                 move.l   #seedabort,118(a5)  ; SEEDABORT
                 move.w   #0,36(a5)           ; WRMODE
                 move.l   #stipple,46(a5)     ; PATPTR
                 move.w   #0,50(a5)           ; PATMSK
                 move.w   #0,52(a5)           ; MFILL
                 move.w   #50,56(a5)          ; XMINCL
                 move.w   #50,58(a5)          ; YMINCL
                 move.w   #200,60(a5)         ; XMAXCL
                 move.w   #200,62(a5)         ; YMAXCL
                 .dc.w    $A00F

              seedabort:
                 moveq.l   #0, d0             ; Clear D0
                 rts

                 .data
              intin:
                 .dc.w    -1
              ptsin:
                 .dc.w    100, 100
              cur_work:
                 .dc.w    0, 0, 0, 0, 0, 0, 0, 0
                 .dc.w    0, 0, 0, 0, 0, 0, 0, 1
              stipple:
                 .dc.w    $AAAA
                 .dc.w    $5555

Comments      The clipping variables XMINCL, YMINCL, XMAXCL, and YMAXCL
              must always be set as they are interpreted regardless of the
              clipping flag.

See Also      v_contourfill()