mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Apply Omar feedback and convert remaining 0xAABBGGRR's into IM_COL32(RR,GG,BB,AA) format.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user