Elight.Utility/Files/DataMatrix/DmtxScanGrid.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;

namespace DataMatrix.net
{
	// Token: 0x02000016 RID: 22
	internal struct DmtxScanGrid
	{
		// Token: 0x0600007D RID: 125 RVA: 0x00004914 File Offset: 0x00002B14
		internal DmtxScanGrid(DmtxDecode dec)
		{
			int scanGap = dec.ScanGap;
			this._xMin = dec.XMin;
			this._xMax = dec.XMax;
			this._yMin = dec.YMin;
			this._yMax = dec.YMax;
			int num = this._xMax - this._xMin;
			int num2 = this._yMax - this._yMin;
			int num3 = (num > num2) ? num : num2;
			if (num3 < 1)
			{
				throw new ArgumentException("Invalid max extent for Scan Grid: Must be greater than 0");
			}
			int i = 1;
			this._minExtent = i;
			while (i < num3)
			{
				if (i <= scanGap)
				{
					this._minExtent = i;
				}
				i = (i + 1) * 2 - 1;
			}
			this._maxExtent = i;
			this._xOffset = (this._xMin + this._xMax - this._maxExtent) / 2;
			this._yOffset = (this._yMin + this._yMax - this._maxExtent) / 2;
			this._total = 1;
			this._extent = this._maxExtent;
			this._jumpSize = this._extent + 1;
			this._pixelTotal = 2 * this._extent - 1;
			this._startPos = this._extent / 2;
			this._pixelCount = 0;
			this._xCenter = (this._yCenter = this._startPos);
			this.SetDerivedFields();
		}

		// Token: 0x0600007E RID: 126 RVA: 0x00004A74 File Offset: 0x00002C74
		internal DmtxRange PopGridLocation(ref DmtxPixelLoc loc)
		{
			DmtxRange gridCoordinates;
			do
			{
				gridCoordinates = this.GetGridCoordinates(ref loc);
				this._pixelCount++;
			}
			while (gridCoordinates == DmtxRange.DmtxRangeBad);
			return gridCoordinates;
		}

		// Token: 0x0600007F RID: 127 RVA: 0x00004AA8 File Offset: 0x00002CA8
		private DmtxRange GetGridCoordinates(ref DmtxPixelLoc locRef)
后面还有 367 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。