TimothyP
-
Posts
2 -
Joined
-
Last visited
Posts posted by TimothyP
-
-
With previous versions of Paint.NET, when you wanted to create a FileType addon, the following code was valid:
protected override void OnSave(Document input, System.IO.Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) { using (RenderArgs ra = new RenderArgs(new Surface(input.Size))) { input.Render(ra); var rawData = GetBitmapBytes(ra.Bitmap); output.Write(rawData, 0, rawData.Length); } }
Now the Document.Render() method is obsolete and there is a vague reference to PaintDotNet.Rendering.IRenderer<ColorBgra> Document.CreateRenderer() but not documentation on how to use it.
Anybody know how to make the code above work with the new method?
Document.Render obsolete
in Plugin Developer's Central
Posted
Is the entire API documented somewhere?
Or is it all just guess work?