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 500 pixelHeight 200 } } } ] } OrderedGroup { children [ Background2D { backColor 1 1 1 } WorldInfo { info [ "This test shows the usage of cap styles of the XLineProperties node" "Moving the mouse over the 'Anim' button will superpose the different lines to highlight the linecap differences" "" "GPAC Regression Tests" "(C) 2002-2006 GPAC Team" ] title "Changing line caps using the XLineProperties node" } DEF TR1 Transform2D { translation -190 0 children [ Shape { appearance Appearance { material Material2D { lineProps XLineProperties { lineColor 0 0 1 lineCap 2 width 15 } } } geometry DEF LS IndexedLineSet2D { coord Coordinate2D { point [-50 0 0 50 50 0] } } } ] } Transform2D { translation -190 -30 children [ Shape { appearance DEF TEXTAPP Appearance { material Material2D { emissiveColor 0 0 0 filled TRUE } } geometry Text { string ["Cap square"] fontStyle DEF FS FontStyle { justify ["MIDDLE" "MIDDLE"] size 16 } } } ] } DEF TR2 Transform2D { translation -65 0 children [ Shape { appearance Appearance { material Material2D { lineProps XLineProperties { lineColor 1 0 0 lineCap 1 width 15 } } } geometry USE LS } ] } Transform2D { translation -65 -30 children [ Shape { appearance USE TEXTAPP geometry Text { string ["Cap round"] fontStyle USE FS } } ] } DEF TR3 Transform2D { translation 65 0 children [ Shape { appearance Appearance { material Material2D { lineProps XLineProperties { lineColor 0 1 1 lineCap 3 width 15 } } } geometry USE LS } ] } Transform2D { translation 65 -30 children [ Shape { appearance USE TEXTAPP geometry Text { string ["Cap triangle"] fontStyle USE FS } } ] } DEF TR4 Transform2D { translation 190 0 children [ Shape { appearance Appearance { material Material2D { lineProps XLineProperties { lineColor 0 1 0 width 15 } } } geometry USE LS } ] } Transform2D { translation 190 -30 children [ Shape { appearance USE TEXTAPP geometry Text { string ["Cap 'butt'"] fontStyle USE FS } } ] } Transform2D { translation 225 -75 children [ Shape { appearance Appearance { material Material2D { emissiveColor 0 1 1 filled TRUE } } geometry Rectangle { size 50 50 } } Shape { appearance USE TEXTAPP geometry Text { string ["Anim"] fontStyle USE FS } } DEF TS TouchSensor {} ] } DEF C Conditional { buffer { REPLACE TR1.translation BY 0 0 REPLACE TR2.translation BY 0 0 REPLACE TR3.translation BY 0 0 REPLACE TR4.translation BY 0 0 } } DEF RC Conditional { buffer { REPLACE TR1.translation BY -190 0 REPLACE TR2.translation BY -65 0 REPLACE TR3.translation BY 65 0 REPLACE TR4.translation BY 190 0 } } ] } ROUTE TS.isOver TO C.activate ROUTE TS.isOver TO RC.reverseActivate