MCPcopy Create free account
hub / github.com/comaps/comaps / StipplePenTextureSize

Function StipplePenTextureSize

libs/drape/texture_manager.cpp:70–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70m2::PointU StipplePenTextureSize(size_t patternsCount, uint32_t maxTextureSize)
71{
72 uint32_t const sz = math::NextPowOf2(static_cast<uint32_t>(patternsCount) + kReservedPatterns);
73 // No problem if assert will fire here. Just pen texture will be 2x bigger :)
74 // ASSERT_LESS_OR_EQUAL(sz, kMinStippleTextureHeight, (patternsCount));
75 uint32_t const stippleTextureHeight = std::min(maxTextureSize, std::max(sz, kMinStippleTextureHeight));
76
77 return m2::PointU(kStippleTextureWidth, stippleTextureHeight);
78}
79
80m2::PointU ColorTextureSize(size_t colorsCount, uint32_t maxTextureSize)
81{

Callers 1

InitStipplePenMethod · 0.85

Calls 1

NextPowOf2Function · 0.85

Tested by

no test coverage detected