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.

RectanglePaintingInfo.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.afp;
  19. /**
  20. * Filled rectangle painting information
  21. */
  22. public class RectanglePaintingInfo implements PaintingInfo {
  23. private final float x;
  24. private final float y;
  25. private final float width;
  26. private final float height;
  27. /**
  28. * Main constructor
  29. *
  30. * @param x the x coordinate
  31. * @param y the y coordinate
  32. * @param width the width
  33. * @param height the height
  34. */
  35. public RectanglePaintingInfo(float x, float y, float width, float height) {
  36. this.x = x;
  37. this.y = y;
  38. this.width = width;
  39. this.height = height;
  40. }
  41. /**
  42. * Returns the x coordinate
  43. *
  44. * @return the x coordinate
  45. */
  46. protected float getX() {
  47. return x;
  48. }
  49. /**
  50. * Returns the y coordinate
  51. *
  52. * @return the y coordinate
  53. */
  54. protected float getY() {
  55. return y;
  56. }
  57. /**
  58. * Returns the width
  59. *
  60. * @return the width
  61. */
  62. protected float getWidth() {
  63. return width;
  64. }
  65. /**
  66. * Returns the height
  67. *
  68. * @return the height
  69. */
  70. protected float getHeight() {
  71. return height;
  72. }
  73. }