InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 1
 visualProfileLevelIndication 1
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 esDescr [
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 400
     pixelHeight 400
    }
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info ["This shows PathLayout usage" "with text and graphics layout" "" "GPAC Regression Tests" "$Date: 2007-07-27 09:46:08 $ - $Revision: 1.2 $" "(C) 2002-2004 GPAC Team"]
   title "PathLayout Test"
  }
  Transform2D {
   children [
    Transform2D {
     children [
      Shape {
       appearance Appearance {
        material Material2D {
         filled TRUE
        }
       }
       geometry DEF LS Curve2D {
        fineness 1
        type [2]
        point DEF C2D Coordinate2D {
         point [-100 0 -50 400 50 -400 100 0]
        }
       }
      }
      DEF TOUCH TouchSensor {}
     ]
    }
    DEF PL PathLayout {
     alignment [0 1]
     pathOffset 0.25
     children [
        Shape {
         appearance Appearance {
          material Material2D {
           emissiveColor 1 0 0
           filled TRUE
          }
         }
         geometry Rectangle {
          size 30 20
         }
        }
        Shape {
         appearance Appearance {
          material Material2D {
           emissiveColor 0 1 0
           filled TRUE
          }
         }
         geometry Rectangle {
          size 30 20
         }
        }
        Shape {
         appearance Appearance {
          material Material2D {
           emissiveColor 0 0 1
           filled TRUE
          }
         }
         geometry Rectangle {
          size 30 20
         }
        }
        Shape {
         appearance Appearance {
          material Material2D {
           emissiveColor 1 1 0
           filled TRUE
          }
         }
         geometry Rectangle {
          size 30 20
         }
        }
        DEF TSSTOP TouchSensor {}
     ]
     geometry USE LS
    }
   ]
  }
  Transform2D {
   translation 0 -140
   children [
    Shape {
     appearance Appearance {
        material Material2D {
         emissiveColor 0 0 0
         filled TRUE
        }
       }
     geometry Text {
      string ["move over shape and click" "to change the layout wrapping mode"]
      fontStyle FontStyle {
       justify ["MIDDLE"]
       size 20
      }
     }
    }
   ]
  }
  DEF TS TimeSensor {
   cycleInterval 20
   loop TRUE
  }
  DEF SI ScalarInterpolator {
   key [0 0.5 1]
   keyValue [-0.5 1.5 -0.5]
  }
  DEF C1 Conditional {
   buffer {
    REPLACE PL.wrapMode BY 1
   }
  }
  DEF RC1 Conditional {
   buffer {
    REPLACE PL.wrapMode BY 0
   }
  }
  DEF C2 Conditional {
   buffer {
    REPLACE PL.wrapMode BY 2
   }
  }
  DEF RC2 Conditional {
   buffer {
    REPLACE PL.wrapMode BY 1
   }
  }
  DEF C3 Conditional {
   buffer {
    REPLACE TS.enabled BY FALSE
   }
  }
  DEF RC3 Conditional {
   buffer {
    REPLACE TS.enabled BY TRUE
   }
  }
 ]
}

ROUTE TS.fraction_changed TO SI.set_fraction
ROUTE SI.value_changed TO PL.pathOffset
ROUTE TSSTOP.isOver TO C3.activate
ROUTE TSSTOP.isOver TO RC3.reverseActivate
ROUTE TOUCH.isOver TO C1.activate
ROUTE TOUCH.isOver TO RC1.reverseActivate
ROUTE TOUCH.isActive TO C2.activate
ROUTE TOUCH.isActive TO RC2.reverseActivate

