您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

BlockViewport.java 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.area;
  8. /**
  9. * A BlockViewport.
  10. * This is used for block level Viewport/reference pairs.
  11. * The block-container creates this area.
  12. */
  13. public class BlockViewport extends Block {
  14. // clipping for this viewport
  15. private boolean clip = false;
  16. // transform if rotated or absolute
  17. private CTM viewportCTM;
  18. /**
  19. * Create a new block viewport area.
  20. */
  21. public BlockViewport() {
  22. }
  23. /**
  24. * Set the transform of this viewport.
  25. * If the viewport is rotated or has an absolute positioning
  26. * this transform will do the work.
  27. *
  28. * @param ctm the transformation
  29. */
  30. public void setCTM(CTM ctm) {
  31. viewportCTM = ctm;
  32. }
  33. /**
  34. * Get the transform of this block viewport.
  35. *
  36. * @return the transformation of this viewport
  37. * or null if normally stacked without rotation
  38. */
  39. public CTM getCTM() {
  40. return viewportCTM;
  41. }
  42. /**
  43. * Set the clipping for this viewport.
  44. *
  45. * @param cl the clipping for the viewport
  46. */
  47. public void setClip(boolean cl) {
  48. clip = cl;
  49. }
  50. /**
  51. * Get the clipping for this viewport.
  52. *
  53. * @return the clipping for the viewport
  54. * true if the contents should be clipped for this viewport
  55. */
  56. public boolean getClip() {
  57. return clip;
  58. }
  59. }