CodeGlyphX logo
CodeGlyphX

API Reference

Class

QrBuilder

Namespace CodeGlyphX
Assembly CodeGlyphX
Modifiers sealed

Fluent QR builder returned by QrEasyOptions).

Inheritance

  • Object
  • QrBuilder

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public QrCode Encode() #
Returns: QrCode

Encodes the QR code.

public RenderedOutput Render(OutputFormat format, RenderExtras extras = null) #
Returns: RenderedOutput

Renders the configured QR code to the requested output format.

Parameters

format CodeGlyphX.Rendering.OutputFormat requiredposition: 0
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 1
Save 2 overloads
public String Save(String path, RenderExtras extras = null) #
Returns: String

Saves the configured QR code, selecting the output format from the file extension.

Parameters

path System.String requiredposition: 0
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 1
public Void Save(Stream stream, OutputFormat format, RenderExtras extras = null) #
Returns: Void

Writes the configured QR code to a stream in the requested output format.

Parameters

stream System.IO.Stream requiredposition: 0
format CodeGlyphX.Rendering.OutputFormat requiredposition: 1
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 2
public QrBuilder WithBackground(Rgba32 color) #
Returns: QrBuilder

Sets background color.

Parameters

color CodeGlyphX.Rendering.Png.Rgba32 requiredposition: 0
public QrBuilder WithBackgroundGradient(QrPngGradientOptions gradient) #
Returns: QrBuilder

Sets the background gradient.

Parameters

gradient CodeGlyphX.Rendering.Png.QrPngGradientOptions requiredposition: 0
public QrBuilder WithCanvas(QrPngCanvasOptions canvas) #
Returns: QrBuilder

Sets the canvas options.

Parameters

canvas CodeGlyphX.Rendering.Png.QrPngCanvasOptions requiredposition: 0
public QrBuilder WithColors(Rgba32 foreground, Rgba32 background) #
Returns: QrBuilder

Sets foreground and background colors.

Parameters

foreground CodeGlyphX.Rendering.Png.Rgba32 requiredposition: 0
background CodeGlyphX.Rendering.Png.Rgba32 requiredposition: 1
public QrBuilder WithErrorCorrection(QrErrorCorrectionLevel ecc) #
Returns: QrBuilder

Sets error correction level.

Parameters

ecc CodeGlyphX.QrErrorCorrectionLevel requiredposition: 0
public QrBuilder WithEyes(QrPngEyeOptions eyes) #
Returns: QrBuilder

Sets eye (finder) styling.

Parameters

eyes CodeGlyphX.Rendering.Png.QrPngEyeOptions requiredposition: 0
public QrBuilder WithFixedSize(Int32 sizePx, Boolean includeQuietZone = true) #
Returns: QrBuilder

Sets a fixed target size (in pixels). Module size is adjusted to fit.

Parameters

sizePx System.Int32 requiredposition: 0
includeQuietZone System.Boolean = true optionalposition: 1
public QrBuilder WithForeground(Rgba32 color) #
Returns: QrBuilder

Sets foreground color.

Parameters

color CodeGlyphX.Rendering.Png.Rgba32 requiredposition: 0
public QrBuilder WithForegroundGradient(QrPngGradientOptions gradient) #
Returns: QrBuilder

Sets the foreground gradient.

Parameters

gradient CodeGlyphX.Rendering.Png.QrPngGradientOptions requiredposition: 0
public QrBuilder WithForegroundPalette(QrPngPaletteOptions palette) #
Returns: QrBuilder

Sets the foreground palette.

Parameters

palette CodeGlyphX.Rendering.Png.QrPngPaletteOptions requiredposition: 0
public QrBuilder WithForegroundPaletteZones(QrPngPaletteZoneOptions zones) #
Returns: QrBuilder

Sets palette overrides for specific zones.

Parameters

zones CodeGlyphX.Rendering.Png.QrPngPaletteZoneOptions requiredposition: 0
public QrBuilder WithIcoPreserveAspectRatio(Boolean enabled = true) #
Returns: QrBuilder

Sets ICO aspect ratio preservation behavior.

Parameters

enabled System.Boolean = true optionalposition: 0
public QrBuilder WithIcoSizes(params Int32[] sizes) #
Returns: QrBuilder

Sets ICO output sizes (in pixels).

Parameters

sizes System.Int32[] requiredposition: 0
public QrBuilder WithLogoBackground(Boolean enabled = true) #
Returns: QrBuilder

Sets whether to draw a background plate behind the logo.

Parameters

enabled System.Boolean = true optionalposition: 0
public QrBuilder WithLogoBackgroundAutoBump(Boolean enabled = true) #
Returns: QrBuilder

Enables/disables auto-bumping the minimum version for logo background plates.

Parameters

enabled System.Boolean = true optionalposition: 0
public QrBuilder WithLogoBackgroundColor(Nullable<Rgba32> color) #
Returns: QrBuilder

Sets the logo background color.

Parameters

color System.Nullable{CodeGlyphX.Rendering.Png.Rgba32} requiredposition: 0
public QrBuilder WithLogoBackgroundMinVersion(Int32 minVersion) #
Returns: QrBuilder

Sets the minimum version used when a logo background plate is enabled.

Parameters

minVersion System.Int32 requiredposition: 0
public QrBuilder WithLogoCornerRadiusPx(Int32 radiusPx) #
Returns: QrBuilder

Sets the logo background corner radius in pixels.

Parameters

radiusPx System.Int32 requiredposition: 0
public QrBuilder WithLogoFile(String path) #
Returns: QrBuilder

Sets an embedded logo from a PNG file.

Parameters

path System.String requiredposition: 0
public QrBuilder WithLogoPaddingPx(Int32 paddingPx) #
Returns: QrBuilder

Sets the logo padding in pixels.

Parameters

paddingPx System.Int32 requiredposition: 0
public QrBuilder WithLogoPng(Byte[] png) #
Returns: QrBuilder

Sets an embedded logo from PNG bytes.

Parameters

png System.Byte[] requiredposition: 0
public QrBuilder WithLogoScale(Double scale) #
Returns: QrBuilder

Sets the logo scale relative to the QR area (excluding quiet zone).

Parameters

scale System.Double requiredposition: 0
public QrBuilder WithModuleCornerRadiusPx(Int32 radiusPx) #
Returns: QrBuilder

Sets module corner radius in pixels.

Parameters

radiusPx System.Int32 requiredposition: 0
public QrBuilder WithModuleJitter(QrPngModuleJitterOptions jitter) #
Returns: QrBuilder

Sets per-module jitter options.

Parameters

jitter CodeGlyphX.Rendering.Png.QrPngModuleJitterOptions requiredposition: 0
public QrBuilder WithModuleScale(Double scale) #
Returns: QrBuilder

Sets module scale override (0.1..1.0).

Parameters

scale System.Double requiredposition: 0
public QrBuilder WithModuleScaleMap(QrPngModuleScaleMapOptions map) #
Returns: QrBuilder

Sets module scale map.

Parameters

map CodeGlyphX.Rendering.Png.QrPngModuleScaleMapOptions requiredposition: 0
public QrBuilder WithModuleShape(QrPngModuleShape shape) #
Returns: QrBuilder

Sets module shape override.

Parameters

shape CodeGlyphX.Rendering.Png.QrPngModuleShape requiredposition: 0
public QrBuilder WithModuleShapeMap(QrPngModuleShapeMapOptions map) #
Returns: QrBuilder

Sets module shape map.

Parameters

map CodeGlyphX.Rendering.Png.QrPngModuleShapeMapOptions requiredposition: 0
public QrBuilder WithModuleSize(Int32 moduleSize) #
Returns: QrBuilder

Sets the module size in pixels.

Parameters

moduleSize System.Int32 requiredposition: 0
public QrBuilder WithOptions(Action<QrEasyOptions> configure) #
Returns: QrBuilder

Updates rendering options.

Parameters

configure System.Action{CodeGlyphX.QrEasyOptions} requiredposition: 0
public QrBuilder WithQuietZone(Int32 quietZone) #
Returns: QrBuilder

Sets the quiet zone size in modules.

Parameters

quietZone System.Int32 requiredposition: 0
public QrBuilder WithStyle(QrRenderStyle style) #
Returns: QrBuilder

Sets the render style preset.

Parameters

style CodeGlyphX.QrRenderStyle requiredposition: 0
public QrBuilder WithTargetSize(Int32 sizePx, Boolean includeQuietZone = true) #
Returns: QrBuilder

Sets a fixed target size (in pixels). Module size is adjusted to fit.

Parameters

sizePx System.Int32 requiredposition: 0
includeQuietZone System.Boolean = true optionalposition: 1
public QrBuilder WithTransparentBackground() #
Returns: QrBuilder

Uses a transparent background (alpha = 0).

Properties

public QrEasyOptions Options { get; } #

Rendering options used by this builder.