Skip to content

M_QRCoder_Core_SvgQRCode_GetGraphic_2

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

GetGraphic(Size, String, String, Boolean, SvgQRCode.SizingMode, SvgQRCode.SvgLogo) Method

Returns a QR code as SVG string with custom colors (in HEX syntax), optional quietzone and logo

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 string GetGraphic(
	Size viewBox,
	string darkColorHex,
	string lightColorHex,
	bool drawQuietZones = true,
	SvgQRCode.SizingMode sizingMode = SvgQRCode.SizingMode.WidthHeightAttribute,
	SvgQRCode.SvgLogo logo = null
)

C++

public:
String^ GetGraphic(
	Size viewBox, 
	String^ darkColorHex, 
	String^ lightColorHex, 
	bool drawQuietZones = true, 
	SvgQRCode.SizingMode sizingMode = SvgQRCode.SizingMode::WidthHeightAttribute, 
	SvgQRCode.SvgLogo^ logo = nullptr
)

Parameters

  Size
The viewbox of the QR code graphic
  String
The color of the dark/black modules in hex (e.g. #000000) representation
  String
The color of the light/white modules in hex (e.g. #ffffff) representation
  Boolean  (Optional)
If true a white border is drawn around the whole QR Code
  SvgQRCode.SizingMode  (Optional)
Defines if width/height or viewbox should be used for size definition
  SvgQRCode.SvgLogo  (Optional)
A (optional) logo to be rendered on the code (either Bitmap or SVG)

Return Value

String
SVG as string

See Also

Reference

SvgQRCode Class
GetGraphic Overload
QRCoder.Core Namespace

Clone this wiki locally