Package java.awt.image

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


/*      */       }
/*      */     } else {
/* 2203 */       SampleModel sm = this.sampleModel;
/* 2204 */       if ((sm.getWidth() != region.width) || (sm.getHeight() != region.height))
/*      */       {
/* 2206 */         sm = sm.createCompatibleSampleModel(region.width, region.height);
/*      */       }
/*      */
/*      */       try
/*      */       {
/* 2211 */         dstRaster = createWritableRaster(sm, region.getLocation());
View Full Code Here


/* 2324 */       Rectangle region = getBounds();
/*      */
/* 2326 */       SampleModel sm = getSampleModel();
/* 2327 */       if ((sm.getWidth() != region.width) || (sm.getHeight() != region.height))
/*      */       {
/* 2329 */         sm = sm.createCompatibleSampleModel(region.width, region.height);
/*      */       }
/*      */
/* 2332 */       raster = createWritableRaster(sm, region.getLocation());
/*      */     } else {
/* 2334 */       region = raster.getBounds().intersection(getBounds());
View Full Code Here

/*      */     }
/*      */
/* 2461 */     SampleModel destSM = getSampleModel();
/* 2462 */     if ((destSM.getWidth() != region.width) || (destSM.getHeight() != region.height))
/*      */     {
/* 2464 */       destSM = destSM.createCompatibleSampleModel(region.width, region.height);
/*      */     }
/*      */
/* 2469 */     WritableRaster dest = createWritableRaster(destSM, region.getLocation());
/*      */
/* 2472 */     copyExtendedData(dest, extender);
View Full Code Here

/*  84 */     super(sourceUnder, sourceOver, layoutHelper(layout, vectorize(sourceUnder, sourceOver), config), config, true);
/*     */
/*  89 */     SampleModel srcSM = sourceUnder.getSampleModel();
/*  90 */     if ((this.sampleModel.getTransferType() != srcSM.getTransferType()) || (this.sampleModel.getNumBands() != srcSM.getNumBands()))
/*     */     {
/*  92 */       this.sampleModel = srcSM.createCompatibleSampleModel(this.tileWidth, this.tileHeight);
/*     */
/*  95 */       if ((this.colorModel != null) && (!JDKWorkarounds.areCompatibleDataModels(this.sampleModel, this.colorModel)))
/*     */       {
/*  98 */         this.colorModel = ImageUtil.getCompatibleColorModel(this.sampleModel, config);
/*     */       }
View Full Code Here

    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

                int mult = (int)Math.ceil(Math.sqrt(smSz/stepSz));
                xSz *= mult;
                ySz *= mult;
            }
            // System.out.println("Using Raster for pattern");
            sm = sm.createCompatibleSampleModel(xSz, ySz);
            raster = Raster.createWritableRaster
                (sm, new Point(tile.getMinX(), tile.getMinY()));
        }
       
        is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(sm, false);
View Full Code Here

        // if (w > width)  w = width;
        int h = sm.getHeight();
        if (h < defSz) h = defSz;
        if (h > stepY) h = stepY;
        // if (h > height) h = height;
        return sm.createCompatibleSampleModel(w, h);
    }
}
View Full Code Here

        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

        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

        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.