Show a background pattern on the virtual paper

Top  Previous  Next

Show a background pattern on the virtual paper - but do not print this pattern:

 

var x,y : Integer;

   bit : TBitmap;

begin

if wppInPaintDesktop in PaintMode then

begin

   x := PageRect.Left;

   bit := Image1.Picture.Bitmap;

  while x<PageRect.Right do

  begin

    y := PageRect.Top;

    while y<PageRect.Bottom do

    begin

      toCanvas.Draw(x,y,bit);

      inc(y, bit.Height);

    end;

    inc(x, bit.Width);

  end;

end;

end;