示例#1
0
 /// <summary>
 /// change the object style and location according to the new values.
 /// </summary>
 /// <param name="values"></param>
 public void NewSample(float values)
 {
     try
     {
         if (ChildAnimationMovingAveEnable)
         {
             values = MovingAvrage.Clock(values, ChildAnimationMovingAveLength);
         }
         if (values > 0.9f)
         {
             values = 1;
         }
         device.BeginLayerDraw(0);
         //! Select the scenario.
         curScenario.NewSample(values);
     }
     catch (Exception ex)
     {
         xPFT.Exceptions.ExceptionHandler.LogError(ex);
     }
     finally
     {
         if (device != null)
         {
             device.EndLayerDraw(0);
             device.Present();
         }
     }
 }
示例#2
0
 /// <summary>
 /// Drawing annotation that insert the background layer.
 /// </summary>
 void DrawBackGround()
 {
     if (device != null)
     {
         device.BeginLayerDraw(0);
         device.ClearLayer(0, BackColor);
         for (int index = 0; index < annotations.Count; index++)
         {
             if (annotations[index].DrawingLayer == Base.AnnotationDrawingLayer.BackOfAll)
             {
                 annotations[index].Draw(0);
             }
         }
         device.EndLayerDraw(0);
     }
 }