Gecko:Layers: Difference between revisions

Jump to navigation Jump to search
Line 117: Line 117:
  class Layer {
  class Layer {
   LayerManager* getManager();
   LayerManager* getManager();
   void setOpacity(TimeStamp, float);
   void setOpacity(TimeStamp T, float, interpolationFlag);
  };
  };


Animated properties are supported. To animate, call a setter method one or more times, passing in different timestamped values. When we render, we use the last supplied property value that is before the current time. When calling a setter method with TimeStamp T, all values for times >= T are discarded. To set a constant value, just pass a null TimeStamp, which is interpreted as being at the beginning of time.
Animated properties are supported. To animate, call a setter method one or more times, passing in different timestamped values. When we render, we use the last supplied property value that is before the current time. When calling a setter method with TimeStamp T, all values for times >= T are discarded. To set a constant value, just pass a null TimeStamp, which is interpreted as being at the beginning of time. The interpolationFlag can be 'none', which means that the value changes instantly from its previous value to the new value at time T, or 'linear', which means that during the interval between the time of the previous sample and T, we linearly interpolate from the previous value to the new value.


Layers should be referenced counted. The LayerManager holds a reference to its root layer and parent layers hold references to their children.
Layers should be referenced counted. The LayerManager holds a reference to its root layer and parent layers hold references to their children.
1,295

edits

Navigation menu