Page 1 of 1

Removing Soft Edges

Posted: Sun Jun 26, 2022 8:27 pm
by ggoblin
Hi,

How do I remove a soft edge from a shapes style?

I tried setting it to 0:

Code: Select all

myshape.fMyStyle:SetSoftEdge(0)
but that just sets it to 0 but still keeps it.

Surprisingly I couldn't find one script on MohoScripts.com that has uses the command SetSoftEdge, so have no example of how to undo its effect.

I tried removing all the styles using

Code: Select all

myshape:RemoveStyles()
but that seems to ignore soft edges

Is there another command I should be using, or am I going about it the wrong way?


Thank you for your help.

Re: Removing Soft Edges

Posted: Sun Jun 26, 2022 8:46 pm
by synthsin75
You need to use:

shape:MakePlain()

But like what you tried with RemoveStyles (which is for removing saved, "inherited" styles), this removes all shape effects.

Re: Removing Soft Edges

Posted: Sun Jun 26, 2022 8:54 pm
by ggoblin
Thank you Wes for the swift response, will give it a go! :D

I wondered how I missed it.. but checking the documentation.. its very sparse

Image

Who needs documentation when we have Wes :D

Re: Removing Soft Edges

Posted: Sun Jun 26, 2022 8:57 pm
by synthsin75
Just added a description to mohoscripting.com.

Re: Removing Soft Edges

Posted: Sun Jun 26, 2022 9:56 pm
by ggoblin
Wow that was quick!

And it works brilliantly, thank you Wes! :D

BTW I didn't mean to critisise mohoscripting.com. It an invaluable, essential resource for all scripters. And considering that its created and maintained by volunteers as there is no official documentation of the Moho API, I can only admire and praise those that dedicate to this essential task for the community.