Multi page plot works

This commit is contained in:
Gaute Lindkvist
2019-12-19 11:37:40 +01:00
parent 27788b1abd
commit 9ffbd97f8c
26 changed files with 1465 additions and 598 deletions

View File

@@ -100,6 +100,9 @@ int RiuCategoryLegendFrame::labelPixelPosY( const LayoutInfo& layout, int index
{
float categoryHeight = static_cast<float>( layout.colorBarRect.height() ) / labelCount();
int textY = static_cast<int>( layout.colorBarRect.top() + index * categoryHeight + categoryHeight / 2 );
textY += layout.charAscent / 2;
int offset = layout.charAscent - static_cast<int>( std::ceil( layout.charHeight / 2.0 ) );
textY += offset;
return textY;
}