MCPcopy Create free account
hub / github.com/SatDump/SatDump / GetLineRenderProps

Function GetLineRenderProps

src-core/imgui/implot/implot_items.cpp:119–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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