This is an old version from the tos.hyp. The new is on GitHub!

HomeLine-ACopy raster formVDI

6.20 Seedfill

Name: »Seedfill«
Line-A number: $A00F
Syntax: See 'Bindings for seed_fill'
Description: This Line-A function fills an area with a colour, and so corresponds to the VDI function v_contourfill.

Passed in the first word of ptsin (ptsin[0] in C) is the X-coordinate and in the second word of ptsin (ptsin[1] in C) the Y-coordinate of the start point. Into the first word of intin (intin[0] in C) the mode word is written. If the mode word is greater than 0, it specifies the colour of the surround border up to which filling is to take place. If the mode word is smaller than 0, the surround border consists of all pixels that do not have the colour of the start point.

The following Line-A variables are used:
Variable Meaning
   
fill_abort This is the address of a function that is called at the end of each line. If this function returns the value 0 in d0, then the filling will be continued, else it will be broken off.
patptr Pointer to a field with 16-bit line patterns
patmsk Number of line patterns - 1. Depending on the y-coordinate one pattern will be selected now from the field of line patterns. The index of the line pattern used can be calculated with (y mod (patmsk + 1)). By specifying several line patterns and using multiple calls of this function for consecutive lines, it is easy to draw complex patterns as well.
multifill 0 when the pattern has only one plane, and 1 for several planes
wrt_mode Writing mode; the following modes are possible:
REPLACE 0 Replace
TRANS 1 Transparent (OR)
XOR 2 Inverse (XOR)
INVERS 3 Inverse Transparent (XOR with not(LN_MASK))
clip 1 if clipping is desired, else 0
xmn_clip X-coordinate of the top left corner of the clipping region, if clipping is switched on
ymn_clip Y-coordinate of the top left corner of the clipping region, if clipping is switched on
xmx_clip X-coordinate of the bottom right corner of the clipping region, if clipping is switched on
ymx_clip Y-coordinate of the bottom right corner of the clipping region, if clipping is switched on
Return value: The function does not return a result.
Availability: All TOS versions.
See also: Binding   v_contourfill

6.20.1 Bindings for seed_fill

Pure-C: void seed_fill( void ); /* WARNING: NOT supported ! */
Assembler: It is assumed that the intin and ptsin fields have already been entered in the Line-A parameter block.
movem.l   D0-D2/A0-A2,-(A7)  ; Save registers
move.l    pParamblk,A0       ; Pointer parameter block LINEA
move.l    (8,A0),A1          ; Address intin to A1
move.w    mode_wort,(A1)     ; Mode word to intin[0]
move.l    (12,A0),A1         ; Address ptsin to A1
move.w    x,(A1)             ; X-coordinate to ptsin[0]
move.w    y,(2,A1)           ; Y-coordinate to ptsin[1]
move.w    wmode,(36,A0)      ; Writing mode in LINEA.wrt_mode
move.w    patptr,(44,A0)     ; Line pattern in LINEA.patptr
move.w    patmsk,(48,A0)     ; Number of patterns in LINEA.patmsk
move.w    multifill,(50,A0)  ; Plane flag in LINEA.multifill
move.w    mode,(54,A0)       ; Clip mode in LINEA.clip
move.w    cx1,(56,A0)        ; Top left clip corner, X-coordinate in LINEA.xmn_clip
move.w    cy1,(58,A0)        ; Top left clip corner, Y-coordinate in LINEA.ymn_clip
move.w    cx2,(60,A0)        ; Bottom right clip corner, X-coordinate in LINEA.xmx_clip
move.w    cy2,(62,A0)        ; Bottom right clip corner, Y-coordinate in LINEA.ymx_clip
move.l    fill_abort,(118,A0); Abort function to LINEA.fill_abort
dc.w      $A00F              ; Line-A opcode
movem.l   (A7)+,D0-D2/A0-A2  ; Restore registers

HomeLine-ACopy raster formVDI