本文整理汇总了C++中TileSet::GetMapIconDimensions方法的典型用法代码示例。如果您正苦于以下问题:C++ TileSet::GetMapIconDimensions方法的具体用法?C++ TileSet::GetMapIconDimensions怎么用?C++ TileSet::GetMapIconDimensions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileSet
的用法示例。
在下文中一共展示了TileSet::GetMapIconDimensions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
AUI_ERRCODE c3_Icon::DrawThis(
aui_Surface *surface,
sint32 x,
sint32 y )
{
if ( IsHidden() ) return AUI_ERRCODE_OK;
if ( !surface ) surface = m_window->TheSurface();
RECT rect = { 0, 0, m_width, m_height };
OffsetRect( &rect, m_x + x, m_y + y );
ToWindow( &rect );
if ( m_pattern )
m_pattern->Draw( surface, &rect );
DrawThisStateImage(
0,
surface,
&rect );
if (m_mapIcon != MAPICON_MAX) {
if (m_color != COLOR_MAX) {
POINT where;
TileSet *tileSet = g_tiledMap->GetTileSet();
POINT iconDim = tileSet->GetMapIconDimensions( m_mapIcon );
where.x = ( m_width - iconDim.x ) / 2;
if (where.x < 0) where.x = 0;
where.y = ( m_height - iconDim.y ) / 2;
if (where.y < 0) where.y = 0;
where.x += rect.left;
where.y += rect.top;
Pixel16 *icon;
icon = tileSet->GetMapIconData( m_mapIcon );
Assert(icon);
if (!icon) return AUI_ERRCODE_OK;
g_tiledMap->DrawColorizedOverlay( icon, surface, where.x, where.y, g_colorSet->GetColor(m_color) );
}
}
if (m_bevelWidth > 0) {
primitives_BevelRect16( surface, &rect, m_bevelWidth, m_bevelType, 16, 16 );
}
DrawThisText(
surface,
&rect );
if ( surface == m_window->TheSurface() )
m_window->AddDirtyRect( &rect );
return AUI_ERRCODE_OK;
}