~ubuntu-branches/ubuntu/raring/gpac/raring

« back to all changes in this revision

Viewing changes to regression_tests/bifs-2D-texturing-lineargradient-simple.bt

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2007-01-24 23:34:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124233457-zzlls8afkt0nyakj
Tags: 0.4.2~rc2-0ubuntu1
* New upstream release
  * Most notably MP4 tagging support via MP4Box -itags
* debian/patches/01_64bits.dpatch: dropped; included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
InitialObjectDescriptor {
 
2
 objectDescriptorID 1
 
3
 audioProfileLevelIndication 1
 
4
 visualProfileLevelIndication 1
 
5
 sceneProfileLevelIndication 1
 
6
 graphicsProfileLevelIndication 1
 
7
 ODProfileLevelIndication 1
 
8
 esDescr [
 
9
  ES_Descriptor {
 
10
   ES_ID 2
 
11
   decConfigDescr DecoderConfigDescriptor {
 
12
    streamType 3
 
13
    decSpecificInfo BIFSConfig {
 
14
     isCommandStream true
 
15
     pixelMetric true
 
16
     pixelWidth 500
 
17
     pixelHeight 200
 
18
    }
 
19
   }
 
20
  }
 
21
 ]
 
22
}
 
23
 
 
24
OrderedGroup {
 
25
 children [
 
26
  Background2D {
 
27
   backColor 1 1 1
 
28
  }
 
29
  WorldInfo {
 
30
   info [
 
31
    "This test shows how to fill object with linear gradients." 
 
32
    "Here the start and end point of the gradient are close"
 
33
    "You can click on the rectangle to move the start and the end of gradient." 
 
34
    "You can also drag it." 
 
35
    "" 
 
36
    "GPAC Regression Tests" 
 
37
    "(C) 2002-2006 GPAC Team"
 
38
   ]
 
39
   title "Linear Gradient"
 
40
  }
 
41
  Transform2D {
 
42
   children [
 
43
    Shape {
 
44
     appearance Appearance {
 
45
      material Material2D {
 
46
       lineProps LineProperties {
 
47
        width 0
 
48
       }
 
49
      }
 
50
      texture DEF GL LinearGradient {
 
51
       key [0 0.45 0.5 0.55 1]
 
52
       keyValue [0.2118 0.447 0.039 0.2118 0.447 0.039 0.2627 0.933 0 0.2392 0.3098 0.04313 0.2392 0.3098 0.04313]
 
53
       startPoint -1 0
 
54
      }
 
55
     }
 
56
     geometry DEF R Rectangle {
 
57
      size 400 20
 
58
     }
 
59
    }
 
60
    DEF TS TouchSensor {}
 
61
   ]
 
62
  }
 
63
  DEF SC Script {
 
64
   eventIn SFVec3f set_frac
 
65
   eventIn SFBool set_down
 
66
   field SFNode grad USE GL
 
67
   field SFBool isDown FALSE
 
68
   url ["javascript:function set_down(value, timestamp) {isDown = value;}function set_frac(value, timestamp) {if (!isDown) return;pos = (value.x + 200)/400;grad.startPoint.x = pos - 1;grad.endPoint.x = 1 + pos;print('pos ' + pos);}"   ]
 
69
  }
 
70
 ]
 
71
}
 
72
 
 
73
ROUTE TS.isActive TO SC.set_down
 
74
ROUTE TS.hitPoint_changed TO SC.set_frac
 
75