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

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

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

XSSFColor.getRGBOrARGB介绍

暂无

代码示例

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

  1. /**
  2. * Standard Alpha Red Green Blue ctColor value (ARGB).
  3. */
  4. @Override
  5. public byte[] getARGB() {
  6. byte[] rgb = getRGBOrARGB();
  7. if(rgb == null) {
  8. return null;
  9. }
  10. if(rgb.length == 3) {
  11. // Pad with the default Alpha
  12. byte[] tmp = new byte[4];
  13. tmp[0] = -1;
  14. System.arraycopy(rgb, 0, tmp, 1, 3);
  15. return tmp;
  16. } else {
  17. return rgb;
  18. }
  19. }

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

  1. /**
  2. * Standard Red Green Blue ctColor value (RGB).
  3. * If there was an A (Alpha) value, it will be stripped.
  4. */
  5. @Override
  6. public byte[] getRGB() {
  7. byte[] rgb = getRGBOrARGB();
  8. if(rgb == null) {
  9. return null;
  10. }
  11. if(rgb.length == 4) {
  12. // Need to trim off the alpha
  13. byte[] tmp = new byte[3];
  14. System.arraycopy(rgb, 1, tmp, 0, 3);
  15. return tmp;
  16. } else {
  17. return rgb;
  18. }
  19. }

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

  1. /**
  2. * Standard Red Green Blue ctColor value (RGB).
  3. * If there was an A (Alpha) value, it will be stripped.
  4. */
  5. public byte[] getRgb() {
  6. byte[] rgb = getRGBOrARGB();
  7. if(rgb == null) return null;
  8. if(rgb.length == 4) {
  9. // Need to trim off the alpha
  10. byte[] tmp = new byte[3];
  11. System.arraycopy(rgb, 1, tmp, 0, 3);
  12. return tmp;
  13. } else {
  14. return rgb;
  15. }
  16. }

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

  1. /**
  2. * Standard Alpha Red Green Blue ctColor value (ARGB).
  3. */
  4. public byte[] getARgb() {
  5. byte[] rgb = getRGBOrARGB();
  6. if(rgb == null) return null;
  7. if(rgb.length == 3) {
  8. // Pad with the default Alpha
  9. byte[] tmp = new byte[4];
  10. tmp[0] = -1;
  11. System.arraycopy(rgb, 0, tmp, 1, 3);
  12. return tmp;
  13. } else {
  14. return rgb;
  15. }
  16. }

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

  1. /**
  2. * Standard Red Green Blue ctColor value (RGB).
  3. * If there was an A (Alpha) value, it will be stripped.
  4. */
  5. @Override
  6. public byte[] getRGB() {
  7. byte[] rgb = getRGBOrARGB();
  8. if(rgb == null) {
  9. return null;
  10. }
  11. if(rgb.length == 4) {
  12. // Need to trim off the alpha
  13. byte[] tmp = new byte[3];
  14. System.arraycopy(rgb, 1, tmp, 0, 3);
  15. return tmp;
  16. } else {
  17. return rgb;
  18. }
  19. }

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

  1. /**
  2. * Standard Alpha Red Green Blue ctColor value (ARGB).
  3. */
  4. @Override
  5. public byte[] getARGB() {
  6. byte[] rgb = getRGBOrARGB();
  7. if(rgb == null) {
  8. return null;
  9. }
  10. if(rgb.length == 3) {
  11. // Pad with the default Alpha
  12. byte[] tmp = new byte[4];
  13. tmp[0] = -1;
  14. System.arraycopy(rgb, 0, tmp, 1, 3);
  15. return tmp;
  16. } else {
  17. return rgb;
  18. }
  19. }

相关文章