Board index » delphi » Troubles drawing bitmaps on printer canvas.

Troubles drawing bitmaps on printer canvas.

I have troubles drawing bitmaps on printer canvas.
Code

  PROCEDURE Form1.PrintIt(Can:Canvas);
  begin
     R := GetMyRectangle;            {my procedure which
return rectangle for printing}
     Can.CopyMode := cmSrcCopy;      {prepare mode}
     Can.StretchDraw(R, TheBitmap);  {Draw bitmap}
     With R do Can.Rectangle(Left,Top,Right,Bottom); {Draw
rectangle around}
  end;

draw a graphics and rectangle around as aspected, if Can is
SomeForm.Canvas. If
This Canvas is Printer.Canvas, output is only rectangle.
More strange is, that
i cannot draw with lines, while ellipse and rectangle works
fine. Where is the
catch. Settings?

 

Re:Troubles drawing bitmaps on printer canvas.


I have troubles drawing bitmaps on printer canvas.
Code

  PROCEDURE Form1.PrintIt(Can:Canvas);
  begin
     R := GetMyRectangle;            {my procedure which
return rectangle for printing}
     Can.CopyMode := cmSrcCopy;      {prepare mode}
     Can.StretchDraw(R, TheBitmap);  {Draw bitmap}
     With R do Can.Rectangle(Left,Top,Right,Bottom); {Draw
rectangle around}
  end;

draw a graphics and rectangle around as aspected, if Can is
SomeForm.Canvas. If
This Canvas is Printer.Canvas, output is only rectangle.
More strange is, that
i cannot draw with lines, while ellipse and rectangle works
fine. Where is the
catch. Settings?

Other Threads