本文整理汇总了Java中org.puredata.core.PdBase.writeArray方法的典型用法代码示例。如果您正苦于以下问题:Java PdBase.writeArray方法的具体用法?Java PdBase.writeArray怎么用?Java PdBase.writeArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.puredata.core.PdBase
的用法示例。
在下文中一共展示了PdBase.writeArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: touchmove
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public boolean touchmove(int pid, float x, float y)
{
if(dRect.contains(x, y))
{
if(array != null)
{
int index = (int)(left + (float)(right - left) * (x - this.x) / (float)(this.zoneWidth));
if(index >= 0 && index < array.length)
{
float value = ((y - this.y) / (float)(zoneHeight)) * (top - bottom) + bottom;
array.buffer[index] = value;
PdBase.writeArray(array.name, index, array.buffer, index, 1);
return true;
}
}
else
{
float localX = x - (this.x - HMargin);
float localY = y - (this.y - VMargin);
for(Widget widget : widgets)
{
if(widget.touchmove(pid, localX, localY)) return true;
}
}
}
return false;
}
示例2: writeArray
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@Override
public int writeArray(String destination,
int destOffset,
float[] source,
int srcOffset,
int n) {
return PdBase.writeArray(destination, destOffset, source, srcOffset, n);
}
示例3: sendArray
import org.puredata.core.PdBase; //导入方法依赖的package包/类
@ProtoMethod(description = "Sends and array of floats to PdLib", example = "")
@ProtoMethodParam(params = {"name", "array", "size"})
public void sendArray(String destination, float[] source, int n) {
PdBase.writeArray(destination, 0, source, 0, n);
}
示例4: sendArrayToPD
import org.puredata.core.PdBase; //导入方法依赖的package包/类
public void sendArrayToPD(float [] arrayToSend, String nameArrayInPd) {
int sizeArray = arrayToSend.length;
PdBase.writeArray(nameArrayInPd, 0,arrayToSend, 0, sizeArray);
}