Esempio n. 1
0
 public static EditorImageContainer ImageToContainer(EditorImage img)
 {
     return(new EditorImageContainer
     {
         Path = img.ImagePath,
         Rotation = img.Rotation,
         Position = img.Position,
         Opacity = img.Opacity,
         Scale = img.Scale,
         DrawTarget = img.DrawTarget
     });
 }
Esempio n. 2
0
        private void TryLoadPendingImages()
        {
            if (PendingImages.Count == 0)
            {
                return;
            }

            Clear(alsoPending: false);

            foreach (EditorImageContainer pendingImage in PendingImages)
            {
                EditorImage img = pendingImage.CreateImage();
                if (img.Image == null)
                {
                    continue;
                }
                Images.Add(img);
                img.UpdateRectangle();
            }

            UpdateImageCategories();
            PendingImages.Clear();
        }