~ubuntu-branches/ubuntu/utopic/libjlatexmath-java/utopic

« back to all changes in this revision

Viewing changes to examples/Basic/Example1.java

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 14:24:03 UTC
  • mfrom: (4.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20130527142403-etv7j7excnzoa71l
Tags: 1.0.2-1
* Upload to unstable
* Standards-Version updated to 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        latex += "\\end{array}";
70
70
        
71
71
        TeXFormula formula = new TeXFormula(latex);
72
 
        TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
 
72
        
 
73
        // Note: Old interface for creating icons:
 
74
        //TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
 
75
        // Note: New interface using builder pattern (inner class):
 
76
        TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20).build();
 
77
        
73
78
        icon.setInsets(new Insets(5, 5, 5, 5));
74
79
        
75
80
        BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);