org.apache.poi.xssf.usermodel.XSSFColor.getARGB()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(297)

本文整理了Java中org.apache.poi.xssf.usermodel.XSSFColor.getARGB()方法的一些代码示例,展示了XSSFColor.getARGB()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFColor.getARGB()方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFColor
类名称:XSSFColor
方法名:getARGB

XSSFColor.getARGB介绍

[英]Standard Alpha Red Green Blue ctColor value (ARGB).
[中]标准阿尔法红-绿-蓝ctColor值(ARGB)。

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

  1. private boolean sameARGB(XSSFColor other) {
  2. if (isRGB() == other.isRGB()) {
  3. return !isRGB() || Arrays.equals(getARGB(), other.getARGB());
  4. }
  5. return false;
  6. }
  7. private boolean sameTheme(XSSFColor other) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

  1. private boolean sameARGB(XSSFColor other) {
  2. if (isRGB() == other.isRGB()) {
  3. return !isRGB() || Arrays.equals(getARGB(), other.getARGB());
  4. }
  5. return false;
  6. }
  7. private boolean sameTheme(XSSFColor other) {

代码示例来源:origin: org.apache.poi/poi-examples

  1. private void styleColor(Formatter out, String attr, XSSFColor color) {
  2. if (color == null || color.isAuto()) {
  3. return;
  4. }
  5. byte[] rgb = color.getRGB();
  6. if (rgb == null) {
  7. return;
  8. }
  9. // This is done twice -- rgba is new with CSS 3, and browser that don't
  10. // support it will ignore the rgba specification and stick with the
  11. // solid color, which is declared first
  12. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  13. byte[] argb = color.getARGB();
  14. if (argb == null) {
  15. return;
  16. }
  17. out.format(" %s: rgba(0x%02x, 0x%02x, 0x%02x, 0x%02x);%n", attr,
  18. argb[3], argb[0], argb[1], argb[2]);
  19. }
  20. }

相关文章