/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Text; namespace ZXing.QrCode.Internal { /// satorux@google.com (Satoru Takabayashi) - creator /// dswitkin@google.com (Daniel Switkin) - ported from C++ public class QRCode { /// /// /// public static int NUM_MASK_PATTERNS = 8; /// /// Initializes a new instance of the class. /// public QRCode() { MaskPattern = -1; } /// /// Gets or sets the mode. /// /// /// The mode. /// public Mode Mode { get; set; } /// /// Gets or sets the EC level. /// /// /// The EC level. /// public ErrorCorrectionLevel ECLevel { get; set; } /// /// Gets or sets the version. /// /// /// The version. /// public Version Version { get; set; } /// /// Gets or sets the mask pattern. /// /// /// The mask pattern. /// public int MaskPattern { get; set; } /// /// Gets or sets the matrix. /// /// /// The matrix. /// public ByteMatrix Matrix { get; set; } /// /// Check if "mask_pattern" is valid. /// /// The mask pattern. /// /// true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. /// public static bool isValidMaskPattern(int maskPattern) { return maskPattern >= 0 && maskPattern < NUM_MASK_PATTERNS; } } }