Skip to content

Added Documentation for functions#61

Open
ryan-mangeno wants to merge 5 commits intogrimfang4:masterfrom
ryan-mangeno:master
Open

Added Documentation for functions#61
ryan-mangeno wants to merge 5 commits intogrimfang4:masterfrom
ryan-mangeno:master

Conversation

@ryan-mangeno
Copy link

Pull Request Description:

This pull request introduces documentation for functions related to font handling, text rendering, and memory management in the project. The added documentation is designed to make the code more understandable and easier to work with for future developers.

Changes:

  • FC_FreeFont: Added documentation explaining the function's role in freeing memory used by font objects, ensuring proper memory management.
  • FC_MakeRect: Documented the creation and return of a rectangle structure used in graphical operations.
  • FC_LoadFont: Provided clear documentation for loading TrueType fonts, including parameters for font size, color, and style.
  • FC_Draw: Added detailed explanations for rendering text at specified coordinates using the loaded font.
  • FC_MakeColor: Explained how to create an SDL_Color structure with RGBA values to define colors.
  • FC_FreeText: Documented the process of freeing memory used by text objects, promoting efficient memory management.

These updates aim to improve the clarity of the codebase and ensure that future contributors can easily understand and make use of these functions. I think this project is awesome and I hope it hear back about being able to get this pushed, thanks in advance!!

Copy link

@waterimp waterimp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anakin004 These additions look nice. I would also recommend adding these ones to the top of your submission to be more complete. Although they are mentioned in the little code sample at the top of the README.md in sample code, documenting them the same way for consistency wouldn't hurt. Just my two cents.

Recommended list of items to add to the top of your new section:

  • FC_CreateFont()
  • FC_LoadFont()
  • FC_Draw()
  • FC_FreeFont()

@ryan-mangeno
Copy link
Author

hey, @waterimp, hope I am not too late to this, but didn't see that you responded, sorry!, my username used to be anakin004, I want to make these changes right now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants