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
Conversation
Just to be sure, this is also compatible with earlier versions of Swift, right? |
@twostraws I’m going to test it in Docker Action Items for this PR:
|
@twostraws Updated. I have confirmed this works in earlier versions of Swift |
Perfect - thank you very much! |
// `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. |
There was a problem hiding this comment.
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
returnsupper left, upper right, lower right, and lower left corner.
gdImageStringFT
returnslower left, lower right, upper right, and upper left corner.
The comment is about gdImageStringFT
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ❤️
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)