Apply Omar feedback and convert remaining 0xAABBGGRR's into IM_COL32(RR,GG,BB,AA) format.

This commit is contained in:
Michał Cichoń
2016-08-06 10:57:52 +02:00
parent d75d2b1871
commit 1999c01db8
4 changed files with 32 additions and 32 deletions

View File

@ -429,7 +429,7 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
{
// Anti-aliased stroke
const float AA_SIZE = 1.0f;
const ImU32 col_trans = col & 0x00ffffff;
const ImU32 col_trans = col & IM_COL32(255,255,255,0);
const int idx_count = thick_line ? count*18 : count*12;
const int vtx_count = thick_line ? points_count*4 : points_count*3;
@ -602,7 +602,7 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
{
// Anti-aliased Fill
const float AA_SIZE = 1.0f;
const ImU32 col_trans = col & 0x00ffffff;
const ImU32 col_trans = col & IM_COL32(255, 255, 255, 0);
const int idx_count = (points_count-2)*3 + points_count*6;
const int vtx_count = (points_count*2);
PrimReserve(idx_count, vtx_count);
@ -1119,7 +1119,7 @@ void ImFontAtlas::GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_wid
const unsigned char* src = pixels;
unsigned int* dst = TexPixelsRGBA32;
for (int n = TexWidth * TexHeight; n > 0; n--)
*dst++ = ((unsigned int)(*src++) << 24) | 0x00FFFFFF;
*dst++ = IM_COL32(255, 255, 255, (unsigned int)(*src++));
}
*out_pixels = (unsigned char*)TexPixelsRGBA32;