HPDFSampleDataMatrixQuadrilateral

Unit: HPDFDataMatrixGeometry

function HPDFSampleDataMatrixQuadrilateral(const Mask: TBytes;
  Width, Height, Rows, Columns, RegionRows, RegionColumns: Integer;
  const Corners: THPDFBarcodeQuadrilateral;
  CancellationToken: THPDFCancellationToken; StartTick: Cardinal;
  out Grid: THPDFBarcodeModuleGrid): Boolean;

Sample an ECC 200 Data Matrix quadrilateral with finder-border validation before data-module sampling; successful output matches the five-sample majority rule used by HPDFSampleBarcodeQuadrilateral

Mask contains one byte per raster pixel, with nonzero bytes representing dark pixels; Width and Height describe that raster, Rows and Columns describe the complete module grid including finder borders, and RegionRows and RegionColumns count the data regions vertically and horizontally

عدادات المناطق يجب أن تكون موجبة وتقسم أبعاد الوحدات المقابلة لها؛ وكل منطقة يجب أن تكون بعرض وارتفاع ثلاث وحدات على الأقل، وأبعاد الوحدات تمتد من 8 إلى 144، وأبعاد المسطّر 4096×4096 كحد أقصى، ويقبل 4,194,304 بكسل مسطّر كحد أقصى

Corners follow the normalized top-left, top-right, bottom-right, bottom-left order of the candidate symbol, including its intended orientation and reflection; the sampler checks the solid left and bottom borders and alternating top and right borders of every region

The permitted number of incorrect finder modules is Max(1, BorderModuleCount div 50), matching the decoder's existing ECC 200 finder check; a rejected finder pattern or invalid input returns false with an empty Grid, and successful sampling does not establish a decoded payload or valid Reed–Solomon codewords

StartTick is the Windows GetTickCount value from the start of the complete operation; the existing 2,000 ms deadline includes finder and data sampling, and cancellation propagates as EHPDFOperationCancelled

The generic HPDFSampleBarcodeQuadrilateral function continues to sample arbitrary module grids without imposing ECC 200 finder semantics

مسح باركود نقطي متعدد الرموز