Examples of FSRGBColor


Examples of org.xhtmlrenderer.css.parser.FSRGBColor

        draw(line);
    }
   
    public void setColor(FSColor color) {
        if (color instanceof FSRGBColor) {
            FSRGBColor rgb = (FSRGBColor)color;
            _color = new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        } else if (color instanceof FSCMYKColor) {
            FSCMYKColor cmyk = (FSCMYKColor)color;
            _color = new CMYKColor(cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack());
        } else {
            throw new RuntimeException("internal error: unsupported color class " + color.getClass().getName());
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

        draw(bounds);
    }

    public void setColor(FSColor color) {
        if (color instanceof FSRGBColor) {
            FSRGBColor rgb = (FSRGBColor) color;
            _color = new BaseColor(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        } else if (color instanceof FSCMYKColor) {
            FSCMYKColor cmyk = (FSCMYKColor) color;
            _color = new CMYKColor(cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack());
        } else {
            throw new RuntimeException("internal error: unsupported color class " + color.getClass().getName());
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

    private void drawFontMetrics(RenderingContext c, InlineText inlineText) {
        InlineLayoutBox iB = inlineText.getParent();
        String text = inlineText.getSubstring();
       
        setColor(new FSRGBColor(0xFF, 0x33, 0xFF));
       
        FSFontMetrics fm = iB.getStyle().getFSFontMetrics(null);
        int width = c.getTextRenderer().getWidth(
                c.getFontContext(),
                iB.getStyle().getFSFont(c), text);
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

        draw(line);
    }
   
    public void setColor(FSColor color) {
        if (color instanceof FSRGBColor) {
            FSRGBColor rgb = (FSRGBColor)color;
            _color = new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        } else if (color instanceof FSCMYKColor) {
            FSCMYKColor cmyk = (FSCMYKColor)color;
            _color = new CMYKColor(cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack());
        } else {
            throw new RuntimeException("internal error: unsupported color class " + color.getClass().getName());
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

        }
    }
   
    public void setColor(FSColor color) {
        if (color instanceof FSRGBColor) {
            FSRGBColor rgb = (FSRGBColor)color;
            _graphics.setColor(new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue()));
        } else {
            throw new RuntimeException("internal error: unsupported color class " + color.getClass().getName());
        }
    }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

    }

    PageBox page = c.getPage();
    result = page.getStyle().getBackgroundColor();
    if (result == null) {
      return new FSRGBColor(255, 255, 255);
    } else {
      return result;
    }
  }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

            checkInheritAllowed(value, inheritAllowed);
            if (value.getCssValueType() != CSSPrimitiveValue.CSS_INHERIT) {
                checkIdentOrColorType(cssName, value);
               
                if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
                    FSRGBColor color = Conversions.getColor(value.getStringValue());
                    if (color != null) {
                        return Collections.singletonList(
                                new PropertyDeclaration(
                                        cssName,
                                        new PropertyValue(color),
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

   
    protected void setStrokeColor(PdfTemplate template, FSColor color)
    {
        if (color instanceof FSRGBColor)
        {
            FSRGBColor rgb = (FSRGBColor)color;
            template.setRGBColorStroke(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        }
        else if (color instanceof FSCMYKColor)
        {
            FSCMYKColor cmyk = (FSCMYKColor)color;
            template.setCMYKColorStroke(
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

   
    protected void setFillColor(PdfTemplate template, FSColor color)
    {
        if (color instanceof FSRGBColor)
        {
            FSRGBColor rgb = (FSRGBColor)color;
            template.setRGBColorFill(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        }
        else if (color instanceof FSCMYKColor)
        {
            FSCMYKColor cmyk = (FSCMYKColor)color;
            template.setCMYKColorFill(
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSRGBColor

        }

        PageBox page = c.getPage();
        result = page.getStyle().getBackgroundColor();
        if (result == null) {
            return new FSRGBColor(255, 255, 255);
        } else {
            return result;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.