Error in Scanline example in lazarus/Version/examples/scanline (from years...)
- Lazarus/FPC Version: <Lazarus 3.4 (rev Unversioned directory) FPC 3.2.2>
- Operating System: <x86_64-linux-gtk2>
- CPU / Bitness: <64>
What happens
N/A
What did you expect
Someone to read the beginning of /usr/share/lazarus/3.4.0/examples/scanline, and correct the following :
one can read, lines 22-23 of unit1.pas :
This example demonstrates how to
- create an image with an internal format similar to Delphi''s **pf24bit**
and then, line 79 :
// create an image with a format similar to Delphi''s **pf32bit**
So, where is the truth ? 24 or 32 ?
Then, lines 115 and 116 :
// LineStart is pointer to the start of a scanline with the following format:
// **4 bytes** per pixel. First byte is blue, second green, third is red.
So I ask : where is the missing fourth byte ?
And finally, one can read :
line 121 : // fill line with **gray**
line 123 : PByte(LineStart)[i]:=0; // set red, green and blue to 0 (i.e. **black**)
I'm lost...
(of course, the image is black with a diagonal red line)
Steps to reproduce
N/A
Thanks,