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.

external-graphic_content-height_content-width_2.xml 4.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  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. <testcase>
  18. <info>
  19. <p>
  20. This test checks external-graphics with content-width
  21. (values: scale-to-fit, scale-down-to-fit and scale-up-to-fit)
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="normal" font-size="0" line-height="1">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block>
  34. <fo:external-graphic id="img1" src="../resources/images/bgimg72dpi.jpg"/>
  35. </fo:block>
  36. <fo:block>
  37. <fo:external-graphic id="img2" src="../resources/images/bgimg72dpi.jpg"
  38. inline-progression-dimension="250pt" block-progression-dimension="250pt"
  39. content-height="scale-to-fit" content-width="scale-to-fit"/>
  40. </fo:block>
  41. <fo:block>
  42. <fo:external-graphic id="img3" src="../resources/images/bgimg72dpi.jpg"
  43. inline-progression-dimension="250pt" block-progression-dimension="250pt"
  44. content-height="scale-down-to-fit" content-width="scale-down-to-fit"/>
  45. </fo:block>
  46. <fo:block>
  47. <fo:external-graphic id="img4" src="../resources/images/bgimg72dpi.jpg"
  48. inline-progression-dimension="250pt" block-progression-dimension="250pt"
  49. content-height="scale-up-to-fit" content-width="scale-up-to-fit"/>
  50. </fo:block>
  51. <fo:block>
  52. <fo:external-graphic id="img5" src="../resources/images/bgimg300dpi.jpg"
  53. inline-progression-dimension="250pt" block-progression-dimension="250pt"
  54. content-height="scale-down-to-fit" content-width="scale-down-to-fit"/>
  55. </fo:block>
  56. <fo:block>
  57. <fo:external-graphic id="img6" src="../resources/images/bgimg300dpi.jpg"
  58. inline-progression-dimension="250pt" block-progression-dimension="250pt"
  59. content-height="scale-up-to-fit" content-width="scale-up-to-fit"/>
  60. </fo:block>
  61. </fo:flow>
  62. </fo:page-sequence>
  63. </fo:root>
  64. </fo>
  65. <checks>
  66. <eval expected="192000" xpath="//image[@prod-id='img1']/../@ipd"/>
  67. <eval expected="192000" xpath="//image[@prod-id='img1']/../@bpd"/>
  68. <eval expected="0 0 192000 192000" xpath="//image[@prod-id='img1']/../@pos"/>
  69. <eval expected="250000" xpath="//image[@prod-id='img2']/../@ipd"/>
  70. <eval expected="250000" xpath="//image[@prod-id='img2']/../@bpd"/>
  71. <eval expected="0 0 250000 250000" xpath="//image[@prod-id='img2']/../@pos"/>
  72. <eval expected="250000" xpath="//image[@prod-id='img3']/../@ipd"/>
  73. <eval expected="250000" xpath="//image[@prod-id='img3']/../@bpd"/>
  74. <eval expected="0 0 192000 192000" xpath="//image[@prod-id='img3']/../@pos"/>
  75. <eval expected="250000" xpath="//image[@prod-id='img4']/../@ipd"/>
  76. <eval expected="250000" xpath="//image[@prod-id='img4']/../@bpd"/>
  77. <eval expected="0 0 250000 250000" xpath="//image[@prod-id='img4']/../@pos"/>
  78. <eval expected="250000" xpath="//image[@prod-id='img5']/../@ipd"/>
  79. <eval expected="250000" xpath="//image[@prod-id='img5']/../@bpd"/>
  80. <eval expected="0 0 46080 46080" xpath="//image[@prod-id='img5']/../@pos"/>
  81. <eval expected="250000" xpath="//image[@prod-id='img6']/../@ipd"/>
  82. <eval expected="250000" xpath="//image[@prod-id='img6']/../@bpd"/>
  83. <eval expected="0 0 250000 250000" xpath="//image[@prod-id='img6']/../@pos"/>
  84. </checks>
  85. </testcase>