mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
added a second LaTeX export mode
This commit is contained in:
parent
c75884e6ec
commit
e1855e71d0
@ -111,9 +111,4 @@ public class GraphicSVGLaTeX extends GraphicSVG {
|
||||
if (style == Style.SHAPE_PIN) return super.getColor(Style.NORMAL);
|
||||
return super.getColor(style);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagSet(String name) {
|
||||
return name.equals("LaTeX");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
package de.neemann.digital.draw.graphics;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* Replaces input and outputs by small circles
|
||||
*/
|
||||
public class GraphicSVGLaTeXInOut extends GraphicSVGLaTeX {
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param out the stream to write the data to
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public GraphicSVGLaTeXInOut(OutputStream out) throws IOException {
|
||||
super(out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagSet(String name) {
|
||||
return name.equals("LaTeX");
|
||||
}
|
||||
|
||||
}
|
@ -482,6 +482,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
JMenu export = new JMenu(Lang.get("menu_export"));
|
||||
export.add(new ExportAction(Lang.get("menu_exportSVG"), "svg", GraphicSVGIndex::new));
|
||||
export.add(new ExportAction(Lang.get("menu_exportSVGLaTex"), "svg", GraphicSVGLaTeX::new));
|
||||
export.add(new ExportAction(Lang.get("menu_exportSVGLaTexInOut"), "svg", GraphicSVGLaTeXInOut::new));
|
||||
export.add(new ExportAction(Lang.get("menu_exportPNGSmall"), "png", (out) -> new GraphicsImage(out, "PNG", 1)));
|
||||
export.add(new ExportAction(Lang.get("menu_exportPNGLarge"), "png", (out) -> new GraphicsImage(out, "PNG", 2)));
|
||||
|
||||
|
@ -1006,7 +1006,8 @@ Sind evtl. die Namen der Variablen nicht eindeutig?</string>
|
||||
<string name="menu_exportPNGLarge">Export PNG groß</string>
|
||||
<string name="menu_exportPNGSmall">Export PNG klein</string>
|
||||
<string name="menu_exportSVG">Export SVG</string>
|
||||
<string name="menu_exportSVGLaTex">Export SVG+LaTeX</string>
|
||||
<string name="menu_exportSVGLaTex">Export SVG + LaTeX</string>
|
||||
<string name="menu_exportSVGLaTexInOut">Export SVG + LaTeX + kleine Ein- und Ausgänge</string>
|
||||
<string name="menu_exportAnimatedGIF">Export Animated GIF</string>
|
||||
<string name="menu_fast">Schneller Lauf</string>
|
||||
<string name="menu_fast_tt">Führt die Schaltung aus, bis ein Stopsignal über ein BRK-Element detektiert wird.</string>
|
||||
|
@ -995,7 +995,8 @@ The names of the variables may not be unique.</string>
|
||||
<string name="menu_exportPNGLarge">Export PNG large</string>
|
||||
<string name="menu_exportPNGSmall">Export PNG small</string>
|
||||
<string name="menu_exportSVG">Export SVG</string>
|
||||
<string name="menu_exportSVGLaTex">Export SVG+LaTeX</string>
|
||||
<string name="menu_exportSVGLaTex">Export SVG + LaTeX</string>
|
||||
<string name="menu_exportSVGLaTexInOut">Export SVG + LaTeX + small in/out</string>
|
||||
<string name="menu_exportAnimatedGIF">Export Animated GIF</string>
|
||||
<string name="menu_fast">Run Fast</string>
|
||||
<string name="menu_fast_tt">Runs the circuit until a break is detected by the BRK component.</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user