@Immutable public static final class LevelUpQrCodeGenerator.LevelUpQrCodeImage extends Object
A bitmap of a QR code with information about the QR code targets. The code is rotated 180° from the standard QR Code position.
The targets are the three squares-with-a-square-in-them in the corners of the QR code.
Constructor and Description |
---|
LevelUpQrCodeImage(Bitmap bitmap,
int targetSize,
int codeMargin)
Create a new
LevelUpQrCodeGenerator.LevelUpQrCodeImage . |
Modifier and Type | Method and Description |
---|---|
Bitmap |
getBitmap() |
int |
getCodeMargin() |
int[] |
getTargetBottomLeft()
Gets the position of the bottom left target marker within the bitmap.
|
int[] |
getTargetBottomRight()
Gets the position of the bottom right target marker within the bitmap.
|
int |
getTargetSize() |
int[] |
getTargetTopRight()
Gets the position of the top right target marker within the bitmap.
|
public LevelUpQrCodeImage(Bitmap bitmap, int targetSize, int codeMargin)
LevelUpQrCodeGenerator.LevelUpQrCodeImage
. Width and height are extracted from the bitmap.bitmap
- an immutable bitmap representing the given QR code. This should be rotated
180° from the standard orientation.targetSize
- the width of the target marker, in pixels. This must be the same for
all target markers.codeMargin
- the width between the edge of the bitmap and the first black pixel.
This must be the same on all sides.public Bitmap getBitmap()
public int getCodeMargin()
public int[] getTargetBottomLeft()
[left, top, right, bottom]
, in pixels. Note: as this is a primitive, it
cannot be made immutable and should therefore not be modified.public int[] getTargetBottomRight()
[left, top, right, bottom]
, in pixels. Note: as this is a primitive, it
cannot be made immutable and should therefore not be modified.public int getTargetSize()
public int[] getTargetTopRight()
[left, top, right, bottom]
, in pixels. Note: as this is a primitive, it
cannot be made immutable and should therefore not be modified.