Examples of ColorSpace


Examples of java.awt.color.ColorSpace

    public CompositeContext createContext(ColorModel srcCM,
                                          ColorModel dstCM,
                                          RenderingHints hints) {
        if (false) {
            ColorSpace srcCS = srcCM.getColorSpace();
            ColorSpace dstCS = dstCM.getColorSpace();
            System.out.println("srcCS: " + srcCS);
            System.out.println("dstCS: " + dstCS);
            System.out.println
                ("lRGB: " + ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB));
            System.out.println
View Full Code Here

Examples of java.awt.color.ColorSpace

        // SrcOver.  Otherwise things break...
        Composite c = g2d.getComposite();
        if (!SVGComposite.OVER.equals(c))
            return false;
       
        ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);
        if ((g2dCS == null) ||
            (g2dCS != ColorSpace.getInstance(ColorSpace.CS_sRGB))){
            // Only draw directly into sRGB destinations...
            return false;
        }
View Full Code Here

Examples of java.awt.color.ColorSpace

                int yloc = cr.getMinY() + (int)at.getTranslateY();
                cr = new TranslateRed(cr, xloc, yloc);
            }
        }

        ColorSpace g2dCS = getDestinationColorSpace(g2d);
        if (g2dCS == null)
            // Assume device is sRGB
            g2dCS = ColorSpace.getInstance(ColorSpace.CS_sRGB);

        if (g2dCS != srcCM.getColorSpace()) {
View Full Code Here

Examples of java.awt.color.ColorSpace

     * @return    An equivilant image to <tt>src</tt> who's data is in
     *            linear sRGB.
     */
    public static CachableRed convertToLsRGB(CachableRed src) {
        ColorModel cm = src.getColorModel();
        ColorSpace cs = cm.getColorSpace();
        if (cs == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
            return src;

        return new Any2LsRGBRed(src);
    }
View Full Code Here

Examples of java.awt.color.ColorSpace

     * @param src The image to convert to sRGB.
     * @return    An equivilant image to <tt>src</tt> who's data is in sRGB.
     */
    public static CachableRed convertTosRGB(CachableRed src) {
        ColorModel cm = src.getColorModel();
        ColorSpace cs = cm.getColorSpace();
        if (cs == ColorSpace.getInstance(ColorSpace.CS_sRGB))
            return src;

        return new Any2sRGBRed(src);
    }
View Full Code Here

Examples of java.awt.color.ColorSpace

     */
    public static void
        copyData(BufferedImage src, Rectangle srcRect,
                 BufferedImage dst, Point destP) {

        ColorSpace srcCS = src.getColorModel().getColorSpace();
        ColorSpace dstCS = dst.getColorModel().getColorSpace();

        /*
        if (srcCS != dstCS)
            throw new IllegalArgumentException
                ("Images must be in the same ColorSpace in order "+
View Full Code Here

Examples of java.awt.color.ColorSpace

            break;
        default:
            throw new IllegalArgumentException
                ("GaussianBlurRed8Bit only supports one to four band images");
        }
        ColorSpace cs = cm.getColorSpace();
        return new DirectColorModel(cs, 8*b, masks[0], masks[1],
                                    masks[2], masks[3],
                                    true, DataBuffer.TYPE_INT);
    }
View Full Code Here

Examples of org.apache.fop.datatypes.ColorSpace

            someColors.addElement(color2);

            PDFFunction myfunc = this.pdfDoc.makeFunction(2, theDomain, null,
                    color1.getVector(), color2.getVector(), 1.0);

            ColorSpace aColorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
            PDFPattern myPat = this.pdfDoc.createGradient(false, aColorSpace,
                    someColors, null, theCoords);
            currentStream.write(myPat.getColorSpaceOut(fill));

        } else if (paint instanceof TexturePaint) {}
View Full Code Here

Examples of org.apache.fop.datatypes.ColorSpace

        TempImage(int width, int height, byte[] result,
                  byte[] mask) throws FopImageException {
            this.m_height = height;
            this.m_width = width;
            this.m_bitsPerPixel = 8;
            this.m_colorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
            // this.m_isTransparent = false;
            // this.m_bitmapsSize = this.m_width * this.m_height * 3;
            this.m_bitmaps = result;
            this.m_mask = mask;
        }
View Full Code Here

Examples of org.apache.fop.datatypes.ColorSpace

            someColors.addElement(color1);
            PDFColor color2 = new PDFColor(c2.getRed(), c2.getGreen(),
                                           c2.getBlue());
            someColors.addElement(color2);

            ColorSpace aColorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
        } else if (paint instanceof TexturePaint) {}
    }
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.