public override void ProcessEntity(PicEntity entity) { PicTypedDrawable drawable = (PicTypedDrawable)entity; if (null != drawable) { drawable.Transform(_transform); } }
public void AddEntities(IEntityContainer container, Transform2D transform) { foreach (PicEntity entityIn in container) { if (null == entityIn) { continue; } PicTypedDrawable entityOut = (entityIn.Clone(this)) as PicTypedDrawable; entityOut.Transform(transform); _entities.Add(entityOut); } }
public static PicBlock CreateNewBlock(uint id, IEntityContainer container, Transform2D transf) { PicBlock block = new PicBlock(id); // copies each entity from container (either block or factory) in block foreach (PicEntity entity in container) { PicTypedDrawable entityNew = entity.Clone(block) as PicTypedDrawable; entityNew.Transform(transf); block._entities.Add(entityNew); } return(block); }