* @synchronization waitShared on DOOR_TIME
*/
public BlendContext getBlending()
{
// create a copy of the reference because bc might be set to null in the meantime
BlendContext myBC = bc;
if( myBC != null ) return myBC;
int blendLen;
final Preferences prefs = getUserPrefs();
if( prefs.node( PrefsUtil.NODE_SHARED ).getBoolean( PrefsUtil.KEY_BLENDING, false )) {
try {
doc.bird.waitShared( Session.DOOR_TIME );
blendLen = (int) (doc.timeline.getRate() *
Math.max( 0.0, prefs.node( PrefsUtil.NODE_SHARED ).getDouble(
PrefsUtil.KEY_BLENDTIME, 0.0 )) + 0.5);
}
finally {
doc.bird.releaseShared( Session.DOOR_TIME );
}
} else {
blendLen = 0;
}
// myBC = new BlendContext( blendLen );
myBC = new BlendContext( blendLen, blendLen, new Point2D[] {
new Point2D.Float( 0.5f, 0.5f ), new Point2D.Float( 0.5f, 0.5f )
}); // EEE
bc = myBC;
// return a copy of the reference because bc might be set to null in the meantime