question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iconBorderWidth Doesn't work

See original GitHub issue

Type of issue

[x] Bug
[ ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

The iconBorderWidth parameter is supposed to specify a border to be drawn around an icon inside the QR code.

Current Behavior

Currently, no border is drawn around icons.

Possible Solution (optional)

It looks like #245 broke this functionality.

Steps to Reproduce (for bugs)

Create a QRCode and call the GetGraphic() function while passing in a bitmap for the icon and a value greater than 1 for iconBorderWidth . Notice that the generated graphic does not have a border around the icon.

Your Environment

Nuget package 1.4.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
codebudecommented, Nov 23, 2021

Hi @kuenzign , hi @DamienLaw ,

I refactored the code and added the functionality again. (But in a different manner without using Region.Exclude, which lead to problems on Linux systems in the past.) The new function behaves as follows:

  • If iconBorderWidth isn’t set, the (new) default value of 0 triggers that no border/background is drawn. (=Same behaviour as before the code changes of this issue.)
  • If iconBorderWidth is set and iconBorderWidth > 0, the background/border is drawn as requested by you in this issue (=behaviour as it was before the code broke…)
  • A new (and optional) parameter called iconBackgroundColor can be set to define the color of the border/background of the icon. If iconBackgroundColor isn’t set, its default value (null) kicks in and QRCoder chooses the lightColor as icon border/background color. You can checkout the new paramter in our wiki, too.
2reactions
codebudecommented, Nov 23, 2021

In NuGet version 1.4.2. This was the last issue I planned to resolve before publishing 1.4.2. So it will be publicly available within the next couple hours.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to make the borders of icons equal sized
I have footer which has few icons.These icons have border around them. The problem is that based on the icon,the border size is...
Read more >
border-width - CSS: Cascading Style Sheets - MDN Web Docs
The border-width shorthand CSS property sets the width of an element's border.
Read more >
Change Icon border bold without change icon size #232
Hi I need more bold border with icons without change defautt size(1em) I tried style = { border:3 } doesn't worked.
Read more >
Some Windows 7 desktop icons have faint border
I tried changing the size, and it seems to be disappearing at some point (around 48 or even 32px.). Changing between Small-Medium-Large on...
Read more >
border-image
border -image is a shorthand property that lets you use an image or CSS gradient as the border of an element.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found