keiron 01/06/28 01:04:46 Modified: src/org/apache/fop/datatypes ColorType.java Log: cleaned up a bit Revision Changes Path 1.14 +5 -130 xml-fop/src/org/apache/fop/datatypes/ColorType.java Index: ColorType.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/ColorType.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ColorType.java 2000/11/12 22:18:17 1.13 +++ ColorType.java 2001/06/28 08:04:44 1.14 @@ -1,53 +1,9 @@ -/*-- $Id: ColorType.java,v 1.13 2000/11/12 22:18:17 klease Exp $ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <[EMAIL PROTECTED]>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id: ColorType.java,v 1.14 2001/06/28 08:04:44 keiron Exp $ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ + package org.apache.fop.datatypes; import java.util.*; @@ -169,87 +125,6 @@ MessageHandler.errorln("ERROR: unknown colour name: " + value); } } - -/* if (value.toLowerCase().equals("black")) { - this.red = 0; - this.green = 0; - this.blue = 0; - } else if (value.toLowerCase().equals("green")) { - this.red = 0; - this.green = 0.5f; - this.blue = 0; - } else if (value.toLowerCase().equals("silver")) { - this.red = 0.75f; - this.green = 0.75f; - this.blue = 0.75f; - } else if (value.toLowerCase().equals("lime")) { - this.red = 0; - this.green = 1; - this.blue = 0; - } else if (value.toLowerCase().equals("gray")) { - this.red = 0.5f; - this.green = 0.5f; - this.blue = 0.5f; - } else if (value.toLowerCase().equals("olive")) { - this.red = 0.5f; - this.green = 0.5f; - this.blue = 0; - } else if (value.toLowerCase().equals("white")) { - this.red = 1; - this.green = 1; - this.blue = 1; - } else if (value.toLowerCase().equals("yellow")) { - this.red = 1; - this.green = 1; - this.blue = 0; - } else if (value.toLowerCase().equals("maroon")) { - this.red = 0.5f; - this.green = 0; - this.blue = 0; - } else if (value.toLowerCase().equals("navy")) { - this.red = 0; - this.green = 0; - this.blue = 0.5f; - } else if (value.toLowerCase().equals("red")) { - this.red = 1; - this.green = 0; - this.blue = 0; - } else if (value.toLowerCase().equals("blue")) { - this.red = 0; - this.green = 0; - this.blue = 1; - } else if (value.toLowerCase().equals("purple")) { - this.red = 0.5f; - this.green = 0; - this.blue = 0.5f; - } else if (value.toLowerCase().equals("teal")) { - this.red = 0; - this.green = 0.5f; - this.blue = 0.5f; - } else if (value.toLowerCase().equals("fuchsia")) { - this.red = 1; - this.green = 0; - this.blue = 1; - } else if (value.toLowerCase().equals("aqua")) { - this.red = 0; - this.green = 1; - this.blue = 1; - } else if (value.toLowerCase().equals("orange")) { - // for compatibility with passiveTex - this.red = 0.7f; - this.green = 0.5f; - this.blue = 0; - } else if (value.toLowerCase().equals("transparent")) { - this.red = 0; - this.green = 0; - this.blue = 0; - this.alpha = 1; - } else { - this.red = 0; - this.green = 0; - this.blue = 0; - MessageHandler.errorln("ERROR: unknown colour name: " + value); - }*/ } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]