List of usage examples for com.google.gwt.typedarrays.shared TypedArrays createInt32Array
public static Int32Array createInt32Array(int length)
From source file:com.badlogic.gdx.backends.gwt.GwtGL20.java
License:Apache License
private void ensureCapacity(IntBuffer buffer) { if (buffer.remaining() > intBuffer.length()) { intBuffer = TypedArrays.createInt32Array(buffer.remaining()); }/*w w w. j av a 2 s. c om*/ }
From source file:com.lizardtech.djvu.GPixmap.java
License:Open Source License
/** * Initialize this pixmap to the specified size and fill in the specified color. * * @param arows number of rows// w w w . ja va2 s .c om * @param acolumns number of columns * @param filler fill color * * @return the initialized pixmap */ public GPixmap init(int arows, int acolumns, GPixel filler) { // boolean needFill=false; if ((arows != nrows) || (acolumns != ncolumns)) { data = null; nrows = arows; ncolumns = acolumns; } final int npix = rowOffset(rows()); if (npix > 0) { if (data == null) { setImageData(imageDataFactory.createImageData(ncolumns, nrows)); if (filler == null) { for (int i = 0; i < npix; i++) data.set(i * ncolors + 3, 0xFF); } } if (filler != null) { data.set(redOffset, filler.redByte()); data.set(greenOffset, filler.greenByte()); data.set(blueOffset, filler.blueByte()); data.set(3, 0xFF); Int32Array fillBuffer = TypedArrays.createInt32Array(data.buffer()); int fillValue = fillBuffer.get(0); for (int i = 0; i < npix; i++) fillBuffer.set(i, fillValue); } } return this; }
From source file:com.lizardtech.djvu.IWCodec.java
License:Open Source License
/** * Creates a new IWCodec object.//w w w .j av a 2s .c o m */ public IWCodec() { ctxStart = new BitContext[32]; for (int i = 0; i < 32; i++) { ctxStart[i] = new BitContext(); } ctxBucket = new BitContext[10][8]; for (int i = 0; i < 10; i++) { for (int j = 0; j < 8; j++) { ctxBucket[i][j] = new BitContext(); } } quant_hi = TypedArrays.createInt32Array(10); quant_lo = TypedArrays.createInt32Array(16); coeffstate = TypedArrays.createInt8Array(256); bucketstate = TypedArrays.createInt8Array(16); curband = 0; curbit = 1; ctxMant = new BitContext(); ctxRoot = new BitContext(); }