TimothyP Posted May 17, 2011 Share Posted May 17, 2011 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? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted May 17, 2011 Share Posted May 17, 2011 There should be other overloads of Render() that still work. I recommend using Reflector to browse through it. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
TimothyP Posted September 8, 2011 Author Share Posted September 8, 2011 Is the entire API documented somewhere? Or is it all just guess work? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.