Exemple #1
0
 protected Graphic(Graphic copy)
     : base(copy)
 {
     this.drawProperties  = new List <IDrawProperty>(copy.drawProperties);
     this.drawable        = copy.drawable;
     this.drawableState   = drawable.CreateState();
     this.matrixArray     = (Scalar[])copy.matrixArray.Clone();
     this.isVisible       = copy.isVisible;
     this.syncRoot        = new object();
     this.preChildren     = new List <Graphic>(copy.preChildren);
     this.isLifetimeOwner = copy.isLifetimeOwner;
 }
Exemple #2
0
 public Graphic(IDrawable drawable, Matrix2x3 matrix, Lifespan lifetime)
     : base(lifetime)
 {
     if (drawable == null)
     {
         throw new ArgumentNullException("drawable");
     }
     this.drawProperties = new List <IDrawProperty>();
     this.drawable       = drawable;
     this.drawableState  = drawable.CreateState();
     this.isVisible      = true;
     this.matrixArray    = new Scalar[16];
     Matrix2x3.Copy2DToOpenGlMatrix(ref matrix, this.matrixArray);
     this.syncRoot        = new object();
     this.preChildren     = new List <Graphic>();
     this.isLifetimeOwner = true;
 }
 public IDrawableState CreateState()
 {
     return(drawable.CreateState());
 }