Package java.awt.image

Examples of java.awt.image.DataBufferDouble


                float[][] bankData = dataBuffer.getBankData();
                tileReader.getTile(readerTileX, readerTileY, bankData);
            }
                break;
            case DataBuffer.TYPE_DOUBLE: {
                DataBufferDouble dataBuffer = (DataBufferDouble) currentTile.getDataBuffer();
                double[][] bankData = dataBuffer.getBankData();
                tileReader.getTile(readerTileX, readerTileY, bankData);
            }
                break;
            default:
                throw new IllegalStateException("Unrecognized DataBuffer type: "
View Full Code Here


            } else if (array instanceof ArrayInt) {
                dataBuffer = new DataBufferInt((int[]) array.get1DJavaArray(int.class), size);
            } else if (array instanceof ArrayFloat) {
                dataBuffer = new DataBufferFloat((float[]) array.get1DJavaArray(float.class), size);
            } else if (array instanceof ArrayDouble) {
                dataBuffer = new DataBufferDouble((double[]) array.get1DJavaArray(double.class), size);
            }

            WritableRaster raster = Raster.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0));
            image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null);
        } catch (InvalidRangeException e) {
View Full Code Here

            for (int i=0; i<offsets.length; i++) {
                final int offset = offsets[i];
                Arrays.fill(data.getData(i), offset, offset + size, n);
            }
        } else if (buffer instanceof DataBufferDouble) {
            final DataBufferDouble data = (DataBufferDouble) buffer;
            final double n = value.doubleValue();
            for (int i=0; i<offsets.length; i++) {
                final int offset = offsets[i];
                Arrays.fill(data.getData(i), offset, offset + size, n);
            }
        } else {
            throw new IllegalArgumentException(Errors.format(ErrorKeys.UNSUPPORTED_DATA_TYPE));
        }
    }
View Full Code Here

      case DataBuffer.TYPE_INT:
  return new DataBufferInt(size, numBanks);
      case DataBuffer.TYPE_FLOAT:
  return new DataBufferFloat(size, numBanks);
      case DataBuffer.TYPE_DOUBLE:
  return new DataBufferDouble(size, numBanks);
      default:
  throw new UnsupportedOperationException();
      }
  }
View Full Code Here

      case DataBuffer.TYPE_INT:
  return new DataBufferInt((int[]) data, size);
      case DataBuffer.TYPE_FLOAT:
  return new DataBufferFloat((float[]) data, size);
      case DataBuffer.TYPE_DOUBLE:
  return new DataBufferDouble((double[]) data, size);
      default:
  throw new UnsupportedOperationException();
      }
  }
View Full Code Here

TOP

Related Classes of java.awt.image.DataBufferDouble

Copyright © 2018 www.massapicom. 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.