Skip to content

Conversation

@mortenholmgaard
Copy link
Contributor

#13

Copy link
Owner

@simonsickle simonsickle left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple small things before a merge

Comment on lines -101 to -102
@Composable
fun Barcode(
Copy link
Owner

Choose a reason for hiding this comment

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

Let's not remove this until v2 please

val offset = y * width
for (x in 0 until width) {
pixels[offset + x] = if (get(x, y)) android.graphics.Color.BLACK else android.graphics.Color.WHITE
pixels[offset + x] = if (get(x, y)) android.graphics.Color.BLACK else android.graphics.Color.TRANSPARENT
Copy link
Owner

Choose a reason for hiding this comment

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

👍🏻

val offset = y * width
for (x in 0 until width) {
pixels[offset + x] = if (get(x, y)) android.graphics.Color.BLACK else android.graphics.Color.WHITE
pixels[offset + x] = if (get(x, y)) android.graphics.Color.BLACK else android.graphics.Color.TRANSPARENT

Choose a reason for hiding this comment

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

It would also be nice to have the main color being passed from the barcode view and not be black all the time :)

@OSemenovBoyarka
Copy link

Any plans to merge this?

@simonsickle
Copy link
Owner

I've been working on V2 in the background which transitions over to more efficient drawing and uses the compose canvas (lets this work on compose desktop, for example)

That said, I can merge this in the interim

@simonsickle simonsickle merged commit 79e92d3 into simonsickle:main Apr 10, 2023
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