MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / GetTextOffset

Function GetTextOffset

DebugView++/LogView.cpp:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52int GetTextOffset(HDC hdc, const std::string& s, int xPos)
53{
54 auto exp = TabsToSpaces(s);
55 int nFit;
56 SIZE size;
57 if (!GetTextExtentExPointA(hdc, exp.c_str(), exp.size(), xPos, &nFit, nullptr, &size))
58 return 0;
59 return SkipTabOffset(s, nFit);
60}
61
62int GetTextOffset(HDC hdc, const std::wstring& s, int xPos)
63{

Callers 2

AddEllipsisFunction · 0.85
GetTextIndexMethod · 0.85

Calls 4

TabsToSpacesFunction · 0.85
SkipTabOffsetFunction · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected