mirror of
https://gitee.com/openharmony/third_party_qrcodegen
synced 2024-11-30 10:50:35 +00:00
Fixed the names of some methods in comments.
This commit is contained in:
parent
8cbd1f506a
commit
f9d1172e29
@ -446,7 +446,7 @@ class QrCode:
|
|||||||
def _apply_mask(self, mask: int) -> None:
|
def _apply_mask(self, mask: int) -> None:
|
||||||
"""XORs the codeword modules in this QR Code with the given mask pattern.
|
"""XORs the codeword modules in this QR Code with the given mask pattern.
|
||||||
The function modules must be marked and the codeword bits must be drawn
|
The function modules must be marked and the codeword bits must be drawn
|
||||||
before masking. Due to the arithmetic of XOR, calling applyMask() with
|
before masking. Due to the arithmetic of XOR, calling _apply_mask() with
|
||||||
the same mask value a second time will undo the mask. A final well-formed
|
the same mask value a second time will undo the mask. A final well-formed
|
||||||
QR Code needs exactly one (not zero, two, etc.) mask applied."""
|
QR Code needs exactly one (not zero, two, etc.) mask applied."""
|
||||||
if not (0 <= mask <= 7):
|
if not (0 <= mask <= 7):
|
||||||
@ -644,7 +644,7 @@ class QrCode:
|
|||||||
MIN_VERSION = 1 # The minimum version number supported in the QR Code Model 2 standard
|
MIN_VERSION = 1 # The minimum version number supported in the QR Code Model 2 standard
|
||||||
MAX_VERSION = 40 # The maximum version number supported in the QR Code Model 2 standard
|
MAX_VERSION = 40 # The maximum version number supported in the QR Code Model 2 standard
|
||||||
|
|
||||||
# For use in getPenaltyScore(), when evaluating which mask is best.
|
# For use in _get_penalty_score(), when evaluating which mask is best.
|
||||||
_PENALTY_N1 = 3
|
_PENALTY_N1 = 3
|
||||||
_PENALTY_N2 = 3
|
_PENALTY_N2 = 3
|
||||||
_PENALTY_N3 = 40
|
_PENALTY_N3 = 40
|
||||||
|
@ -613,7 +613,7 @@ impl QrCode {
|
|||||||
|
|
||||||
// XORs the codeword modules in this QR Code with the given mask pattern.
|
// XORs the codeword modules in this QR Code with the given mask pattern.
|
||||||
// The function modules must be marked and the codeword bits must be drawn
|
// The function modules must be marked and the codeword bits must be drawn
|
||||||
// before masking. Due to the arithmetic of XOR, calling applyMask() with
|
// before masking. Due to the arithmetic of XOR, calling apply_mask() with
|
||||||
// the same mask value a second time will undo the mask. A final well-formed
|
// the same mask value a second time will undo the mask. A final well-formed
|
||||||
// QR Code needs exactly one (not zero, two, etc.) mask applied.
|
// QR Code needs exactly one (not zero, two, etc.) mask applied.
|
||||||
fn apply_mask(&mut self, mask: Mask) {
|
fn apply_mask(&mut self, mask: Mask) {
|
||||||
|
Loading…
Reference in New Issue
Block a user