Zammy Posted September 15, 2008 Share Posted September 15, 2008 Is CreateAliasedBitmap() the function to create Bitmap from Surface class? If not which is it? Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted September 15, 2008 Share Posted September 15, 2008 Yes, that is what I use. Quote Link to comment Share on other sites More sharing options...
Zammy Posted September 15, 2008 Author Share Posted September 15, 2008 Thank you Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 15, 2008 Share Posted September 15, 2008 Just remember that "aliased" means that you are still pointing to the original bitmap in memory. So, if you change it, you're changing the original, not a copy. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Zammy Posted September 15, 2008 Author Share Posted September 15, 2008 Ok thank you. So it is returning me just the reference to it. Good to know. Quote Link to comment Share on other sites More sharing options...
Zammy Posted September 15, 2008 Author Share Posted September 15, 2008 Another question, sorry but I am getting frustrated. I have been working on this for 2-3 days and it was not supposed to take so long How can I get the number of calls to Render() method in Effect class? (Aka, the number of rectangle pieces). Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted September 15, 2008 Share Posted September 15, 2008 How can I get the number of calls to Render() method in Effect class? (Aka, the number of rectangle pieces). Just call render from the render method and setrenderinfo from the setrenderinfo method. Quote Link to comment Share on other sites More sharing options...
Zammy Posted September 15, 2008 Author Share Posted September 15, 2008 Hmm... public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[]rois, int startIndex, int length) { //PdnRegion selectionRegion = EnvironmentParameters.GetSelection(srcArgs.Bounds); //for (int i = startIndex; i < startIndex + length; ++i) //{ // Rectangle rect = rois; // for (int y = rect.Top; y < rect.Bottom; ++y) // { // for (int x = rect.Left; x < rect.Right; ++x) // { // // Render Code Here // } // } //} this.SetRenderInfo(parameters, dstArgs, srcArgs); this.Render(parameters, dstArgs, srcArgs, PdnRegion.CreateEmpty()); if (animWindow == null) { this.animWindow = new AnimationWindow(); } if (((EffectPluginConfigToken)parameters).Frames == null) { this.animWindow.Frames = ((EffectPluginConfigToken)parameters).Frames; } if (animWindow.Picture == null) { this.animWindow.Picture = srcArgs.Surface.CreateAliasedBitmap(); } if (animWindow.WindowShown == false) { this.animWindow.ShowDialog(); this.animWindow.StartAnimation(); } } I am not sure what exactlly I am suppose to do with your advice. If you can give me a small snippet it would be great. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 15, 2008 Share Posted September 15, 2008 I thought you were writing a FileType plugin. In a file type plugin, there is no Render function. Am I confused, or you. :? Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Zammy Posted September 16, 2008 Author Share Posted September 16, 2008 The File Type method is not going much. I am doing it with effect plugin. Anyway I think I am going to do a stand alone application. This is getting too much work anyway. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 16, 2008 Share Posted September 16, 2008 Effect type plugins do not have access to layers other than the currently selected layer. So, if you want to save each frame on a different layer, you won't be able to do this with an effect type plugin. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game 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.