mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Updated up to 8 comments in all language versions, but somewhat differently in each language.
This commit is contained in:
+8
-10
@@ -164,9 +164,8 @@ var qrcodegen = new function() {
|
||||
}
|
||||
};
|
||||
|
||||
// Based on the given number of border modules to add as padding, this returns a
|
||||
// string whose contents represents an SVG XML file that depicts this QR Code symbol.
|
||||
// Note that Unix newlines (\n) are always used, regardless of the platform.
|
||||
// Returns a string of SVG XML code representing an image of this QR Code symbol with the given
|
||||
// number of border modules. Note that Unix newlines (\n) are always used, regardless of the platform.
|
||||
this.toSvgString = function(border) {
|
||||
if (border < 0)
|
||||
throw "Border must be non-negative";
|
||||
@@ -370,8 +369,8 @@ var qrcodegen = new function() {
|
||||
modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));
|
||||
i++;
|
||||
}
|
||||
// If there are any remainder bits (0 to 7), they are already
|
||||
// set to 0/false/white when the grid of modules was initialized
|
||||
// If this QR Code has any remainder bits (0 to 7), they were assigned as
|
||||
// 0/false/white by the constructor and are left unchanged by this method
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -541,7 +540,7 @@ var qrcodegen = new function() {
|
||||
|
||||
|
||||
/*
|
||||
* Returns a QR Code symbol representing the given data segments with the given encoding parameters.
|
||||
* Returns a QR Code symbol representing the given segments with the given encoding parameters.
|
||||
* The smallest possible QR Code version within the given range is automatically chosen for the output.
|
||||
* This function allows the user to create a custom sequence of segments that switches
|
||||
* between modes (such as alphanumeric and binary) to encode text more efficiently.
|
||||
@@ -697,9 +696,8 @@ var qrcodegen = new function() {
|
||||
/*---- Data segment class ----*/
|
||||
|
||||
/*
|
||||
* A public class that represents a character string to be encoded in a QR Code symbol.
|
||||
* Each segment has a mode, and a sequence of characters that is already encoded as
|
||||
* a sequence of bits. Instances of this class are immutable.
|
||||
* Represents a segment of character data, binary data, or control data
|
||||
* to be put into a QR Code symbol. Instances of this class are immutable.
|
||||
* This segment class imposes no length restrictions, but QR Codes have restrictions.
|
||||
* Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
|
||||
* Any segment longer than this is meaningless for the purpose of generating QR Codes.
|
||||
@@ -856,7 +854,7 @@ var qrcodegen = new function() {
|
||||
|
||||
// Private constructor.
|
||||
function Mode(mode, ccbits) {
|
||||
// (Package-private) An unsigned 4-bit integer value (range 0 to 15) representing the mode indicator bits for this mode object.
|
||||
// (Package-private) The mode indicator bits, which is a uint4 value (range 0 to 15).
|
||||
Object.defineProperty(this, "modeBits", {value:mode});
|
||||
|
||||
// (Package-private) Returns the bit width of the segment character count field for this mode object at the given version number.
|
||||
|
||||
Reference in New Issue
Block a user