You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ColorType.java 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.datatypes;
  18. import java.awt.Color;
  19. /**
  20. * A colour quantity in XSL.
  21. */
  22. public interface ColorType {
  23. /**
  24. * Returns the blue component of the color.
  25. * @return float a value between 0.0 and 1.0
  26. */
  27. public float getBlue();
  28. /**
  29. * Returns the green component of the color.
  30. * @return float a value between 0.0 and 1.0
  31. */
  32. public float getGreen();
  33. /**
  34. * Returns the red component of the color.
  35. * @return float a value between 0.0 and 1.0
  36. */
  37. public float getRed();
  38. /**
  39. * Returns the alpha (degree of opaque-ness) component of the color.
  40. * @return float a value between 0.0 (fully transparent) and 1.0 (fully opaque)
  41. */
  42. public float getAlpha();
  43. /**
  44. * Returns an AWT instance of this color
  45. * @return float the AWT color represented by this ColorType instance
  46. */
  47. public Color getAWTColor();
  48. }