C# Класс ZXing.Common.BitMatrix

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BitMatrix ( int dimension ) : System
BitMatrix ( int width, int height ) : System
Clone ( ) : object

Clones this instance.

Equals ( object obj ) : bool

Determines whether the specified System.Object is equal to this instance.

GetHashCode ( ) : int

Returns a hash code for this instance.

ToString ( ) : String

Returns a System.String that represents this instance.

ToString ( String setString, String unsetString ) : String

Returns a System.String that represents this instance.

ToString ( String setString, String unsetString, String lineSeparator ) : String

Returns a System.String that represents this instance.

clear ( ) : void

Clears all bits (sets to false).

flip ( int x, int y ) : void

Flips the given bit.

flipWhen ( Func shouldBeFlipped ) : void

flip all of the bits, if shouldBeFlipped is true for the coordinates

getBottomRightOnBit ( ) : int[]
getEnclosingRectangle ( ) : int[]

This is useful in detecting the enclosing rectangle of a 'pure' barcode.

getRow ( int y, BitArray row ) : BitArray

A fast method to retrieve one row of data from the matrix as a BitArray.

getTopLeftOnBit ( ) : int[]

This is useful in detecting a corner of a 'pure' barcode.

parse ( String stringRepresentation, String setString, String unsetString ) : BitMatrix
rotate180 ( ) : void

Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees

setRegion ( int left, int top, int width, int height ) : void

Sets a square region of the bit matrix to true.

setRow ( int y, BitArray row ) : void

Sets the row.

this ( int x, int y ) : bool

Gets the requested bit, where true means black.

xor ( BitMatrix mask ) : void

Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding mask bit is set.

Приватные методы

Метод Описание
BitMatrix ( int width, int height, int bits ) : System
BitMatrix ( int width, int height, int rowSize, int bits ) : System
buildToString ( String setString, String unsetString, String lineSeparator ) : String

Описание методов

BitMatrix() публичный Метод

public BitMatrix ( int dimension ) : System
dimension int
Результат System

BitMatrix() публичный Метод

public BitMatrix ( int width, int height ) : System
width int
height int
Результат System

Clone() публичный Метод

Clones this instance.
public Clone ( ) : object
Результат object

Equals() публичный Метод

Determines whether the specified System.Object is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
Результат bool

GetHashCode() публичный Метод

Returns a hash code for this instance.
public GetHashCode ( ) : int
Результат int

ToString() публичный Метод

Returns a System.String that represents this instance.
public ToString ( ) : String
Результат String

ToString() публичный Метод

Returns a System.String that represents this instance.
public ToString ( String setString, String unsetString ) : String
setString String The set string.
unsetString String The unset string.
Результат String

ToString() публичный Метод

Returns a System.String that represents this instance.
public ToString ( String setString, String unsetString, String lineSeparator ) : String
setString String The set string.
unsetString String The unset string.
lineSeparator String The line separator.
Результат String

clear() публичный Метод

Clears all bits (sets to false).
public clear ( ) : void
Результат void

flip() публичный Метод

Flips the given bit.

public flip ( int x, int y ) : void
x int The horizontal component (i.e. which column)
y int The vertical component (i.e. which row)
Результат void

flipWhen() публичный Метод

flip all of the bits, if shouldBeFlipped is true for the coordinates
public flipWhen ( Func shouldBeFlipped ) : void
shouldBeFlipped Func should return true, if the bit at a given coordinate should be flipped
Результат void

getBottomRightOnBit() публичный Метод

public getBottomRightOnBit ( ) : int[]
Результат int[]

getEnclosingRectangle() публичный Метод

This is useful in detecting the enclosing rectangle of a 'pure' barcode.
public getEnclosingRectangle ( ) : int[]
Результат int[]

getRow() публичный Метод

A fast method to retrieve one row of data from the matrix as a BitArray.
public getRow ( int y, BitArray row ) : BitArray
y int The row to retrieve ///
row BitArray An optional caller-allocated BitArray, will be allocated if null or too small ///
Результат BitArray

getTopLeftOnBit() публичный Метод

This is useful in detecting a corner of a 'pure' barcode.
public getTopLeftOnBit ( ) : int[]
Результат int[]

parse() публичный статический Метод

public static parse ( String stringRepresentation, String setString, String unsetString ) : BitMatrix
stringRepresentation String
setString String
unsetString String
Результат BitMatrix

rotate180() публичный Метод

Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees
public rotate180 ( ) : void
Результат void

setRegion() публичный Метод

Sets a square region of the bit matrix to true.

public setRegion ( int left, int top, int width, int height ) : void
left int The horizontal position to begin at (inclusive) ///
top int The vertical position to begin at (inclusive) ///
width int The width of the region ///
height int The height of the region ///
Результат void

setRow() публичный Метод

Sets the row.
public setRow ( int y, BitArray row ) : void
y int row to set
row BitArray {@link BitArray} to copy from
Результат void

this() публичный Метод

Gets the requested bit, where true means black.

public this ( int x, int y ) : bool
x int The horizontal component (i.e. which column) ///
y int The vertical component (i.e. which row) ///
Результат bool

xor() публичный Метод

Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding mask bit is set.
public xor ( BitMatrix mask ) : void
mask BitMatrix The mask.
Результат void