<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 3.0 Language//EN" "http://www.w3.org/2008/SMIL30/SMIL30Language.dtd">
<!--
Copyright: Copyright 1998-2008 W3C (MIT, ERCIM, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/2008/04-testsuite-license.
Author: Julien Quint (DAISY Consortium). This is an adaptation of the example in section 7.13.2 "Elements and Attributes for the MediaPanZoom Module".
Version: November 4, 2007
Chapter: SMIL 3.0 Media Object
Module: MediaPanZoom Module
Feature: viewBox, fit
File Name: media-pan-zoom-percentages.smil
Expected Behavior: the test image (a checkerboard) is shown for 20 seconds with 4 different viewbox/fit combinations. This test uses percentage values instead of absolute values.
-->
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
  <head>
    <layout>
      <root-layout height="200" width="300" backgroundColor="red" />
      <region xml:id="I" top="0" left="0" height="200" width="300" backgroundColor="blue" />
    </layout>
  </head>
  <body>
    <seq> 
      <!-- The full checkerboard (6 by 5 squares) is shown for 5 seconds. It encompasses the entire media object space. -->
      <img xml:id="R1" src="checkerboard.png" panZoom="0, 0, 100%, 100%" dur="5s" region="I" />
      <!-- The center part of the checkerboard (4 by 3 squares, orange and white only) is shown for 5 seconds. The contents are scaled to fit the media object space. See r2.png for the expected results. (Note that results may slightly vary because of the inexactness of the percentage values.) -->
      <img xml:id="R2" src="checkerboard.png" panZoom="33%, 20%, 66%, 60%" dur="5s" region="I" fit="meet" />
      <!-- The viewbox is the same as above, so the same part of the checkerboard is shown in the media object space, but it is not scaled. It is placed in the top-left corner of the object media space, and the background becomes visible. See r3.png for the expected results. -->
      <img xml:id="R3" src="checkerboard.png" panZoom="33%, 20%, 66%, 60%" dur="5s" region="I" fit="meetBest" />
      <!-- The lower right corner of the checkerboard (2 by 2 squares, fuchsia and white only) is shown, scaled to fit as much of the object media space as possible. Since the viewbox extends beyond the boundaries of the original image, the extra content appears as scaled, transparent content. See r4.png for the expected results. -->
      <img xml:id="R4" src="checkerboard.png" panZoom="66%, 60%, 50%, 60%" dur="5s" region="I" fit="meet"/>
    </seq>
  </body>
</smil>
