Skip to content
Snippets Groups Projects
Commit dd41739c authored by Georg Graßnick's avatar Georg Graßnick :thinking:
Browse files

Fix wrong title height calculation

parent 49b62576
No related branches found
No related tags found
1 merge request!43Feat/scatterplot rasterizer 34
......@@ -245,10 +245,10 @@ public class ScatterPlotRasterizer implements Rasterizer<ScatterPlot> {
}
private static int calcTitleHeight(final String title, final PointListContainer<PointList> data, final LiblouisBrailleTextRasterizer textRasterizer, final int width, final RasterCanvas canvas, final BrailleLanguage.Language lang) {
final int titleLen = title.length();
int minHeight = Integer.MIN_VALUE;
for (PointList l : data) {
int height = textRasterizer.calculateRequiredHeight(titleLen + l.getName(), width, canvas, lang);
final String s = title + l.getName();
int height = textRasterizer.calculateRequiredHeight(s, width, canvas, lang);
minHeight = Math.max(minHeight, height);
}
return minHeight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment