com.koolearn.klibrary.ui.android.image.ZLAndroidImageData类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中com.koolearn.klibrary.ui.android.image.ZLAndroidImageData类的一些代码示例,展示了ZLAndroidImageData类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLAndroidImageData类的具体详情如下:
包路径:com.koolearn.klibrary.ui.android.image.ZLAndroidImageData
类名称:ZLAndroidImageData

ZLAndroidImageData介绍

暂无

代码示例

代码示例来源:origin: ydcx/KooReader

public Bitmap getFullSizeBitmap() {
  return getBitmap(null, ZLPaintContext.ScalingType.FitMaximum);
}

代码示例来源:origin: ydcx/KooReader

if (myRealWidth <= 0) {
  options.inJustDecodeBounds = true;
  decodeWithOptions(options);
  myRealWidth = options.outWidth;
  myRealHeight = options.outHeight;
myBitmap = decodeWithOptions(options);
if (myBitmap != null) {
  switch (scaling) {

代码示例来源:origin: Jiangzqts/EpubRead

if (myRealWidth <= 0) {
  options.inJustDecodeBounds = true;
  decodeWithOptions(options);
  myRealWidth = options.outWidth;
  myRealHeight = options.outHeight;
myBitmap = decodeWithOptions(options);
if (myBitmap != null) {
  switch (scaling) {

代码示例来源:origin: Jiangzqts/EpubRead

public Bitmap getFullSizeBitmap() {
  return getBitmap(null, ZLPaintContext.ScalingType.FitMaximum);
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
public Size imageSize(ZLImageData imageData, Size maxSize, ScalingType scaling) {
  final Bitmap bitmap = ((ZLAndroidImageData) imageData).getBitmap(maxSize, scaling);
  return (bitmap != null && !bitmap.isRecycled())
      ? new Size(bitmap.getWidth(), bitmap.getHeight()) : null;
}

代码示例来源:origin: ydcx/KooReader

@Override
public Size imageSize(ZLImageData imageData, Size maxSize, ScalingType scaling) {
  final Bitmap bitmap = ((ZLAndroidImageData) imageData).getBitmap(maxSize, scaling);
  return (bitmap != null && !bitmap.isRecycled())
      ? new Size(bitmap.getWidth(), bitmap.getHeight()) : null;
}

代码示例来源:origin: ydcx/KooReader

public Bitmap getBitmap(int maxWidth, int maxHeight) {
  return getBitmap(new ZLPaintContext.Size(maxWidth, maxHeight), ZLPaintContext.ScalingType.FitMaximum);
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
public void drawImage(int x, int y, ZLImageData imageData, Size maxSize, ScalingType scaling, ColorAdjustingMode adjustingMode) {
  final Bitmap bitmap = ((ZLAndroidImageData) imageData).getBitmap(maxSize, scaling);
  if (bitmap != null && !bitmap.isRecycled()) {
    switch (adjustingMode) {
      case LIGHTEN_TO_BACKGROUND:
        myFillPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.LIGHTEN));
        break;
      case DARKEN_TO_BACKGROUND:
        myFillPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DARKEN));
        break;
      case NONE:
        break;
    }
    myCanvas.drawBitmap(bitmap, x, y - bitmap.getHeight(), myFillPaint);
    myFillPaint.setXfermode(null);
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

public Bitmap getBitmap(int maxWidth, int maxHeight) {
  return getBitmap(new ZLPaintContext.Size(maxWidth, maxHeight), ZLPaintContext.ScalingType.FitMaximum);
}

代码示例来源:origin: ydcx/KooReader

@Override
public void drawImage(int x, int y, ZLImageData imageData, Size maxSize, ScalingType scaling, ColorAdjustingMode adjustingMode) {
  final Bitmap bitmap = ((ZLAndroidImageData) imageData).getBitmap(maxSize, scaling);
  if (bitmap != null && !bitmap.isRecycled()) {
    switch (adjustingMode) {
      case LIGHTEN_TO_BACKGROUND:
        myFillPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.LIGHTEN));
        break;
      case DARKEN_TO_BACKGROUND:
        myFillPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DARKEN));
        break;
      case NONE:
        break;
    }
    myCanvas.drawBitmap(bitmap, x, y - bitmap.getHeight(), myFillPaint);
    myFillPaint.setXfermode(null);
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

Bitmap getBitmap(ZLImage image) {
  final ZLAndroidImageManager mgr = (ZLAndroidImageManager)ZLAndroidImageManager.Instance();
  final ZLAndroidImageData data = mgr.getImageData(image);
  if (data == null) {
    return null;
  }
  return data.getBitmap(2 * myCoverWidth, 2 * myCoverHeight);
}

代码示例来源:origin: ydcx/KooReader

Bitmap getBitmap(ZLImage image) {
  final ZLAndroidImageManager mgr = (ZLAndroidImageManager)ZLAndroidImageManager.Instance();
  final ZLAndroidImageData data = mgr.getImageData(image);
  if (data == null) {
    return null;
  }
  return data.getBitmap(2 * myCoverWidth, 2 * myCoverHeight);
}

代码示例来源:origin: ydcx/KooReader

Bitmap myBitmap = ((ZLAndroidImageData) imageData).getBitmap(mWidth, mHeight);

代码示例来源:origin: Jiangzqts/EpubRead

Bitmap myBitmap = ((ZLAndroidImageData) imageData).getBitmap(mWidth, mHeight);

相关文章