Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Image.renderText() in Xcode 12 beta 5 #32

Merged
merged 3 commits into from Aug 18, 2021
Merged

Conversation

mcritz
Copy link
Contributor

@mcritz mcritz commented Aug 17, 2021

Adding Image.renderText() is great work.
But the renderText method should pass pointers instead of values to gdImageStringFT. In fact, this causes compiler Errors in Xcode 12 Beta 5 (Swift 5.5).

This PR fixes these errors.

Additional info:
(swiftlang-1300.0.20.104 clang-1300.0.21.1)

@twostraws
Copy link
Owner

Just to be sure, this is also compatible with earlier versions of Swift, right?

@mcritz
Copy link
Contributor Author

mcritz commented Aug 17, 2021

@twostraws I’m going to test it in Docker

Action Items for this PR:

  • Confirm this works in earlier versions of Swift
  • More and better tests

@mcritz
Copy link
Contributor Author

mcritz commented Aug 18, 2021

@twostraws Updated. I have confirmed this works in earlier versions of Swift

@twostraws
Copy link
Owner

Perfect - thank you very much!

@twostraws twostraws merged commit bd14ec0 into twostraws:main Aug 18, 2021
// `gdImageStringFT` returns the text bounding box, specified as four
// points in the following order:
// lower left, lower right, upper right, and upper left corner.
// upper left, upper right, lower right, and lower left corner.
Copy link
Contributor

@zntfdr zntfdr Aug 23, 2021

Choose a reason for hiding this comment

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

Thank you for the update!

This edit is not correct:

  • renderText returns upper left, upper right, lower right, and lower left corner.
  • gdImageStringFT returns lower left, lower right, upper right, and upper left corner.

The comment is about gdImageStringFT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zntfdr @twostraws My apologies. I have a new patch ( #33 ) in to address the mistake.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mcritz Thank you for the quick patch ❤️

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.

None yet

3 participants