List of usage examples for com.itextpdf.text BaseColor BaseColor
public BaseColor(final float red, final float green, final float blue, final float alpha)
From source file:avalonscrollmaker20.AnothakScribe.java
License:Open Source License
private void makeFonts() { try {//www . ja va 2s .co m String fontURL = this.getClass().getResource("resources/Avalon - Lierseth.ttf").toString(); BaseFont bf = BaseFont.createFont(fontURL, "", BaseFont.EMBEDDED); f_phraseSymbol = new Font(bf, 70); f_phraseSymbolBreath = new Font(bf, 55); fontURL = this.getClass().getResource("resources/HARNGTON.TTF").toString(); bf = BaseFont.createFont(fontURL, "", BaseFont.EMBEDDED); f_phraseCommon = new Font(bf, 25); f_phraseCommonBreath = new Font(bf, 15); fontURL = this.getClass().getResource("resources/ENDOR___.ttf").toString(); bf = BaseFont.createFont(fontURL, "", BaseFont.EMBEDDED); f_school = new Font(bf, 30); f_schoolPure = new Font(bf, 25); fontURL = this.getClass().getResource("resources/neverworld.ttf").toString(); bf = BaseFont.createFont(fontURL, "", BaseFont.EMBEDDED); f_title = new Font(bf, 40); //f_titlePhrase = new Font( bf, 10 ); f_code = new Font(bf, 50); f_code.setColor(new BaseColor(128, 128, 128, 16)); fontURL = this.getClass().getResource("resources/evanescent.ttf").toString(); bf = BaseFont.createFont(fontURL, "", BaseFont.EMBEDDED); f_keu = new Font(bf, 40); } catch (Exception ex) { System.err.println(ex + "\nProgram closing."); System.exit(2); } }
From source file:net.digitstar.vanadio.enums.Colors.java
License:Apache License
public final BaseColor getColor() { return color != null ? new BaseColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()) : null; }