• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Int16Array类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: backward

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
/**
 * DOCUMENT ME!
 *
 * @param p DOCUMENT ME!
 * @param pidx DOCUMENT ME!
 * @param w DOCUMENT ME!
 * @param h DOCUMENT ME!
 * @param rowsize DOCUMENT ME!
 * @param begin DOCUMENT ME!
 * @param end DOCUMENT ME!
 */
static void backward(
  Int16Array p,
  int     pidx,
  int     w,
  int     h,
  int     rowsize,
  int     begin,
  int     end)
{
  for(int scale = begin >> 1; scale >= end; scale >>= 1)
  {
    for(int j = 0; j < w; j += scale)
    {
      backward_filter(p, pidx, j, j + (h * rowsize), j, scale * rowsize);
    }

    for(int i = 0; i < h; i += scale)
    {
      backward_filter(
        p,
        pidx,
        i * rowsize,
        (i * rowsize) + w,
        i * rowsize,
        scale);
    }
  }
}
 
开发者ID:mateusz-matela,项目名称:djvu-html5,代码行数:40,代码来源:IWMap.java


示例2: workaround

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
/**
 * This must be a separate method to work around issue
 * https://code.google.com/p/google-web-toolkit/issues/detail?id=9184
 */
private void workaround(final int dataw, final Int16Array data, GRect comp) {
	int pp = (comp.ymin * dataw);
	for (int ii = comp.ymin; ii < comp.ymax; ii += 2) {
		for (int jj = comp.xmin; jj < comp.xmax; jj += 2) {
			short s = data.get(pp + jj);
			data.set(pp + jj + dataw, s);
			data.set(pp + jj + dataw + 1, s);
			data.set(pp + jj + 1, s);
		}
		pp += (dataw + dataw);
	}
}
 
开发者ID:mateusz-matela,项目名称:djvu-html5,代码行数:17,代码来源:IWMap.java


示例3: write_liftblock

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
/**
 * Write a liftblock
 *
 * @param coeff an array
 * @param bmin start position
 * @param bmax end position
 */
void write_liftblock(
  Int16Array coeff,
  int     bmin,
  int     bmax)
{
  int n = bmin << 4;

  coeff.set(zeros);

  for(int n1 = bmin; n1 < bmax; n1++)
  {
    Block d = getBlock(n1);

    if(d == null)
    {
      n += 16;
    }
    else
    {
      for(int n2 = 0; n2 < 16;)
      {
        coeff.set(zigzagloc[n], d.get(n2));
        n2++;
        n++;
      }
    }
  }
}
 
开发者ID:mateusz-matela,项目名称:djvu-html5,代码行数:36,代码来源:IWBlock.java


示例4: copy

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
public Int16Array copy (ShortBuffer buffer) {
	if (GWT.isProdMode()) {
		return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
	} else {
		ensureCapacity(buffer);
		for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
			shortBuffer.set(j, buffer.get(i));
		}
		return shortBuffer.subarray(0, buffer.remaining());
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:12,代码来源:GwtGL20.java


示例5: copy

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
public Int16Array copy (ShortBuffer buffer) {
    if (GWT.isProdMode()) {
        return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
    } else {
        ensureCapacity(buffer);
        for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
            shortBuffer.set(j, buffer.get(i));
        }
        return shortBuffer.subarray(0, buffer.remaining());
    }
}
 
开发者ID:neuroradiology,项目名称:TinyVoxel,代码行数:12,代码来源:GwtGL20.java


示例6: copy

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
public Int16Array copy (ShortBuffer buffer) {
  return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
}
 
开发者ID:playn,项目名称:playn,代码行数:4,代码来源:HtmlGL20.java


示例7: glBufferSubData

import com.google.gwt.typedarrays.shared.Int16Array; //导入依赖的package包/类
/**
 * <p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to
 * {@code target}. Data starting at byte offset {@code offset} and extending for {@code size} bytes is copied to the
 * data store from the memory pointed to by {@code data}. An error is thrown if {@code offset} and {@code size}
 * together define a range beyond the bounds of the buffer object's data store.</p>
 *
 * <p>{@link #GL_INVALID_ENUM} is generated if target is not {@link #GL_ARRAY_BUFFER} or {@link
 * #GL_ELEMENT_ARRAY_BUFFER}.</p>
 *
 * <p>{@link #GL_INVALID_VALUE} is generated if offset or size is negative, or if together they define a region of
 * memory that extends beyond the buffer object's allocated data store.</p>
 *
 * <p>{@link #GL_INVALID_OPERATION} is generated if the reserved buffer object name 0 is bound to target.</p>
 *
 * @param target Specifies the target buffer object. The symbolic constant must be {@link #GL_ARRAY_BUFFER} or
 *               {@link #GL_ELEMENT_ARRAY_BUFFER}.
 * @param offset Specifies the offset into the buffer object's data store where data replacement will begin,
 *               measured in bytes.
 * @param size   Specifies the size in bytes of the data store region being replaced.
 * @param data   Specifies the new data that will be copied into the data store.
 */
public static void glBufferSubData(int target, int offset, int size, short[] data)
{
    checkContextCompatibility();
    Int16Array dataBuffer = Int16ArrayNative.create(data.length);
    dataBuffer.set(data);
    nglBufferSubData(target, offset, size, dataBuffer);
}
 
开发者ID:sriharshachilakapati,项目名称:WebGL4J,代码行数:29,代码来源:WebGL10.java



注:本文中的com.google.gwt.typedarrays.shared.Int16Array类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GetPlatformApplicationAttributesRequest类代码示例发布时间:2022-05-22
下一篇:
Java BaseImageLoaderStrategy类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap