"景先生毕设|www.jxszl.com

C# ByteMatrix类代码示例

2023-12-29 17:37编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中ByteMatrix类的典型用法代码示例。如果您正苦于以下问题:C#ByteMatrix类的具体用法?C#ByteMatrix怎么用?C#ByteMatrix使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:test publicvoidtest() { varqrCode=newQRCode(); //First,testsimplesettersandgetters. //Weusenumbersofversion7-H. qrCode.Mode=Mode.BYTE; qrCode.ECLevel=ErrorCorrectionLevel.H; qrCode.Version=Version.getVersionForNumber(7); qrCode.MaskPattern=3; Assert.AreEqual(Mode.BYTE,qrCode.Mode); Assert.AreEqual(ErrorCorrectionLevel.H,qrCode.ECLevel); Assert.AreEqual(7,qrCode.Version.VersionNumber); Assert.AreEqual(3,qrCode.MaskPattern); //Preparethematrix. varmatrix=newByteMatrix(45,45); //Justsetboguszero/onevalues. for(inty=0;y<45;++y) { for(intx=0;x<45;++x) { matrix.set(x,y,(y+x)%2==1); } } //Setthematrix. qrCode.Matrix=matrix; Assert.AreEqual(matrix,qrCode.Matrix); }
原文链接:http://www.jxszl.com/biancheng/C/556625.html