MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / GetItemWidth

Method GetItemWidth

Source/GraphEditorComponentImpl.cpp:107–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107int CGraphBase::GetItemWidth() const {
108 unsigned Count = parent_.GetItemCount(); // // //
109 return Count ? std::min(region_.Width() / static_cast<int>(Count), ITEM_MAX_WIDTH) : 0; // // //
110}
111
112int CGraphBase::GetItemIndex(CPoint point) const { // // //
113 return parent_.GetItemCount() && point.x >= CGraphEditor::GRAPH_LEFT ? (point.x - CGraphEditor::GRAPH_LEFT) / GetItemWidth() : -1;

Callers 2

DrawTagPointMethod · 0.80
DoOnPaintMethod · 0.80

Calls 1

GetItemCountMethod · 0.45

Tested by

no test coverage detected