Skip to content

M_QRCoder_Core_SvgQRCode_GetGraphic_4

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

GetGraphic(Int32, Color, Color, Boolean, SvgQRCode.SizingMode, SvgQRCode.SvgLogo) Method

Returns a QR code as SVG string with custom colors, 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(
	int pixelsPerModule,
	Color darkColor,
	Color lightColor,
	bool drawQuietZones = true,
	SvgQRCode.SizingMode sizingMode = SvgQRCode.SizingMode.WidthHeightAttribute,
	SvgQRCode.SvgLogo logo = null
)

C++

public:
String^ GetGraphic(
	int pixelsPerModule, 
	Color darkColor, 
	Color lightColor, 
	bool drawQuietZones = true, 
	SvgQRCode.SizingMode sizingMode = SvgQRCode.SizingMode::WidthHeightAttribute, 
	SvgQRCode.SvgLogo^ logo = nullptr
)

Parameters

  Int32
The pixel size each b/w module is drawn
  Color
Color of the dark modules
  Color
Color of the light modules
  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