Browse Source

Use ~IM_COL32_A_MASK instead of IM_COL32(255,255,255,0)

omar 8 years ago
parent
commit
e63ebd997f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      imgui_draw.cpp

+ 2 - 2
imgui_draw.cpp

@@ -432,7 +432,7 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
     {
     {
         // Anti-aliased stroke
         // Anti-aliased stroke
         const float AA_SIZE = 1.0f;
         const float AA_SIZE = 1.0f;
-        const ImU32 col_trans = col & IM_COL32(255,255,255,0);
+        const ImU32 col_trans = col & ~IM_COL32_A_MASK;
 
 
         const int idx_count = thick_line ? count*18 : count*12;
         const int idx_count = thick_line ? count*18 : count*12;
         const int vtx_count = thick_line ? points_count*4 : points_count*3;
         const int vtx_count = thick_line ? points_count*4 : points_count*3;
@@ -605,7 +605,7 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
     {
     {
         // Anti-aliased Fill
         // Anti-aliased Fill
         const float AA_SIZE = 1.0f;
         const float AA_SIZE = 1.0f;
-        const ImU32 col_trans = col & IM_COL32(255,255,255,0);
+        const ImU32 col_trans = col & ~IM_COL32_A_MASK;
         const int idx_count = (points_count-2)*3 + points_count*6;
         const int idx_count = (points_count-2)*3 + points_count*6;
         const int vtx_count = (points_count*2);
         const int vtx_count = (points_count*2);
         PrimReserve(idx_count, vtx_count);
         PrimReserve(idx_count, vtx_count);