Skip to content

M_QRCoder_Core_ArtQRCodeHelper_GetQRCode

Afonso Dutra Nogueira Filho edited this page Mar 28, 2024 · 2 revisions

GetQRCode Method

Helper function to create an ArtQRCode graphic with a single function call

Definition

Namespace: QRCoder.Core
Assembly: QRCoder.Core (in QRCoder.Core.dll) Version: 1.0.2+100b048b01076590efe500a3be242a5faeb43294
XMLNS for XAML: Not mapped to an xmlns.

C#

public static Bitmap GetQRCode(
	string plainText,
	int pixelsPerModule,
	Color darkColor,
	Color lightColor,
	Color backgroundColor,
	QRCodeGenerator.ECCLevel eccLevel,
	bool forceUtf8 = false,
	bool utf8BOM = false,
	QRCodeGenerator.EciMode eciMode = QRCodeGenerator.EciMode.Default,
	int requestedVersion = -1,
	Bitmap backgroundImage = null,
	double pixelSizeFactor = 0,8,
	bool drawQuietZones = true,
	ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = ArtQRCode.QuietZoneStyle.Flat,
	ArtQRCode.BackgroundImageStyle backgroundImageStyle = ArtQRCode.BackgroundImageStyle.DataAreaOnly,
	Bitmap finderPatternImage = null
)

C++

public:
static Bitmap^ GetQRCode(
	String^ plainText, 
	int pixelsPerModule, 
	Color darkColor, 
	Color lightColor, 
	Color backgroundColor, 
	QRCodeGenerator.ECCLevel eccLevel, 
	bool forceUtf8 = false, 
	bool utf8BOM = false, 
	QRCodeGenerator.EciMode eciMode = QRCodeGenerator.EciMode::Default, 
	int requestedVersion = -1, 
	Bitmap^ backgroundImage = nullptr, 
	double pixelSizeFactor = 0,8, 
	bool drawQuietZones = true, 
	ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = ArtQRCode.QuietZoneStyle::Flat, 
	ArtQRCode.BackgroundImageStyle backgroundImageStyle = ArtQRCode.BackgroundImageStyle::DataAreaOnly, 
	Bitmap^ finderPatternImage = nullptr
)

Parameters

  String
Text/payload to be encoded inside the QR code
  

Int32

Amount of px each dark/light module of the QR code shall take place in the final QR code image
  Color
Color of the dark modules
  Color
Color of the light modules
  Color
Color of the background
  QRCodeGenerator.ECCLevel
The level of error correction data
  Boolean  (Optional)
Shall the generator be forced to work in UTF-8 mode?
  Boolean  (Optional)
Should the byte-order-mark be used?
  QRCodeGenerator.EciMode  (Optional)
Which ECI mode shall be used?
  Int32  (Optional)
Set fixed QR code target version.
  Bitmap  (Optional)
A bitmap object that will be used as background picture
  Double  (Optional)
Value between 0.0 to 1.0 that defines how big the module dots are. The bigger the value, the less round the dots will be.
  Boolean  (Optional)
If true a white border is drawn around the whole QR Code
  ArtQRCode.QuietZoneStyle  (Optional)
Style of the quiet zones
  ArtQRCode.BackgroundImageStyle  (Optional)
Style of the background image (if set). Fill=spanning complete graphic; DataAreaOnly=Don't paint background into quietzone
  Bitmap  (Optional)
Optional image that should be used instead of the default finder patterns

Return Value

Bitmap
QRCode graphic as bitmap

See Also

Reference

ArtQRCodeHelper Class
QRCoder.Core Namespace

Clone this wiki locally