com.google.zxing.Dimension#getHeight ( )源码实例Demo

下面列出了com.google.zxing.Dimension#getHeight ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ZXing-Orient   文件: SymbolInfo.java
public static SymbolInfo lookup(int dataCodewords,
                                SymbolShapeHint shape, 
                                Dimension minSize, 
                                Dimension maxSize, 
                                boolean fail) {
  for (SymbolInfo symbol : symbols) {
    if (shape == SymbolShapeHint.FORCE_SQUARE && symbol.rectangular) {
      continue;
    }
    if (shape == SymbolShapeHint.FORCE_RECTANGLE && !symbol.rectangular) {
      continue;
    }
    if (minSize != null
        && (symbol.getSymbolWidth() < minSize.getWidth()
        || symbol.getSymbolHeight() < minSize.getHeight())) {
      continue;
    }
    if (maxSize != null
        && (symbol.getSymbolWidth() > maxSize.getWidth()
        || symbol.getSymbolHeight() > maxSize.getHeight())) {
      continue;
    }
    if (dataCodewords <= symbol.dataCapacity) {
      return symbol;
    }
  }
  if (fail) {
    throw new IllegalArgumentException(
        "Can't find a symbol arrangement that matches the message. Data codewords: "
            + dataCodewords);
  }
  return null;
}
 
public static SymbolInfo lookup(int dataCodewords,
                                SymbolShapeHint shape, 
                                Dimension minSize, 
                                Dimension maxSize, 
                                boolean fail) {
  for (SymbolInfo symbol : symbols) {
    if (shape == SymbolShapeHint.FORCE_SQUARE && symbol.rectangular) {
      continue;
    }
    if (shape == SymbolShapeHint.FORCE_RECTANGLE && !symbol.rectangular) {
      continue;
    }
    if (minSize != null
        && (symbol.getSymbolWidth() < minSize.getWidth()
        || symbol.getSymbolHeight() < minSize.getHeight())) {
      continue;
    }
    if (maxSize != null
        && (symbol.getSymbolWidth() > maxSize.getWidth()
        || symbol.getSymbolHeight() > maxSize.getHeight())) {
      continue;
    }
    if (dataCodewords <= symbol.dataCapacity) {
      return symbol;
    }
  }
  if (fail) {
    throw new IllegalArgumentException(
        "Can't find a symbol arrangement that matches the message. Data codewords: "
            + dataCodewords);
  }
  return null;
}
 
源代码3 项目: weex   文件: SymbolInfo.java
public static SymbolInfo lookup(int dataCodewords,
                                SymbolShapeHint shape, 
                                Dimension minSize, 
                                Dimension maxSize, 
                                boolean fail) {
  for (SymbolInfo symbol : symbols) {
    if (shape == SymbolShapeHint.FORCE_SQUARE && symbol.rectangular) {
      continue;
    }
    if (shape == SymbolShapeHint.FORCE_RECTANGLE && !symbol.rectangular) {
      continue;
    }
    if (minSize != null
        && (symbol.getSymbolWidth() < minSize.getWidth()
        || symbol.getSymbolHeight() < minSize.getHeight())) {
      continue;
    }
    if (maxSize != null
        && (symbol.getSymbolWidth() > maxSize.getWidth()
        || symbol.getSymbolHeight() > maxSize.getHeight())) {
      continue;
    }
    if (dataCodewords <= symbol.dataCapacity) {
      return symbol;
    }
  }
  if (fail) {
    throw new IllegalArgumentException(
        "Can't find a symbol arrangement that matches the message. Data codewords: "
            + dataCodewords);
  }
  return null;
}
 
源代码4 项目: barcodescanner-lib-aar   文件: SymbolInfo.java
public static SymbolInfo lookup(int dataCodewords,
                                SymbolShapeHint shape, 
                                Dimension minSize, 
                                Dimension maxSize, 
                                boolean fail) {
  for (SymbolInfo symbol : symbols) {
    if (shape == SymbolShapeHint.FORCE_SQUARE && symbol.rectangular) {
      continue;
    }
    if (shape == SymbolShapeHint.FORCE_RECTANGLE && !symbol.rectangular) {
      continue;
    }
    if (minSize != null
        && (symbol.getSymbolWidth() < minSize.getWidth()
        || symbol.getSymbolHeight() < minSize.getHeight())) {
      continue;
    }
    if (maxSize != null
        && (symbol.getSymbolWidth() > maxSize.getWidth()
        || symbol.getSymbolHeight() > maxSize.getHeight())) {
      continue;
    }
    if (dataCodewords <= symbol.dataCapacity) {
      return symbol;
    }
  }
  if (fail) {
    throw new IllegalArgumentException(
        "Can't find a symbol arrangement that matches the message. Data codewords: "
            + dataCodewords);
  }
  return null;
}
 
源代码5 项目: RipplePower   文件: SymbolInfo.java
public static SymbolInfo lookup(int dataCodewords, SymbolShapeHint shape, Dimension minSize, Dimension maxSize,
		boolean fail) {
	for (SymbolInfo symbol : symbols) {
		if (shape == SymbolShapeHint.FORCE_SQUARE && symbol.rectangular) {
			continue;
		}
		if (shape == SymbolShapeHint.FORCE_RECTANGLE && !symbol.rectangular) {
			continue;
		}
		if (minSize != null && (symbol.getSymbolWidth() < minSize.getWidth()
				|| symbol.getSymbolHeight() < minSize.getHeight())) {
			continue;
		}
		if (maxSize != null && (symbol.getSymbolWidth() > maxSize.getWidth()
				|| symbol.getSymbolHeight() > maxSize.getHeight())) {
			continue;
		}
		if (dataCodewords <= symbol.dataCapacity) {
			return symbol;
		}
	}
	if (fail) {
		throw new IllegalArgumentException(
				"Can't find a symbol arrangement that matches the message. Data codewords: " + dataCodewords);
	}
	return null;
}
 
 方法所在类