1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-16 10:15:13 +00:00

Add scale parameter to includegraphics for tikz

This commit is contained in:
Ole Martin Ruud 2022-12-16 05:50:43 +01:00
parent 80217d8c90
commit 19b12df687
No known key found for this signature in database
GPG Key ID: 88F3B6A5850EFDA2

View File

@ -44,8 +44,11 @@ public class DriverImageTikz implements UDriver<UImage, TikzGraphics> {
public void draw(UImage shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) {
final String rawFileName = shape.getRawFileName();
// TODO how to get this from the <img:file{scale=?}> parameter?
double scale = 1.0;
if (rawFileName != null) {
final String raw = "\\includegraphics{" + rawFileName + "}";
final String raw = "\\includegraphics[scale=" + scale + "]{" + rawFileName + "}";
tikz.appendRaw(x, y, raw);
return;
}