// (c) Matti Katila package gzz.vob; import gzz.vob.*; import gzz.gfx.gl.*; import java.awt.*; import gzz.client.GraphicsAPI; public class CalendarVob extends Vob { public static final String rcsid = "$Id: CalendarVob.java,v 1.1 2002/10/29 17:37:52 mudyc Exp $"; public static boolean dbg = true; //false; static final void p(String s) { if(dbg) System.out.println(s); } static final void pa(String s) { System.out.println(s); } protected final TextStyle style; private final float linewidth; public CalendarVob(TextStyle style, float linewidth) { this.style = style; this.linewidth = linewidth; } // public Rectangle clip; Color bgcolor; static Rectangle rect = new Rectangle(); static Rectangle rect2 = new Rectangle(); public void render(Graphics g, boolean fast, Vob.RenderInfo info1, Vob.RenderInfo info2) { // NOT IMPLEMENTED /* info1.getExtRect(rect); info2.getExtRect(rect2); if(dbg) pa("RectBg.render "+rect+" "+rect2); int x0, y0, x1, y1; x0 = rect2.x; x1 = rect2.x + rect2.width; y0 = rect2.y; y1 = rect2.y + rect2.height; Color old = g.getColor(); g.setColor(bgcolor != null ? bgcolor : Color.white); g.fillRect(rect.x, rect.y, rect.width, rect.height); g.setColor(old); */ } static GL.DisplayList list; public int addToListGL(GraphicsAPI.Window win, int[] list, int curs, int coordsys1, int coordsys2) { GLTextStyle gls = (GLTextStyle)style; GLRen.CalendarPaper cp = GLRen.createCalendarPaper( gls.theFont, linewidth ); return cp.addToListGL(win, list, curs, coordsys1, coordsys2); } }