![]() |
CMGDK r49-rc2
|
#include <HTPLayer.H>
公有成员 | |
HTPLayer () | |
HTPLayer (TileLibrary *, Stream *) | |
~HTPLayer () | |
Texture2D * | GetTexture (float &r, float &b) |
void | Draw (float l, float t, float sw, float sh) |
void | DrawRect (float l, float t, float r, float b) |
void | Draw (float l, float t) |
void | DrawPart (float l, float t, float w, float h, float pl, float pt, float pw, float ph) |
void | Draw (uint mode, const Vertex2< float > *vcoord, const Vertex2< float > *tcoord, int count) |
保护成员 | |
void | Build () |
hgl::HTPLayer::HTPLayer | ( | ) |
hgl::HTPLayer::HTPLayer | ( | TileLibrary * | tlb, |
Stream * | str | ||
) |
hgl::HTPLayer::~HTPLayer | ( | ) |
void hgl::HTPLayer::Build | ( | ) | [protected] |
void hgl::HTPLayer::Draw | ( | uint | mode, |
const Vertex2< float > * | vcoord, | ||
const Vertex2< float > * | tcoord, | ||
int | count | ||
) |
使用指定方式绘制
mode | 绘图模式 |
vcoord | 绘制坐标 |
tcoord | 贴图坐标 |
count | 数据个数 |
void hgl::HTPLayer::Draw | ( | float | l, |
float | t | ||
) | [inline] |
void hgl::HTPLayer::Draw | ( | float | l, |
float | t, | ||
float | sw, | ||
float | sh | ||
) |
绘制当前图层
l,t | 图片绘制的左上角坐标 |
sw,sh | 图片绘制时的缩放比 |
void hgl::HTPLayer::DrawPart | ( | float | draw_left, |
float | draw_top, | ||
float | draw_width, | ||
float | draw_height, | ||
float | part_left, | ||
float | part_top, | ||
float | part_width, | ||
float | part_height | ||
) |
绘制当前图片的一部分
draw_left | 图片绘制的左边界坐标 |
draw_top | 图片绘制的上边界坐标 |
draw_width | 图片绘制的宽度 |
draw_height | 图片绘制的高度 |
part_left | 图片部分的左边界相对坐标(0-1) |
part_top | 图片部分的上边界相对坐标(0-1) |
part_width | 图片宽度的相对范围(0-1) |
part_height | 图片高度的相对范围(0-1) |
void hgl::HTPLayer::DrawRect | ( | float | l, |
float | t, | ||
float | r, | ||
float | b | ||
) | [inline] |
Texture2D* hgl::HTPLayer::GetTexture | ( | float & | r, |
float & | b | ||
) | [inline] |
取得贴图
r | 贴图绘制用的右边界纹理坐标 |
b | 贴图绘制用的底边界纹理坐标 |