Package org.apache.poi.hslf.record

Examples of org.apache.poi.hslf.record.ColorSchemeAtom


        Sheet sheet = getSheet();
        if (fSchemeIndex && sheet != null)
        {
            //red is the index to the color scheme
            ColorSchemeAtom ca = sheet.getColorScheme();
            int schemeColor = ca.getColor(r);

            r = (schemeColor >> 0) & 0xFF;
            g = (schemeColor >> 8) & 0xFF;
            b = (schemeColor >> 16) & 0xFF;
        } else if (fPaletteIndex){
View Full Code Here


            // Color is an sRGB value specified by red, green, and blue fields.
        } else if (a == 0xFF){
            // Color is undefined.
        } else {
            // index in the color scheme
            ColorSchemeAtom ca = getSheet().getColorScheme();
            int schemeColor = ca.getColor(a);

            r = (schemeColor >> 0) & 0xFF;
            g = (schemeColor >> 8) & 0xFF;
            b = (schemeColor >> 16) & 0xFF;
        }
View Full Code Here

  public Color getFontColor() {
    int rgb = getCharTextPropVal("font.color");

    int cidx = rgb >> 24;
    if (rgb % 0x1000000 == 0){
      ColorSchemeAtom ca = parentRun.getSheet().getColorScheme();
      if(cidx >= 0 && cidx <= 7) rgb = ca.getColor(cidx);
    }
    Color tmp = new Color(rgb, true);
    return new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
  }
View Full Code Here

    int rgb = getParaTextPropVal("bullet.color");
    if(rgb == -1) return getFontColor();

    int cidx = rgb >> 24;
    if (rgb % 0x1000000 == 0){
      ColorSchemeAtom ca = parentRun.getSheet().getColorScheme();
      if(cidx >= 0 && cidx <= 7) rgb = ca.getColor(cidx);
    }
    Color tmp = new Color(rgb, true);
    return new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
  }
View Full Code Here

        if (p1 != null && (p2val  & 0x8) != 0){
            int rgb = p1.getPropertyValue();
            if (rgb >= 0x8000000) {
                int idx = rgb % 0x8000000;
                if(getSheet() != null) {
                    ColorSchemeAtom ca = getSheet().getColorScheme();
                    if(idx >= 0 && idx <= 7) rgb = ca.getColor(idx);
                }
            }
            Color tmp = new Color(rgb, true);
            clr = new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
        }
View Full Code Here

        if (p1 != null && (p2val  & 0x10) != 0){
            int rgb = p1.getPropertyValue();
            if (rgb >= 0x8000000) {
                int idx = rgb % 0x8000000;
                if(getSheet() != null) {
                    ColorSchemeAtom ca = getSheet().getColorScheme();
                    rgb = ca.getColor(idx);
                }
            }
            Color tmp = new Color(rgb, true);
            clr = new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
        }
View Full Code Here

    }

    protected Color getColor(int rgb){
        if (rgb >= 0x8000000) {
            int idx = rgb - 0x8000000;
            ColorSchemeAtom ca = getSheet().getColorScheme();
            if(idx >= 0 && idx <= 7) rgb = ca.getColor(idx);
        }
        Color tmp = new Color(rgb, true);
        return new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
    }
View Full Code Here

   */
  public Color getFontColor() {
        int rgb = getCharTextPropVal("font.color");
        if (rgb >= 0x8000000) {
            int idx = rgb % 0x8000000;
            ColorSchemeAtom ca = parentRun.getSheet().getColorScheme();
            if(idx >= 0 && idx <= 7) rgb = ca.getColor(idx);
        }

        Color tmp = new Color(rgb, true);
        return new Color(tmp.getBlue(), tmp.getGreen(), tmp.getRed());
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hslf.record.ColorSchemeAtom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.