This is one difference between Delphi and Lazarus: In Delphi, a bitmap is initialized filled with white color, while in Lazarus it is filled with black. Since you are setting the Pen.Color to black you are drawing black on black... Either change Pen.Color to something different from black, or fill the bitmap immediately after creating:
PROCEDURE TFormVonKoch.DrawVonKoch;
VAR
Bitmap: TBitmap;
Curve : TVonKochCurve;
BEGIN
Bitmap := TBitmap.Create;
TRY
Bitmap.Width := ImageVonKoch.Width;
Bitmap.Height := ImageVonKoch.Height;
Bitmap.PixelFormat := pf24bit;
Bitmap.Canvas.Pen.Color := clBlack;
Bitmap.Canvas.Pen.Width := 1;
Bitmap.canvas.Brush.Color := clSilver;
Bitmap.canvas.FillRect(0, 0, Bitmap.Width, Bitmap.Height);
Curve := TvonKochCurve.Create(Bitmap.Canvas, Bitmap.Canvas.ClipRect);
[...]
The Assert code referring to printer pixels is not correct. As Thaddy noted, you do need the Printer.Handle - but not in every Widgetset the printer has a Handle... Since you are on Windows you could add unit OSPrinters to uses, and cast the Printer to TWinPrinter: Assert(GetDeviceCaps(TWinPrinter(Printer).Handle), LOGPIXELS...). Or much butter to do it in the Lazarus way: Query the x resolution from the XDPI property of the printer, likewise with the y resolution, and compare them directly:
Assert(printer.XDPI = printer.YDPI, 'Printer pixels are not square');
General comment on the code:
I see that your uses clause contains both Windows and LCLIntf/LCLType. This could lead to conflicts because LCLIntf and LCLType are the "same" (well: almost...) as the Windows unit but are valid for all platforms. Simply remove the Windows unit, as well as the Messages unit (the cross-platform counterpart is LMessages). However, after removal of Windows your code will not compile any more since the TRect type is no longer declared - you must add unit Types to used to fix this.