/src/org/mt4j/components/visibleComponents/font/fontFactories/IFontFactory.java

http://mt4j.googlecode.com/ · Java · 112 lines · 32 code · 14 blank · 66 comment · 0 complexity · e934ea751f9f88b973ec9009131a8795 MD5 · raw file

  1. /***********************************************************************
  2. * mt4j Copyright (c) 2008 - 2009, C.Ruff, Fraunhofer-Gesellschaft All rights reserved.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. ***********************************************************************/
  18. package org.mt4j.components.visibleComponents.font.fontFactories;
  19. import org.mt4j.components.visibleComponents.font.IFont;
  20. import org.mt4j.util.MTColor;
  21. import processing.core.PApplet;
  22. /**
  23. * A factory for creating IFont objects.
  24. * @author Christopher Ruff
  25. */
  26. public interface IFontFactory {
  27. /**
  28. * Creates a new IFont object.
  29. *
  30. * @param pa the pa
  31. * @param fontName the svg font file name
  32. * @param fontSize the font size
  33. * @param fillColor the fill color
  34. * @param strokeColor the stroke color
  35. *
  36. * @return the iFont
  37. *
  38. * @deprecated font system only allows a single font color now
  39. */
  40. public IFont createFont(
  41. PApplet pa,
  42. String fontName,
  43. int fontSize,
  44. MTColor fillColor,
  45. MTColor strokeColor);
  46. /**
  47. * Creates a new IFont object.
  48. *
  49. * @param pa the pa
  50. * @param fontName the svg font file name
  51. * @param fontSize the font size
  52. * @param fillColor the fill color
  53. * @param strokeColor the stroke color
  54. * @param antiAliased the anti aliased
  55. * @return the iFont
  56. *
  57. * @deprecated font system only allows a single font color now
  58. */
  59. public IFont createFont(
  60. PApplet pa,
  61. String fontName,
  62. int fontSize,
  63. MTColor fillColor,
  64. MTColor strokeColor,
  65. boolean antiAliased
  66. );
  67. /**
  68. * Creates a new IFont object.
  69. *
  70. * @param pa the pa
  71. * @param fontName the font name
  72. * @param fontSize the font size
  73. * @param color the color
  74. * @return the i font
  75. */
  76. public IFont createFont(
  77. PApplet pa,
  78. String fontName,
  79. int fontSize,
  80. MTColor color);
  81. /**
  82. * Creates a new IFont object.
  83. *
  84. * @param pa the pa
  85. * @param fontName the font name
  86. * @param fontSize the font size
  87. * @param color the color
  88. * @param antiAliased the anti aliased
  89. * @return the i font
  90. */
  91. public IFont createFont(
  92. PApplet pa,
  93. String fontName,
  94. int fontSize,
  95. MTColor color,
  96. boolean antiAliased);
  97. public IFont getCopy(IFont font);
  98. }