In this project, the Java vector information shown on the screen, such as a Graphics User interface, is automatically converted to PowerPoint by using a program in an intermediate language, which is run by our MicroVBA interpreter written in VBA to be used in PowerPoint in order to be able to import large vector graphics files. The information is written in a file containing the MicroVBA instructions that are read within a macro in the PowerPoint file where the vector information is created using our MicroVBA interpreter that executes the instructions. MicroVBA language is a subset of VBA for PowerPoint. This language bypasses the weaknesses of the EMF format (the lack of gradient being the most handicapping) and of VBA itself (limitations on the size of functions) in order to import complete vector files from Java programs to PowerPoint. The program in this repository transforms the Java information to MicroVBA and is a modification of FreeHEP library. It uses an independent graphics superclass that writes the MicroVBA instructions into a file. The user triggers the conversion by clicking on a button on the right of the screen with the text "Transform to MicroVBA".
In this program MenuInfographics6 example was used. Any class extending JPanel that displays vector graphics can be used here instead of MenuInfographics6.java.
In this snapshot of the program one can clearly see MenuInfographics6 and additional buttons on the right. One triggers the file MicroVBA file generation and another exits the program:
These additional buttons are not included in the file generated since they are actually only used to control the actions of the conversion program.
These buttons are entirely defined in the source file Window.java
in
MyPanel
class. One can observe that the texts of the buttons are vectorized and stored as paths in the source code as indicated (functions
exitmsg() and microvba()).
This code was generated by this program. If one intends to
modify these buttons or create new buttons, the line 8497, shown below, should be changed with the correct path of the output file. Currently it has
the path D:\Programming\PostScript\Convertion to Java\Fonts\Ubuntu text.java. If one is not interested in changing the control buttons or
creating new features please ignore the rest of this text.
/outfile1 (D:\\Programming\\PostScript\\Convertion to Java\\Fonts\\Ubuntu text.java) (w) file def
This is a PostScript program. To make it work on Windows one should have GhostScript installed and a shortcut created to call GhostScript with the file Ubuntu kerning java.ps. Instructions to create this shortcut are given here. File Ubuntu kerning java.ps contains the fonts Ubuntu and Ubuntu-Bold, BreakIntoLines function with kerning features, as well as commands to transform the text into Java. Ubuntu-Bold was the font chosen to be used in the buttons. BreakIntoLines was not actually used to generate paragraphs but just because the kerning heuristic is used with it.
A PowerPoint presentation that mocks the converted interface can be found here.