Vixen
dd8b0a81
csharp
public interface IEditorImage

A picture a plugin made, put where the interface can draw it.

Read the guide page for this →

Remarks

The number, and the way to give it back, in one object. ImageView.Image and Viewport's own handle are numbers the interface resolves against the renderer, and a plugin that was handed a bare Image would have to remember to release it by calling something else with the same number — which is OnUnload's rule with an extra chance to get it wrong. This is the shape IEditorRegistry.Add already uses: what you get back is the undo, so context.Owns(…) is the whole of the bookkeeping.

⚠ Disposing it does not destroy the texture on the spot, and must not. The frame that drew the picture may still be in flight, so the host retires the image between frames — the same deferral ThumbnailSurface.Retire makes for a thumbnail scrolled off screen, and for the same reason.

Fields and properties (3)

  • ulong Image

    The number ImageView.Image takes. Never zero for a live image.

  • int Width

    How wide it is, in texels.

  • int Height

    How tall it is, in texels.

Used by (16)

  • GraphicsVixen.Editor.Texturing.Tests
  • HandleVixen.Editor.Texturing.Tests
  • HandleVixen.Editor.App
  • IEditorGraphicsVixen.Editor.Plugin
  • LayerStackPictureVixen.Editor.Texturing
  • LayerStackPreviewVixen.Editor.Texturing
  • LayerStackViewVixen.Editor.Texturing
  • PluginGraphicsVixen.Editor.App
  • PluginGraphicsTestsVixen.Editor.App.Tests
  • RecordingGraphicsVixen.Editor.Texturing.Tests
  • SwappingVixen.Editor.Texturing.Tests
  • TextureGraphPictureVixen.Editor.Texturing
  • TextureGraphPreviewVixen.Editor.Texturing
  • TextureGraphViewVixen.Editor.Texturing
  • TexturePreviewImagesVixen.Editor.Texturing
  • TexturingModuleVixen.Editor.Texturing