(****************************************************************************) (* *) (* GSX Fill Module *) (* =============== *) (* This Module contains all area-related GSX functions, including some GDPs *) (* which provide fast drawing of often used graphic objects. *) (* *) (* 16.5.1988 Wolfgang Muees, Hagenring 22, 3300 Braunschweig *) (* *) (****************************************************************************) CONST hollow = 0; solid = 1; (* Available fill styles *) pattern = 2; hatch = 3; lines90 = 1; lines0 = 2; (* Available fill hatch styles *) lines45 = 3; lines135 = 4; cross = 5; xxx = 6; PROCEDURE FillPolygon ( Number : INTEGER; VAR Points ); (* Draw a polygon with Number points. *) BEGIN numPTS ( 9, Number, Points ); END; PROCEDURE FillBar ( X, Y , dX, dY : INTEGER ); (* Draw a bar with left lower egde at X, Y and width = dX, height = dY. *) BEGIN PTSIN[1].X := X; PTSIN[1].Y := Y; PTSIN[2].X := X+dX; PTSIN[2].Y := Y+dY; WITH CB DO BEGIN PINLEN := 2; ESCID := 1; END; simple ( 11 ); END; PROCEDURE FillPie ( X, Y, Radius, Startangle, Endangle : INTEGER ); (* Draw a pie with center point at X, Y and given Radius. Angles are [0..3600], and Startangle <= Endangle . *) BEGIN PTSIN[1].X := X; PTSIN[1].Y := Y; PTSIN[4].X := Radius; INTIN[1] := Startangle; INTIN[2] := Endangle; WITH CB DO BEGIN PINLEN := 4; IINLEN := 2; ESCID := 3; END; simple ( 11 ); END; PROCEDURE FillCircle ( X, Y, Radius : INTEGER );(* Draw a circle with center point at X, Y and given Radius. *) BEGIN PTSIN[1].X := X; PTSIN[1].Y := Y; PTSIN[3].X := Radius; WITH CB DO BEGIN PINLEN := 3; ESCID := 4; END; simple ( 11 ); END; PROCEDURE FillStyle ( Style : INTEGER ); (* Sets fill style. hollow is only outline, solid and pattern do what they mean, each pattern index is darker than index-1 , hatch generates the styles listed above. *) BEGIN oneINT ( 23, Style ); END; PROCEDURE FillIndex ( Index : INTEGER ); (* If Style = pattern, Index [1..6] generates a pattern, if Style = hatch, the same Index [lines90..xxx] generates a hatch style. *) BEGIN oneINT ( 24, Index ); END; PROCEDURE FillColor ( Color : INTEGER ); (* Set Color index for all fill operations. *) BEGIN oneINT ( 25, Color ); END;