Package org.apache.fop.datatypes

Examples of org.apache.fop.datatypes.ColorType


          this.properties.get("font-size").getLength().mvalue();
        //wrapping it up into Fontstate
        FontState fontstate = new FontState(area.getFontInfo(), fontFamily,
                                            fontStyle, fontWeight, fontSize);
        //color properties
        ColorType c = this.properties.get("color").getColorType();
        float red = c.red();
        float green = c.green();
        float blue = c.blue();

        int whiteSpaceCollapse = this.properties.get(
                                    "white-space-collapse").getEnum();
        int wrapOption = this.parent.properties.get("wrap-option").getEnum();
View Full Code Here


  }

  public ColorType getColorType() {
    // Convert numeric value to color ???
    // Convert to hexadecimal and then try to make it into a color?
    return new ColorType((float)0.0, (float)0.0, (float)0.0);
  }
View Full Code Here

    protected Property convertProperty(Property p, PropertyList propertyList,
               FObj fo) {
      if (p instanceof ColorTypeProperty)
  return p;
      ColorType val = p.getColorType();
      if (val != null)
  return new ColorTypeProperty(val);
      return convertPropertyDatatype(p, propertyList, fo);
    }
View Full Code Here

        public Property convertProperty(Property p,
                                        PropertyList propertyList, FObj fo) {
            if (p instanceof ColorTypeProperty)
                return p;
            ColorType val = p.getColorType();
            if (val != null)
                return new ColorTypeProperty(val);
            return convertPropertyDatatype(p, propertyList, fo);
        }
View Full Code Here

    }

    public ColorType getColorType() {
        // Convert numeric value to color ???
        // Convert to hexadecimal and then try to make it into a color?
        return new ColorType((float)0.0, (float)0.0, (float)0.0);
    }
View Full Code Here

            if (colorVal < 0.0 || colorVal > 255.0) {
                throw new PropertyException("Arguments to rgb() must normalize to the range 0 to 1");
            }
            cfvals[i] = colorVal;
        }
        return new ColorTypeProperty(new ColorType(cfvals[0], cfvals[1],
                                                   cfvals[2]));

    }
View Full Code Here

        // this.properties.get("text-shadow");
        // this.properties.get("text-transform");
        // this.properties.get("word-spacing");

        // color properties
        ColorType c = this.properties.get("color").getColorType();
        float red = c.red();
        float green = c.green();
        float blue = c.blue();

        int whiteSpaceCollapse =
            this.properties.get("white-space-collapse").getEnum();
        int wrapOption = this.parent.properties.get("wrap-option").getEnum();
View Full Code Here

        // this.properties.get("text-shadow");
        // this.properties.get("text-transform");
        // this.properties.get("word-spacing");

        // color properties
        ColorType c = this.properties.get("color").getColorType();
        float red = c.red();
        float green = c.green();
        float blue = c.blue();

        int whiteSpaceCollapse =
            this.properties.get("white-space-collapse").getEnum();
        int wrapOption = this.parent.properties.get("wrap-option").getEnum();
View Full Code Here

        ry = ry + area.getBorderTopWidth();
        w = w + area.getBorderLeftWidth() + area.getBorderRightWidth();
        h = h + area.getBorderTopWidth() + area.getBorderBottomWidth();

        BorderAndPadding bp = area.getBorderAndPadding();
        ColorType borderColor;

        if (area.getBorderTopWidth() != 0) {
            borderColor = bp.getBorderColor(BorderAndPadding.TOP);
            addLine(rx, ry, rx + w, ry, area.getBorderTopWidth(),
                    borderColor.red(), borderColor.green(),
                    borderColor.blue());
        }

        if (area.getBorderLeftWidth() != 0) {
            borderColor = bp.getBorderColor(BorderAndPadding.LEFT);
            addLine(rx, ry, rx, ry - h, area.getBorderLeftWidth(),
                    borderColor.red(), borderColor.green(),
                    borderColor.blue());
        }

        if (area.getBorderRightWidth() != 0) {
            borderColor = bp.getBorderColor(BorderAndPadding.RIGHT);
            addLine(rx + w, ry, rx + w, ry - h,
                    area.getBorderRightWidth(), borderColor.red(),
                    borderColor.green(),
                    borderColor.blue());
        }

        if (area.getBorderBottomWidth() != 0) {
            borderColor = bp.getBorderColor(BorderAndPadding.BOTTOM);
            addLine(rx, ry - h, rx + w, ry - h, area.getBorderBottomWidth(),
                    borderColor.red(), borderColor.green(),
                    borderColor.blue());
        }
    }
View Full Code Here

            if (colorVal < 0.0 || colorVal > 255.0) {
                throw new PropertyException("Arguments to rgb() must normalize to the range 0 to 1");
            }
            cfvals[i] = colorVal;
        }
        return new ColorTypeProperty(new ColorType(cfvals[0], cfvals[1],
                                                   cfvals[2]));

    }
View Full Code Here

TOP

Related Classes of org.apache.fop.datatypes.ColorType

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.