mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Supplement for #271 to deprecate alternative min/max size hint
This commit is contained in:
parent
45e591b9ef
commit
51bee78535
|
@ -44,12 +44,19 @@ public enum EncodeHintType {
|
|||
|
||||
/**
|
||||
* Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
||||
*
|
||||
* @deprecated use width/height params in
|
||||
* {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
MIN_SIZE,
|
||||
|
||||
/**
|
||||
* Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
||||
*
|
||||
* @deprecated without replacement
|
||||
*/
|
||||
@Deprecated
|
||||
MAX_SIZE,
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,10 +67,12 @@ public final class DataMatrixWriter implements Writer {
|
|||
if (requestedShape != null) {
|
||||
shape = requestedShape;
|
||||
}
|
||||
@SuppressWarnings("deprecated")
|
||||
Dimension requestedMinSize = (Dimension) hints.get(EncodeHintType.MIN_SIZE);
|
||||
if (requestedMinSize != null) {
|
||||
minSize = requestedMinSize;
|
||||
}
|
||||
@SuppressWarnings("deprecated")
|
||||
Dimension requestedMaxSize = (Dimension) hints.get(EncodeHintType.MAX_SIZE);
|
||||
if (requestedMaxSize != null) {
|
||||
maxSize = requestedMaxSize;
|
||||
|
|
Loading…
Reference in a new issue