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

Support for rendering top bar/bearer bars #199

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mjamro
Copy link

@mjamro mjamro commented Mar 18, 2024

This PR adds support for including top bar when rendering barcodes and configurable bearer bar mode for ITF-14.

Top-bar off (default)

EAN13_TopBar_Off

Top bar enabled

EAN13_TopBar_On

ITF-14 Bearer mode: frame (default)

ITF14_BearerBar_Frame

ITF-14 Bearer mode: bearer bars

ITF14_BearerBar

ITF-14 Bearer mode: disabled

ITF14_BearerBar_Disabled

@@ -38,8 +37,11 @@ public static SKImage Label_ITF14(Barcode barcode, SKBitmap img)
pen.ColorF = barcode.ForeColor;
pen.StrokeWidth = (float)img.Height / 16;

canvas.DrawLine(new SKPoint(0, backY - pen.StrokeWidth / 2f),
new SKPoint(img.Width, backY - pen.StrokeWidth / 2f), pen); //bottom
if (barcode.BearerBarsMode != BearerBarsMode.Disabled)
Copy link
Owner

Choose a reason for hiding this comment

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

If these bearer bars only apply to ITF-14 barcodes I would expect them to be configured only for that type somehow. As if you configure them for other types they wont apply.

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.

None yet

2 participants