• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ComponentDataBlitOp类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中gnu.java.awt.ComponentDataBlitOp的典型用法代码示例。如果您正苦于以下问题:Java ComponentDataBlitOp类的具体用法?Java ComponentDataBlitOp怎么用?Java ComponentDataBlitOp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ComponentDataBlitOp类属于gnu.java.awt包,在下文中一共展示了ComponentDataBlitOp类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setData

点赞 3

import gnu.java.awt.ComponentDataBlitOp; //导入依赖的package包/类
public void setData(Raster src)
{
  int x = src.getMinX();
  int y = src.getMinY();
  int w = src.getWidth();
  int h = src.getHeight();

  // create a dest child that has the right bounds...
  WritableRaster dest =
    raster.createWritableChild(x, y, w, h, x, y, null);

  if (src.getSampleModel () instanceof ComponentSampleModel
      && dest.getSampleModel () instanceof ComponentSampleModel)

    // Refer to ComponentDataBlitOp for optimized data blitting:
    ComponentDataBlitOp.INSTANCE.filter(src, dest);
  else
    {
      // slower path
      int samples[] = src.getPixels (x, y, w, h, (int [])null);
      dest.setPixels (x, y, w, h, samples);
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:24,
代码来源:BufferedImage.java

示例2: setData

点赞 3

import gnu.java.awt.ComponentDataBlitOp; //导入依赖的package包/类
public void setData(Raster src)
{
  int x = src.getMinX();
  int y = src.getMinY();
  int w = src.getWidth();
  int h = src.getHeight();
  
  // create a dest child that has the right bounds...
  WritableRaster dest =
    raster.createWritableChild(x, y, w, h, x, y, null);

  if (src.getSampleModel () instanceof ComponentSampleModel
      && dest.getSampleModel () instanceof ComponentSampleModel)

    // Refer to ComponentDataBlitOp for optimized data blitting:
    ComponentDataBlitOp.INSTANCE.filter(src, dest);
  else
    {
      // slower path
      int samples[] = src.getPixels (x, y, w, h, (int [])null);
      dest.setPixels (x, y, w, h, samples);
    }
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:24,
代码来源:BufferedImage.java

示例3: copyData

点赞 2

import gnu.java.awt.ComponentDataBlitOp; //导入依赖的package包/类
public WritableRaster copyData(WritableRaster dest)
{
  if (dest == null)
    dest = raster.createCompatibleWritableRaster(getMinX(), getMinY(),
                                                 getWidth(),getHeight());

  int x = dest.getMinX();
  int y = dest.getMinY();
  int w = dest.getWidth();
  int h = dest.getHeight();

  // create a src child that has the right bounds...
  WritableRaster src =
    raster.createWritableChild(x, y, w, h, x, y,
                               null);  // same bands

  if (src.getSampleModel () instanceof ComponentSampleModel
      && dest.getSampleModel () instanceof ComponentSampleModel)
    // Refer to ComponentDataBlitOp for optimized data blitting:
    ComponentDataBlitOp.INSTANCE.filter(src, dest);

  else
    {
      // slower path
      int samples[] = src.getPixels (x, y, w, h, (int [])null);
      dest.setPixels (x, y, w, h, samples);
    }
  return dest;
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:30,
代码来源:BufferedImage.java

示例4: copyData

点赞 2

import gnu.java.awt.ComponentDataBlitOp; //导入依赖的package包/类
public WritableRaster copyData(WritableRaster dest)
{
  if (dest == null)
    dest = raster.createCompatibleWritableRaster(getMinX(), getMinY(),
                                                 getWidth(),getHeight());

  int x = dest.getMinX();
  int y = dest.getMinY();
  int w = dest.getWidth();
  int h = dest.getHeight();
  
  // create a src child that has the right bounds...
  WritableRaster src =
    raster.createWritableChild(x, y, w, h, x, y,
                               null);  // same bands
  
  if (src.getSampleModel () instanceof ComponentSampleModel
      && dest.getSampleModel () instanceof ComponentSampleModel)
    // Refer to ComponentDataBlitOp for optimized data blitting:
    ComponentDataBlitOp.INSTANCE.filter(src, dest);
  
  else
    {
      // slower path
      int samples[] = src.getPixels (x, y, w, h, (int [])null);
      dest.setPixels (x, y, w, h, samples);
    }
  return dest;
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:30,
代码来源:BufferedImage.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)