MCPcopy Create free account
hub / github.com/ShenCiao/CialloResearch / GetLineRenderProps

Function GetLineRenderProps

imgui/implot_items.cpp:118–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116template <> const unsigned int MaxIdx<unsigned int>::Value = 4294967295;
117
118IMPLOT_INLINE void GetLineRenderProps(const ImDrawList& draw_list, float& half_weight, ImVec2& tex_uv0, ImVec2& tex_uv1) {
119 const bool aa = ImHasFlag(draw_list.Flags, ImDrawListFlags_AntiAliasedLines) &&
120 ImHasFlag(draw_list.Flags, ImDrawListFlags_AntiAliasedLinesUseTex);
121 if (aa) {
122 ImVec4 tex_uvs = draw_list._Data->TexUvLines[(int)(half_weight*2)];
123 tex_uv0 = ImVec2(tex_uvs.x, tex_uvs.y);
124 tex_uv1 = ImVec2(tex_uvs.z, tex_uvs.w);
125 half_weight += 1;
126 }
127 else {
128 tex_uv0 = tex_uv1 = draw_list._Data->TexUvWhitePixel;
129 }
130}
131
132IMPLOT_INLINE void PrimLine(ImDrawList& draw_list, const ImVec2& P1, const ImVec2& P2, float half_weight, ImU32 col, const ImVec2& tex_uv0, const ImVec2 tex_uv1) {
133 float dx = P2.x - P1.x;

Callers 5

InitMethod · 0.85
InitMethod · 0.85
InitMethod · 0.85
InitMethod · 0.85
InitMethod · 0.85

Calls 2

ImHasFlagFunction · 0.85
ImVec2Function · 0.85

Tested by

no test coverage detected