AbstractTrainStatisticView.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:METRO 作者:
/**
 * Draws the view with all information depending on the subclass.
 * 
 * @param sp
 *            The sprite batch to draw on.
 * @param position
 *            The position of the view in pixel coordinates.
 */
public void draw(SpriteBatch sp, Point position)
{
    METRO.__spriteBatch.end();
    METRO.__spriteBatch.begin();

    // Create scissor to draw only in the area of the statistic view.
    com.badlogic.gdx.math.Rectangle scissors = new com.badlogic.gdx.math.Rectangle();
    com.badlogic.gdx.math.Rectangle clipBounds = new com.badlogic.gdx.math.Rectangle(position.x + METRO.__getXOffset(), position.y + METRO.__getYOffset(), _size.x + 1, _size.y
            + 1);
    ScissorStack.calculateScissors((Camera) METRO.__camera, METRO.__spriteBatch.getTransformMatrix(), clipBounds, scissors);
    ScissorStack.pushScissors(scissors);

    drawView(sp);

    ScissorStack.popScissors();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号