Beispiel #1
0
 private void AddToGlobalAlign(DifData dd, DifData pardelta)
 {
     if (!string.IsNullOrEmpty(dd.Parent))
     {
         // get child storage items
         var storageitem = ImageStorage.Where(x => x.Name == dd.Name).FirstOrDefault();
         if (storageitem != null)
         {
             // check if default align for that parent is not already assigned
             var oldalign = storageitem.Parents.Where(x => x.Parent == dd.Parent && x.Tag == dd.Tag).FirstOrDefault();
             if (oldalign == null)
             {
                 // Get parent image align via default align and delta
                 seIm parIm          = new seIm();
                 var  pardefaultalgn = ImageStorage.Where(x => x.Name == dd.Parent).FirstOrDefault().DefaultAlign;
                 parIm.AssignFrom(pardefaultalgn); // default and delta
                 parIm.AssignFrom(pardelta);
                 // Get child image align via default align and delta
                 seIm childIm          = new seIm();
                 var  childdefaultalgn = storageitem.DefaultAlign;
                 childIm.AssignFrom(childdefaultalgn); // default and delta
                 childIm.AssignFrom(dd);
                 // add align for that parent
                 ImageRelDifVec newalign = new ImageRelDifVec();
                 newalign.Tag    = dd.Tag;
                 newalign.Parent = dd.Parent;
                 newalign.CreateDifProportions(parIm, childIm);
                 storageitem.Parents.Add(newalign);
             }
         }
     }
 }
Beispiel #2
0
        public seIm AddImage(seIm sr)
        {
            seIm im = new seIm();

            im.AssignFrom(sr);
            VisionList.Add(im);
            return(im);
        }