[C# 2010] - Barcode: special settings?

Discussions about image processing and document imaging.
Post Reply
Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

[C# 2010] - Barcode: special settings?

Post by Dr3w » Wed Dec 05, 2012 7:27 pm

Hi at all,
me again... :roll:

I have to mark my document with a 1D barcode.
I'm using the Barcode1DWrite method and I've no problems. But...
If I would:
  • 1. Write the data-code-value as well (as alphanumeric data), at the bottom of my barcode
  • 2. Draw my barcode with white (and not transparent) background
  • 3. Draw a rectangle around my barcode...
What should I do?
Are there particular properties? Must I write a text? May I draw a rectangle and over there draw a barcode?

Thank you for your constant support & suggestions.
Andrea.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: [C# 2010] - Barcode: special settings?

Post by SamiKharma » Sun Dec 09, 2012 10:46 am

Hi,
1. Write the data-code-value as well (as alphanumeric data), at the bottom of my barcode
You need to use the DrawText method. The coordinates need to be set by in with respect to the barcode coordinates:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... aging.html
2. Draw my barcode with white (and not transparent) background
If I understand what you mean, you want the barcode to overcome all that is below it and white out the image in the rectangle it is drawn at. You can do that by drawing the barcode onto a white image (you create it using the size of the barcode you want), and then use the following function to paste it onto the image you want:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... nMode.html
3. Draw a rectangle around my barcode...
You can use the following function, and for the coordinates just make sure they have the same left, top, width as the barcode (or same width as the text if it is wider than the barcode), and the height of both the barcode and the text in order to surround them all:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... olean.html

Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

Re: [C# 2010] - Barcode: special settings?

Post by Dr3w » Mon Dec 10, 2012 10:22 am

Hi SamiKharma,
thank you for suggestions.

Andrea.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: [C# 2010] - Barcode: special settings?

Post by SamiKharma » Mon Dec 10, 2012 3:58 pm

Hi,

You are very welcome :)

Best,
Sami

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: [C# 2010] - Barcode: special settings?

Post by SamiKharma » Thu Nov 27, 2014 10:11 am

Hi,

The post was answered two years ago along with V9, and the documentation links have changed since then.
In any case, here are the functions:

Code: Select all

Public Overloads Function DrawText( _
   ByVal ImageID As Integer, _
   ByVal Text As String, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal FontSize As Single, _
   ByVal FontStyle As FontStyle, _
   ByVal TextColor As Integer, _
   ByVal FontName As String, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus

Public Function DrawGdPictureImageOP( _
   ByVal SrcImage As Integer, _
   ByVal DstImage As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal DstWidth As Integer, _
   ByVal DstHeight As Integer, _
   ByVal Op As Operators, _
   ByVal InterpolationMode As InterpolationMode _
) As GdPictureStatus

Public Overloads Function DrawRectangle( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal Width As Integer, _
   ByVal Height As Integer, _
   ByVal PenWidth As Integer, _
   ByVal PenColor As Color, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests