Need help with making a polygon look totally flat

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Apr 18 18:12:08 EDT 2014


Jonathan,

I made this for iOS. It was a project for a customer. Perhaps you could 
send me your requirements and we could work out something.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 4/18/2014 20:44, Jonathan Lynch wrote:
> Hello everyone,
>
>
> I am creating a coloring book application for work, to be marketed to kids.
> Of course, this means having to create my own basic painting tools because
> the standard painting tools are not available for IOS.
>
>
> Creating a freehand line polygon (9 pixels thick) and having it draw new
> segments in sync with mouse movements is a pretty easy way to simulate a
> brush. It is also easy to merge this polygon down onto the underlying image
> upon releasing the mouse button.
>
>
> However, this polygon does not have a single color. Instead, there is a
> very slight light edge and dark edge. I assume this is a standard part of
> polygons in order to make them more visually appealing. Unfortunately,
> these edges also merge down into the underlying image.
>
>
> This doesn’t look horrible, but it messes up subsequent flood fill (paint
> bucket) operations.
>
>
> Is it possible to alter the settings of a polygon so that it is purely
> flat, with not even a slight light or dark edge? I have experimented with
> coloroverlay, antialiasing, and all ink settings, but to no avail. I could
> have the polygon merge with a pure white image off-screen, work with the
> imagedata and alphadata to remove all pixels that are not of the correct
> color, then merge this new image with the main image – but that sounds like
> a really slow and difficult kludge. Surely there is a way to just totally
> flatten the look of a polygon?
>
>
> And speaking of flood full – ugh, scripting that was a nightmare. I really
> wish we could use the built-in flood fill operations in IOS.
>
>
> Thank you greatly for any suggestions,
>
>
> Jonathan
>




More information about the Use-livecode mailing list