Table of Contents

Class MatrixBarcode

Namespace
MiPdf.Barcodes
Assembly
MiPdf.dll

A two-dimensional barcode (QR Code, Data Matrix): a grid of dark and light modules.

public class MatrixBarcode : Barcode
Inheritance
MatrixBarcode
Derived
Inherited Members

Properties

Columns

Number of module columns (without quiet zone).

public int Columns { get; }

Property Value

int

this[int, int]

True if the module at (row, column) is dark. Row 0 is the top row.

public bool this[int row, int column] { get; }

Parameters

row int
column int

Property Value

bool

Rows

Number of module rows (without quiet zone).

public int Rows { get; }

Property Value

int

TotalHeightModules

Total height in modules: Rows plus the quiet zone on both sides.

public int TotalHeightModules { get; }

Property Value

int

TotalWidthModules

Total width in modules: Columns plus the quiet zone on both sides.

public override int TotalWidthModules { get; }

Property Value

int

Methods

Draw(PdfCanvas, double, double, double, double)

Draws the code with square modules, as large as fits into the rectangle with the bottom-left corner (x, y), centered in it. The quiet zone is part of the drawn size.

public override void Draw(PdfCanvas canvas, double x, double y, double width, double height)

Parameters

canvas PdfCanvas
x double
y double
width double
height double

ToString()

Returns the modules as text ('#' dark, ' ' light), e.g. for console output and tests.

public override string ToString()

Returns

string