AngusJohnson / Image32

An extensive 2D graphics library written in Delphi Pascal
Boost Software License 1.0
137 stars 31 forks source link

Documentation Examples Not Working #78

Closed LingamYoni closed 3 months ago

LingamYoni commented 3 months ago

Hello, I've been following the documentation examples provided at the following links: http://www.angusj.com/image32/Docs/QuickStart.htm http://www.angusj.com/image32/Docs/Units/Img32.Extra/Routines/Draw3D.htm Unfortunately, none of these examples work as expected because the methods and functions mentioned seem to be unknown or missing. I am particularly interested in drawing the 3D text as shown in the image at http://www.angusj.com/image32/Images/text_3D.png. Could you please provide guidance on how to achieve this?

Thank you for your assistance.

AngusJohnson commented 3 months ago

Thank you for the feedback. I've just checked all the sample code in QuickStart and I have found 2 errors that I have now fixed. And the code on the Draw3D webpage was indeed very out of date and that has been updated too.

LingamYoni commented 3 months ago

In the documentation, the method FontManager.Load('Impact', 800) is mentioned, but the method declaration for TFontManager.Load only includes a single parameter:

function TFontManager.Load(const fontName: string): TFontReader;

Could you please clarify what the 800 parameter represents in the context of FontManager.Load('Impact', 800)? The method signature does not seem to support this additional parameter.

Additionally, the following lines in the documentation are likely incorrect:

// Instruct the font manager to load 
// the Windows' Impact TTF font
FontManager.Load('Impact', 800);
// and then get the TFontReader for this font
impactFont := FontManager.GetFont('Impact');

These lines might need to be combined into a single line:

impactFont := FontManager.Load('Impact');

since the GetFont method does not exist in FontManager.

Thank you!

AngusJohnson commented 3 months ago

Could you please clarify what the 800 parameter represents

Font Weight 😁.

since the GetFont method does not exist in FontManager.

It does exist in FontManager, it just hasn't until now made it into the documentation 😜.

https://www.angusj.com/image32/Docs/Units/Img32.Text/Classes/TFontManager/Methods/Load.htm

LingamYoni commented 3 months ago

In the latest available release of Image32 version 4.3 on GitHub, the GetFont method is missing from FontManager. Additionally, the FontManager.Load method is only available with a single parameter.

Also, it might be time for an updated release. Your website's Overview page proudly proclaims version 4.4, but it appears to be a phantom release. 👻

Latest Version: 4.4
Last Update: 2 May 2024

Could we get the real version 4.4 to match the site? 🙏

Thanks a bunch!

AngusJohnson commented 3 months ago

In the latest available release of Image32 version 4.3 on GitHub, the GetFont method is missing from FontManager.

https://github.com/AngusJohnson/Image32/blob/2285272ecca9bfbd50481f0cf5a45f2f1e351b4b/source/Img32.Text.pas#L281

Additionally, the FontManager.Load method is only available with a single parameter.

https://github.com/AngusJohnson/Image32/blob/2285272ecca9bfbd50481f0cf5a45f2f1e351b4b/source/Img32.Text.pas#L282-L284

LingamYoni commented 3 months ago

Dear @AngusJohnson ,

Please read carefully – this is about the latest available release of Image32 version 4.3 on GitHub.

In this release, the GetFont method is missing from FontManager. Additionally, the FontManager.Load method is only available with a single parameter: s

AngusJohnson commented 3 months ago

Please read carefully – this is about the latest available release of Image32 version 4.3 on GitHub.

I'm well aware that the "released" version is well out of date. However, surely you (and most developers who download from GitHub) understand that if things aren't working as expected, then first thing to do is to download the latest repository revision. I write this stuff as a hobby, and if I had plenty of time, yes I would love to update the latest revision more frequently. However, as it happens I'm very occupied with other things, and so I have to prioritise what I believe is most important with the time I do allocate to supporting this library. And ISTM that most people would prefer bug fixes in the repository over frequently updated "releases".

LingamYoni commented 3 months ago

Dear Angus,

Thank you so much for your response and for all the incredible work you do on this library! 😊

I completely understand that keeping the "released" version up to date isn't always possible, especially when you're doing this as a hobby and have other priorities. I truly appreciate the time and effort you put into fixing bugs and maintaining the repository.

Rest assured, I do download the latest repository revisions when things aren't working as expected. My intention with the previous message was simply to point out a small discrepancy, nothing more.

Again, thank you for your dedication and hard work. It means a lot to those of us who rely on this library.

Best regards