1
0
mirror of https://github.com/octoleo/plantuml.git synced 2025-02-02 12:08:34 +00:00

Tweak Smetana Y offset to avoid clipping at top

This commit is contained in:
matthew16550 2021-03-21 19:07:28 +11:00
parent b2a4e20792
commit 720d9f5203

View File

@ -136,8 +136,9 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
if (minMax != null) { if (minMax != null) {
// Matches the adjustment in SvekResult.calculateDimension() // Matches the adjustment in SvekResult.calculateDimension() except no need to adjust for minY because
ug = ug.apply(new UTranslate(6 - minMax.getMinX(), 6 - minMax.getMinY())); // mirroring takes care of that
ug = ug.apply(new UTranslate(6 - minMax.getMinX(), 6));
} }
for (Map.Entry<IGroup, ST_Agraph_s> ent : clusters.entrySet()) { for (Map.Entry<IGroup, ST_Agraph_s> ent : clusters.entrySet()) {
@ -457,7 +458,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
fileFormatOption.getDefaultStringBounder(diagram.getSkinParam())); fileFormatOption.getDefaultStringBounder(diagram.getSkinParam()));
// imageBuilder.setUDrawable(new Drawing(new YMirror(dim.getHeight()))); // imageBuilder.setUDrawable(new Drawing(new YMirror(dim.getHeight())));
imageBuilder.setUDrawable(annotatedWorker.addAdd(new Drawing(new YMirror(minMax.getHeight()), minMax))); imageBuilder.setUDrawable(annotatedWorker.addAdd(new Drawing(new YMirror(minMax.getMaxY()), minMax)));
return imageBuilder.writeImageTOBEMOVED(diagram.seed(), os); return imageBuilder.writeImageTOBEMOVED(diagram.seed(), os);
} catch (Throwable e) { } catch (Throwable e) {