本文整理汇总了Java中master.flame.danmaku.danmaku.model.IDisplayer.getWidth方法的典型用法代码示例。如果您正苦于以下问题:Java IDisplayer.getWidth方法的具体用法?Java IDisplayer.getWidth怎么用?Java IDisplayer.getWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类master.flame.danmaku.danmaku.model.IDisplayer
的用法示例。
在下文中一共展示了IDisplayer.getWidth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setDisplayer
import master.flame.danmaku.danmaku.model.IDisplayer; //导入方法依赖的package包/类
public BaseDanmakuParser setDisplayer(IDisplayer disp) {
this.mDisp = disp;
this.mDispWidth = disp.getWidth();
this.mDispHeight = disp.getHeight();
this.mDispDensity = disp.getDensity();
this.mScaledDensity = disp.getScaledDensity();
this.mContext.mDanmakuFactory.updateViewportState((float) this.mDispWidth, (float) this.mDispHeight, getViewportSizeFactor());
this.mContext.mDanmakuFactory.updateMaxDanmakuDuration();
return this;
}
示例2: setDisplayer
import master.flame.danmaku.danmaku.model.IDisplayer; //导入方法依赖的package包/类
public BaseDanmakuParser setDisplayer(IDisplayer disp){
mDisp = disp;
mDispWidth = disp.getWidth();
mDispHeight = disp.getHeight();
mDispDensity = disp.getDensity();
mScaledDensity = disp.getScaledDensity();
mContext.mDanmakuFactory.updateViewportState(mDispWidth, mDispHeight, getViewportSizeFactor());
mContext.mDanmakuFactory.updateMaxDanmakuDuration();
return this;
}
示例3: setDisplayer
import master.flame.danmaku.danmaku.model.IDisplayer; //导入方法依赖的package包/类
public BaseDanmakuParser setDisplayer(IDisplayer disp){
mDisp = disp;
mDispWidth = disp.getWidth();
mDispHeight = disp.getHeight();
mDispDensity = disp.getDensity();
mScaledDensity = disp.getScaledDensity();
return this;
}
示例4: draw
import master.flame.danmaku.danmaku.model.IDisplayer; //导入方法依赖的package包/类
@Override
public RenderingState draw(IDisplayer disp, IDanmakus danmakus, long startRenderTime) {
mRenderingState.reset();
float left = disp.getWidth(),top = disp.getHeight(), right = 0 ,bottom = 0;
boolean fullScreenRefreshing = false;
IDanmakuIterator itr = danmakus.iterator();
int orderInScreen = 0;
mStartTimer.update(System.currentTimeMillis());
int sizeInScreen = danmakus.size();
while (itr.hasNext()) {
BaseDanmaku drawItem = itr.next();
if (drawItem.time < startRenderTime
|| (drawItem.priority == 0 && DanmakuFilters.getDefault().filter(drawItem,
orderInScreen, sizeInScreen, mStartTimer))) {
continue;
}
if(drawItem.getType() == BaseDanmaku.TYPE_SCROLL_RL){
// 同屏弹幕密度只对滚动弹幕有效
orderInScreen++;
}
// measure
if (!drawItem.isMeasured()) {
drawItem.measure(disp);
}
// layout
DanmakusRetainer.fix(drawItem, disp);
// draw
if (!drawItem.isOutside() && drawItem.isShown()) {
drawItem.draw(disp);
mRenderingState.add(drawItem.getType(), 1);
mRenderingState.add(1);
}
if (fullScreenRefreshing)
continue;
// calculate the refreshing area
if (drawItem.getType() == BaseDanmaku.TYPE_SPECIAL
&& (drawItem.rotationY != 0 || drawItem.rotationZ != 0)) {
left = 0;
top = 0;
right = disp.getWidth();
bottom = disp.getHeight();
fullScreenRefreshing = true;
continue;
}
float dtop = 0, dbottom = 0;
float dleft = drawItem.getLeft();
float dright = drawItem.getRight();
dtop = drawItem.getTop();
dbottom = drawItem.getBottom();
left = Math.min(dleft, left);
top = Math.min(dtop, top);
right = Math.max(dright, right);
bottom = Math.max(dbottom, bottom);
}
float borderWidth = disp.getStrokeWidth() * 2;
mRefreshArea.set(left, top, right + borderWidth, bottom + borderWidth);
mRenderingState.consumingTime = mStartTimer.update(System.currentTimeMillis());
return mRenderingState;
}