home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / mailpro / shadou.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-23  |  948 b   |  39 lines

  1. unit ShadoU;
  2.  
  3. interface
  4. uses StrnU, ColorIU, FastWr;
  5. procedure Shadow( X1,
  6.                   Y1,
  7.                   X2,
  8.                   Y2:       integer;   (* X & Y plus offsets *)
  9.                   Attr:     byte;
  10.                   Fill:     boolean);
  11.  
  12. implementation
  13.  
  14. procedure Shadow;
  15. var I:                      integer;
  16.     TopLine,
  17.     BottomLine,
  18.     TempLine:              string;
  19. begin
  20. TempLine := Strng(X2 - X1 - 1,#205);
  21. TopLine :=  #201 + TempLine + #187;
  22. BottomLine := #200 + TempLine + #188;
  23. FastWrite(TopLine, Y1, X1, Attr);
  24. FastWrite(BottomLine, Y2, X1, Attr);
  25. for I := Y1+1 to Y2-1 do
  26.     begin
  27.     FastWrite(#186, I, X1, Attr);
  28.     FastWrite(#186, I, X2, Attr);
  29.     end;
  30. if Fill then
  31.    begin
  32.    ColorIn( X1+1, Y1+1, X2-1, Y2-1, Attr);
  33.    ColorIn( X1+2, Y2+1, X2+1, Y2+1, $0000);  (* bottom in black *)
  34.    ColorIn( X2+1, Y1+1, X2+2, Y2+1, $0000);  (* side in black   *)
  35.    end;
  36. end;
  37.  
  38. end.
  39.