baseanim.cpp
来自「symbian系统上的2D图形游戏」· C++ 代码 · 共 31 行
CPP
31 行
////////////////////////////////////////////////////////////////////////
//
// BaseAnim.cpp
//
// Copyright (c) 2003 Nokia Mobile Phones Ltd. All rights reserved.
//
////////////////////////////////////////////////////////////////////////
#include <e32math.h>
#include "RenderableFactory.h"
#include "BaseAnim.h"
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
CBaseAnim::CBaseAnim(TSize aSize) :
iSize(aSize)
{
}
////////////////////////////////////////////////////////////////////////
void CBaseAnim::RenderFrameCentered(TInt aFrameNum,const TPoint& aCenter,const TRect& aScreenRect,CFbsBitGc* aCallerGc)
{
TPoint topLeftPos(aCenter.iX - (iSize.iWidth >> 1), aCenter.iY - (iSize.iHeight >> 1));
Renderable(aFrameNum)->Render(-topLeftPos,aScreenRect,aCallerGc);
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?