Jump to content

How to prevent preview render and background render


xaoc

Recommended Posts

I'm blocking preview render and background render following way:

EffectPluginConfigDialog.cs :

private void buttonOK_Click(object sender, EventArgs e)
       {
           ((EffectPluginConfigToken)EffectToken).ButtonOKPressed = ButtonOKPressed = true;
           FinishTokenUpdate();
           DialogResult = DialogResult.OK;
           this.Close();
       }

EffectPlugin.cs :

bool locked = false;
       public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length)
       {       
           EffectPluginConfigToken castedParams = (EffectPluginConfigToken)parameters;

           //here I block preview render
           if (!castedParams.ButtonOKPressed)
           {
               return;
           }

           //here I block  background render
           if (locked) return;
           locked = true;
           ..........
       }

My effect algoritm works on whole image so there is no reson to render in parts. I'm looking for

the propriate way to get the same result, that make the code given above.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...