瀏覽代碼

Removed image size node

CPKreuz 1 年之前
父節點
當前提交
a6202fdcf5
共有 1 個文件被更改,包括 0 次插入30 次删除
  1. 0 30
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageSizeNode.cs

+ 0 - 30
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageSizeNode.cs

@@ -1,30 +0,0 @@
-using PixiEditor.ChangeableDocument.Changeables.Animations;
-using PixiEditor.ChangeableDocument.Rendering;
-using PixiEditor.DrawingApi.Core.Surface.ImageData;
-using PixiEditor.Numerics;
-
-namespace PixiEditor.ChangeableDocument.Changeables.Graph.Nodes;
-
-public class ImageSizeNode : Node
-{
-    public InputProperty<Surface?> Image { get; }
-    
-    public OutputProperty<VecI> Size { get; }
-    
-    public ImageSizeNode()
-    {
-        Image = CreateInput<Surface>(nameof(Image), "IMAGE", null);
-        Size = CreateOutput(nameof(Size), "SIZE", new VecI());
-    }
-    
-    protected override Surface? OnExecute(RenderingContext context)
-    {
-        Size.Value = Image.Value?.Size ?? new VecI();
-
-        return null;
-    }
-
-    public override bool Validate() => Image.Value != null;
-
-    public override Node CreateCopy() => new ImageSizeNode();
-}