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

Highlight anchor elements for better recognition seems break in Library version 2.0.0-alpha01 #43

Open
hardikbhalodi opened this issue Aug 9, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@hardikbhalodi
Copy link

hardikbhalodi commented Aug 9, 2023

Library version
'com.github.alexzhirkevich:custom-qr-generator:2.0.0-alpha01'

Code Snippet
QrVectorOptions.Builder options =new QrVectorOptions.Builder()...
options.setAnchorsHighlighting(new QrHighlighting(HighlightingType.Default.INSTANCE,
HighlightingType.Default.INSTANCE, HighlightingType.None.INSTANCE, 0.6f));

Library version 2.0.0 -alpha01 ouput (Alpha not applying)
Screenshot_153452

Library version 1.6.2 ouput (Correct)
Screenshot_154359

Quoted issue
#27 (comment)

@hardikbhalodi hardikbhalodi added the bug Something isn't working label Aug 9, 2023
@alexzhirkevich
Copy link
Owner

alexzhirkevich commented Aug 9, 2023

you have to add alpha manually to the color. alpha paramter will be removed. color parameter will be added to Default highlighting. For now you can use styled one with default arguments and set color to transparent white

@hardikbhalodi
Copy link
Author

I tried that way here is code snippet

 HighlightingType type=new HighlightingType.Styled(null,getQRVectorColor(Color.parseColor("#66ffffff")));
 options.setAnchorsHighlighting(new QrHighlighting(type,
                    type, HighlightingType.None.INSTANCE, 0.6f));

here is Output, getting some margin in version eye
Screenshot_165803

@alexzhirkevich
Copy link
Owner

alexzhirkevich commented Aug 9, 2023

Use elementShape from here #38 (comment) and create frame for it with the size of 5, not 7

@alexzhirkevich
Copy link
Owner

Or just use stable version

@hardikbhalodi
Copy link
Author

Version stable 'com.github.alexzhirkevich:custom-qr-generator:1.6.2'

With code snippet alpha inside color

HighlightingType type=new HighlightingType.Styled(null,getQRVectorColor(Color.parseColor("#66ffffff")));
options.setAnchorsHighlighting(new QrHighlighting(type,
                   type, HighlightingType.None.INSTANCE, 0.6f));

Screenshot_165803

with old code snippet alpha as separate parameter
options.setAnchorsHighlighting(new QrHighlighting(HighlightingType.Default.INSTANCE,
HighlightingType.Default.INSTANCE, HighlightingType.None.INSTANCE, 0.6f));

Screenshot_170515

@alexzhirkevich
Copy link
Owner

alexzhirkevich commented Aug 9, 2023

I mean use it how you have used it before, without new code snippet. I'll fix alpha version soon

@hardikbhalodi
Copy link
Author

@alexzhirkevich new alpha is fixed?

@AKFEvn
Copy link

AKFEvn commented Mar 17, 2024

Hello. Can I ask how to create a QR code like this?
Can you guide me? @hardikbhalodi @alexzhirkevich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants