1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-02 09:58:19 +00:00

Merge pull request #500 from matthew16550/smetana-tweak

Tweak Smetana Y offset to avoid clipping at top
This commit is contained in:
arnaudroques 2021-03-21 11:36:20 +01:00 committed by GitHub
commit 9048552ecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {