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

4.1.0 #109

Merged
merged 10 commits into from
Dec 29, 2023
Merged

4.1.0 #109

merged 10 commits into from
Dec 29, 2023

Conversation

g0dkar
Copy link
Owner

@g0dkar g0dkar commented Dec 24, 2023

Disregard the name of the branch :P

4.1.0

After I merge this PR I'll release v4.1.0 with the main following changes:

Feel free to leave any suggestions, comments, nitpicks, etc.!

  • Introduces fixes and changes made by @ruicanas and @chphmh
  • Reduced the requirements for the library as a whole to Android SDK 7 and Java 8 (@Doomsdayrs)
  • A small change to the Android example to make it easier to detect any visual issues. Added a light background color to the QRCode View screen:

image

Once again, I have no words to how grateful I am to you all for using and contributing to the library ^^

Happy holidays, Merry Christmas, Happy New Year everyone!

@g0dkar g0dkar merged commit bae6330 into main Dec 29, 2023
1 check passed
@g0dkar g0dkar deleted the lower-android-sdk branch December 29, 2023 22:48
@chphmh
Copy link

chphmh commented Jan 8, 2024

Hello @g0dkar, thank you for introducing a fix for the problem I mentioned in #107!

I'm not sure if I understand it completely though: As far as I got it, in renderShaded() in line 284 if the QR code has a margin > 0, one big square should be drawn with marginColor that covers the whole QR code's background including the margin around the actual code cells?

if (margin > 0) {
val marginSquare = QRCodeSquare(
dark = false,
row = 0,
col = 0,
moduleSize = rawData.size,
squareInfo = QRCodeSquareInfo.margin(),
)
renderer(marginSquare.absoluteX(margin), marginSquare.absoluteY(margin), marginSquare, qrCodeGraphics)
}

Now with the new change in the renderer function used by render() in line 231 the margin rectangle that is drawn has the size margin,margin. Shouldn't it be the size of the whole QR code instead (the number that computeImageSize() calculates with size*cellSize+margin*2, or am I misunderstanding something here?

) { x, y, cellData, graphics ->
if (cellData.squareInfo.type != QRCodeSquareType.MARGIN) {
if (cellData.dark) {
graphics.fillRect(x, y, cellSize, cellSize, darkColor)
} else {
graphics.fillRect(x, y, cellSize, cellSize, brightColor)
}
} else {
graphics.fillRect(x, y, margin, margin, marginColor)
}
}

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.

3 participants