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.

BlockViewport.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.area;
  18. /**
  19. * A BlockViewport.
  20. * This is used for block level Viewport/reference pairs.
  21. * The block-container creates this area.
  22. */
  23. public class BlockViewport extends Block {
  24. // clipping for this viewport
  25. private boolean clip = false;
  26. // transform if rotated or absolute
  27. private CTM viewportCTM;
  28. /**
  29. * Create a new block viewport area.
  30. */
  31. public BlockViewport() {
  32. }
  33. /**
  34. * Set the transform of this viewport.
  35. * If the viewport is rotated or has an absolute positioning
  36. * this transform will do the work.
  37. *
  38. * @param ctm the transformation
  39. */
  40. public void setCTM(CTM ctm) {
  41. viewportCTM = ctm;
  42. }
  43. /**
  44. * Get the transform of this block viewport.
  45. *
  46. * @return the transformation of this viewport
  47. * or null if normally stacked without rotation
  48. */
  49. public CTM getCTM() {
  50. return viewportCTM;
  51. }
  52. /**
  53. * Set the clipping for this viewport.
  54. *
  55. * @param cl the clipping for the viewport
  56. */
  57. public void setClip(boolean cl) {
  58. clip = cl;
  59. }
  60. /**
  61. * Get the clipping for this viewport.
  62. *
  63. * @return the clipping for the viewport
  64. * true if the contents should be clipped for this viewport
  65. */
  66. public boolean getClip() {
  67. return clip;
  68. }
  69. }