import java.awt.image.*; import java.awt.Color; public class Stencil extends OffScr { public void init() { super.init(); // Since the purpose of this applet is to display the image // through the transparent text, it is an error to not supply // a background image. Without the background image, only // the background color will be seen. if(bgimage_file == null) { System.out.println( "You must specify the background " + "image as parameter \"AppBGImage\""); } //====== MAKE TEXT TRANSPARENT, SOLID BACKGROUND ========== fstencil tr; tr = new fstencil(); tr.setText(tx); tr.setApplet(this); tr.setFont(tx_font); tr.setBackground(tx_bg_color!=null ? tx_bg_color : app_bg_color); tr.setTransparent(tx_bg_color!=null ? false : true); tr.setForeground(tx_color); tr.setUnderline(tx_underline); tx_pixels = tr.filter(null, 0, 0); // These params get ignored tx_width = tr.getWidth(); tx_height = tr.getHeight(); doStandardFilters(); } }