User Tools

Site Tools


doc:en:appendixc

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
doc:en:appendixc [2013/02/06 13:31]
rosmord [Adding a hieroglyphic edition field in a SWING interface]
doc:en:appendixc [2016/10/12 11:50]
rosmord [Getting the code]
Line 2: Line 2:
  
 If you know how to program in Java, you can use JSesh as a library for your own programs. If you know how to program in Java, you can use JSesh as a library for your own programs.
 +===== Getting the code =====
  
 +The preferred way is to use git, with the command:
 +<​code>​
 +git clone http://​git.qenherkhopeshef.org/​repositories/​jsesh.git
 +</​code>​
 +
 +Normally, the **master** branch contains up-to-date and compilable code. It's the only one I would suggest to clone. Other branches are
 +  * production: ongoing fixes and small changes, which will be applied to the master branch. That's ongoing work, so don't expect it to compile all the time.
 +  * development:​ ongoing work for next version of JSesh
 +  * jfx-test: some work to see how to adapt JSesh to Java FX. 
 ===== How to ===== ===== How to =====
  
Line 31: Line 41:
 There are a number of reasons for which you might want to produce a picture from an MDC Text. For instance, you might use JSesh as a library in a web application. There are a number of reasons for which you might want to produce a picture from an MDC Text. For instance, you might use JSesh as a library in a web application.
  
-Of course, you need to have both jsesh.jar and jseshGlyphs.jar in your classpath. Currently (JSesh 2.13.7) you also need jvectClipboard-1.0.jar,​ but this is a dependency I will remove in a short while (you will need jvectClipboard-1.0.jar if you want to produce SVG, WMF or the like, of course). Then the following Java code will do:+Of course, you need to have both jsesh.jar and jseshGlyphs.jar in your classpath. Currently (JSesh 2.13.7) you also need jvectClipboard-1.0.jar,​ but this is a dependency I will remove in a short while. You will need jvectClipboard-1.0.jar if you want to produce SVG, WMF or the like. Then the following Java code will do:
 <code java> <code java>
     public static BufferedImage buildImage(String mdcText) throws MDCSyntaxError {     public static BufferedImage buildImage(String mdcText) throws MDCSyntaxError {
Line 91: Line 101:
 The size of the signs is controlled using ‘drawing.setCadratHeight();​‘. The size of the signs is controlled using ‘drawing.setCadratHeight();​‘.
 (note to self: it should be easier to change the size of everything using drawingSpecification !!!) (note to self: it should be easier to change the size of everything using drawingSpecification !!!)
- 
doc/en/appendixc.txt · Last modified: 2018/06/02 11:33 by rosmord