xod

Unfinished plugins

Recommended Posts

Thank you Remake for reply.
Yes, I want all sliders to stay connected.
As in the clip below:

 

 

Edited by xod

Share this post


Link to post
Share on other sites

My guess is that the property system wasn't designed with the idea of having controls linked, with some, but not all, hidden, so there may be no way around the flickering.

 

EDIT: From the video, everything looks fine. I don't see the flickering. Am I missing something, or is it something that isn't apparent in the video?

Share this post


Link to post
Share on other sites

The 'Rounded Rectangle' plugin has been updated. Now there is the possibility of synchronizing the four sliders without flickering.

  • Upvote 2

Share this post


Link to post
Share on other sites
2 hours ago, Eli said:

...Some trapezoid distortions would be also nice.:) 

 

 

Rotate / Zoom can do this. Also some plug-ins, such as Perspective Transformation, Quadrilateral Correction that runs much faster.

Edited by xod
  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, xod said:

but I don't know how to transfer the drawing to the pdn surface.

 

To create a Surface from the Bitmap:

bmpSurface = Surface.CopyFromBitmap(token.WorkBMP);

 

Note: the new Surface will have the same dimensions as the Bitmap.

 

If the Bmp Surface has the same dimensions as the Dst Surface, you can just do do this:

dstArgs.Surface.CopySurface(source, rois, startIndex, length);

 

If the two Surfaces have different dimensions, then you'll have to use something like GetBilinearSample():

            if (length == 0) return;
            for (int i = startIndex; i < startIndex + length; ++i)
            {
                for (int y = rois[i].Top; y < rois[i].Bottom; y++)
                {
                    if (IsCancelRequested) return;
                    for (int x = rois[i].Left; x < rois[i].Right; x++)
                    {
                        dstArgs.Surface[x, y] = bmpSurface.GetBilinearSample(x, y);
                    }
                }
            }

 

  • Upvote 3

Share this post


Link to post
Share on other sites

I don't know why my shapes are surrounded by white pixels.

 

LyIL2OD.png

 

Bitmap wrkbmp = new Bitmap(WorkBMP.Width, WorkBMP.Height);
WorkBMP.DrawToBitmap(wrkbmp, WorkBMP.ClientRectangle);

//make transparent
wrkbmp.MakeTransparent(wrkbmp.GetPixel(0, 0));

 

Share this post


Link to post
Share on other sites

It may have something to do with anti-aliasing being enabled. I am not a coder so I have no idea what is needed to disable it in your script.

 

  • Upvote 1

Share this post


Link to post
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.