Examples of createCompatibleSampleModel()


Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

                // Get the SampleModel.
                if(layout.isValid(ImageLayout.SAMPLE_MODEL_MASK)) {
                    sm = layout.getSampleModel(null);
                    if(sm.getWidth() != tileWidth ||
                       sm.getHeight() != tileHeight) {
                        sm = sm.createCompatibleSampleModel(tileWidth,
                                                            tileHeight);
                    }
                    if(layoutObserved != null) {
                        layoutObserved.setSampleModel(sm);
                    }
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        } // hints != null

        // Ensure that the SampleModel is compatible with the tile size.
        if(sm != null &&
           (sm.getWidth() != tileWidth || sm.getHeight() != tileHeight)) {
            sm = sm.createCompatibleSampleModel(tileWidth, tileHeight);
        }

        // Attempt to derive compatible SampleModel/ColorModel combination.
        if(cm != null && (sm == null ||
                          !JDKWorkarounds.areCompatibleDataModels(sm, cm))) {
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        /* Validate destination sampleModel. */
        SampleModel srcSM = sourceUnder.getSampleModel();
        if (sampleModel.getTransferType() != srcSM.getTransferType() ||
            sampleModel.getNumBands() != srcSM.getNumBands()) {
            sampleModel = srcSM.createCompatibleSampleModel(
                                tileWidth, tileHeight);

            if(colorModel != null &&
               !JDKWorkarounds.areCompatibleDataModels(sampleModel,
                                                       colorModel)) {
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        if ((workingBaseRaster == null) ||
            (workingBaseRaster.getWidth()  < w) ||
            (workingBaseRaster.getHeight() < h)) {

            sm = sm.createCompatibleSampleModel(w, h);
           
            workingBaseRaster
                = Raster.createWritableRaster(sm, new Point(0,0));

            workingRaster = workingBaseRaster.createWritableChild
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        if (h < defSz) h = defSz;
        if (h > bounds.height) h = bounds.height;

        // System.out.println("Pad SMSz: " + w + "x" + h);

        return sm.createCompatibleSampleModel(w, h);
    }
}
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

    public WritableRaster copyData(WritableRaster wr) {
        ColorModel  cm    = getColorModel();
        CachableRed cr    = getSource();
        ColorModel  srcCM = cr.getColorModel();
        SampleModel srcSM = cr.getSampleModel();
        srcSM = srcSM.createCompatibleSampleModel(wr.getWidth(),
                                                  wr.getHeight());
        WritableRaster srcWR;
        srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(),
                                                             wr.getMinY()));
        getSource().copyData(srcWR);
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        if ((workingBaseRaster == null) ||
            (workingBaseRaster.getWidth()  < w) ||
            (workingBaseRaster.getHeight() < h)) {

            sm = sm.createCompatibleSampleModel(w, h);
           
            workingBaseRaster
                = Raster.createWritableRaster(sm, new Point(0,0));
        }
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        if ((workingBaseRaster == null) ||
            (workingBaseRaster.getWidth()  < w) ||
            (workingBaseRaster.getHeight() < h)) {

            sm = sm.createCompatibleSampleModel(w, h);
           
            workingBaseRaster
                = Raster.createWritableRaster(sm, new Point(0,0));
        }
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        if (h < defSz) h = defSz;
        if (h > bounds.height) h = bounds.height;

        // System.out.println("Pad SMSz: " + w + "x" + h);

        return sm.createCompatibleSampleModel(w, h);
    }
}
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        SampleModel  sm   = getSampleModel();

        CachableRed cr    = getSource();
        ColorModel  srcCM = cr.getColorModel();
        SampleModel srcSM = cr.getSampleModel();
        srcSM = srcSM.createCompatibleSampleModel(wr.getWidth(),
                                                  wr.getHeight());
        WritableRaster srcWR;
        srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(),
                                                             wr.getMinY()));
        getSource().copyData(srcWR);
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.