예제 #1
0
void TBRendererBatcher::DrawBitmap(const TBRect &dst_rect, const TBRect &src_rect, TBBitmapFragment *bitmap_fragment)
{
	if (TBBitmap *bitmap = bitmap_fragment->GetBitmap(TB_VALIDATE_FIRST_TIME))
		AddQuadInternal(dst_rect.Offset(m_translation_x, m_translation_y),
						src_rect.Offset(bitmap_fragment->m_rect.x, bitmap_fragment->m_rect.y),
						VER_COL_OPACITY(m_opacity), bitmap, bitmap_fragment);
}
예제 #2
0
void TBRendererBatcher::DrawBitmapColored(const TBRect &dst_rect, const TBRect &src_rect, const TBColor &color, TBBitmapFragment *bitmap_fragment)
{
	if (TBBitmap *bitmap = bitmap_fragment->GetBitmap(TB_VALIDATE_FIRST_TIME))
	{
		uint32 a = (color.a * m_opacity) / 255;
		AddQuadInternal(dst_rect.Offset(m_translation_x, m_translation_y),
						src_rect.Offset(bitmap_fragment->m_rect.x, bitmap_fragment->m_rect.y),
						VER_COL(color.r, color.g, color.b, a), bitmap, bitmap_fragment);
	}
}
예제 #3
0
void TBRendererBatcher::DrawRectFill(const TBRect &dst_rect, const TBColor &color)
{
	if (dst_rect.IsEmpty())
		return;
	uint32 a = (color.a * m_opacity) / 255;
	AddQuadInternal(dst_rect.Offset(m_translation_x, m_translation_y),
					TBRect(), VER_COL(color.r, color.g, color.b, a), nullptr, nullptr);
}
예제 #4
0
void TBRendererBatcher::DrawBitmapTile(const TBRect &dst_rect, TBBitmap *bitmap)
{
	AddQuadInternal(dst_rect.Offset(m_translation_x, m_translation_y),
					TBRect(0, 0, dst_rect.w, dst_rect.h),
					VER_COL_OPACITY(m_opacity), bitmap, nullptr);
}
예제 #5
0
void TBRendererBatcher::DrawBitmapColored(const TBRect &dst_rect, const TBRect &src_rect, const TBColor &color, TBBitmap *bitmap)
{
	uint32 a = (color.a * m_opacity) / 255;
	AddQuadInternal(dst_rect.Offset(m_translation_x, m_translation_y),
					src_rect, VER_COL(color.r, color.g, color.b, a), bitmap, nullptr);
}