Page 1 of 2

Minimum Drawing Library Developments

Posted: Fri Mar 14, 2025 1:08 pm
by Hutchboy
Hi all,

I am releasing a Minimum Drawing Library Test Suite and version 0.92 of the library. The library needs to be in the same directory as the test suite. (The test suite will load the library via the "start using stack..." method in the preOpenStack handler.)

In the next release I will implement transparency by using the alpha channel in the imageData as well as some optimizations. [I have this working in a draft version].

Note: I have left in the code that creates the initial U.I., however I always tweak it, so beware if you uncomment that line.

As always, I welcome any suggestions. - Mike

NOTE: Attachments deleted, version 0.93 will supersede

Re: Minimum Drawing Library Developments

Posted: Fri Mar 14, 2025 2:54 pm
by Hutchboy
Hi,

Here is a teaser for the next iteration of the MDL library that implements transparency effects. In each demo, except the animation demo, you may move the Demo image by holding the mouse down over the image while you move it. This helps to see the transparency effects. I think this might open up some interesting possibilities. BTW, this demo includes the library in the stack script. The demo is in the card script.

I welcome any ideas you might have to make use of this capability so I can create some better demos for the next library release.

Mike

[attachment removed…see issue below]

Re: Minimum Drawing Library Developments

Posted: Sat Mar 15, 2025 10:35 pm
by Hutchboy
Hi,

Below are two updated user manuals in HTML format (open in a browser):

1. MDL 0.92 User Manual
2. MDL Test Suite User Manual

If you want you can easily export these into a pdf format.

-Mike

Re: Minimum Drawing Library Developments

Posted: Tue Mar 18, 2025 3:16 am
by Hutchboy
In the next MDL release (version 0.93) I have added a number of visual effects that I am working to optimize.

The following is the entire list of 36 visual effects and include many new ones that I’ve developed:

veBlinds, veBurn, veCheckerboard, veClam, veDissolve, veDissolveAlpha
veFadeThroughColor, veFadeTransparent, veGhostTransition, veGlitch,
veHolographic, veKaleidoscope, veLayeredGlass, veLiquid, veMagnetic,
veMosaic, veOrigamiFold, veParticleDissolve, vePixelate, vePush,
veRadialWipe, veReveal, veRipple, veScroll, veShatter, veShredder,
veSmoke, veSplit, veTile, veTimeMachine, veWaterRipple, veWipe,
veWipeWithSoftEdge and veZoom.

I’ve attached two explanatory HTML files to explain the workings of a simple “Wipe” visual effect and a more complicated “Water Ripple” effect. Unzip and open each HTML file in a browser (tested with Safari, Firefox and Chrome)

- Mike

Re: Minimum Drawing Library Developments

Posted: Tue Mar 18, 2025 3:12 pm
by stam
Hi Mike,

the documentation is impressive. I ran the test stack, then the teaser for the next version and it completely killed my LC install.

I ran your 'teaser' for the next version and ran click the top right button - and all hell broke loose. It crashed my LC and since then, all icons have disappeared from the starter screen, it's impossible to bring up the message box, the menus names finally showed after a long delay, but the menus do not, and the Richard's Devo plugin, which I always have running, has been relegated to a white square top left of screen which only opens the dictionary and nothing else.
MDL kills LC.jpg
Deleting the preferences file doesn't fix the issue and has affected Create as well. Possibly there has been some interaction with a plugin but I now have to remove all of these and re-introduce them one by one.

I am really not happy...

Re: Minimum Drawing Library Developments

Posted: Tue Mar 18, 2025 6:31 pm
by Hutchboy
Hi,
Wow, I test these stacks quite a bit before uploading and it never indicated any issue although I didn’t try to launch it in Create. I’m running a M4 Pro Mac Mini as well as a M1 Mac Mini, both using LC 10 latest stable release and latest developer release.

I’ll try launching in Create and also on some of my Intel Macs to see if it crashes or otherwise misbehaves. For now I’m going to delete the demo from the forum. I’ve also never installed custom plugins so will download the Devo plugin and install it to see what happens.

-Mike

Re: Minimum Drawing Library Developments

Posted: Tue Mar 18, 2025 11:57 pm
by Hutchboy
Hi all,

I have not been able to recreate the crash that user stam experienced with the teaser demo of version 0.93 of the Minimum Drawing Library (which I removed from the forum as a precaution). I downloaded the Devo plugin stam mentioned from the FourthWorld website and put it in my Plugins folder. I then ran all of the MDL related stacks without issue on LiveCode versions 9.6.13, 10.0.0 and 10.0.1 (rc3) and used the Devo toolbar with no problems.

I see one potential stability issue: I need to put a conditional check to see if the library is already in use before attempting to "start using" it and to add some clean up code to close the library when it's not in use. I think the libraryStack message, stacksInUse function and the openStacks function might be relevant. I've looked at the Animation Engine 6.0 stack as an example but am not following what the author is doing there exactly.

Advice or examples?

BTW, I am using the specialFolderPath("resources") variant of the "start using stack..." protocol because it seems the only way to get it to load without making the MDL library a substack.

My code: start using stack (specialFolderPath("resources") & "/lib_MDL.092 with added Visual Effects.livecode")

- Mike :(

Re: Minimum Drawing Library Developments

Posted: Thu Mar 20, 2025 12:02 am
by stam
FWIW the issue is likely to be FourthWorld's 4wDevo (Devolution) plugin when testing the 'teaser' stack, not the base stack.

Possibly because I hadn't used LC in a while, my Mac unhelpfully unloaded a lot of the plugins to the cloud and possibly this was the complication. I have no idea why any of this would matter... but before the actual crash I noticed the toolbar, which is normally made dark by using 4wDevo's 'Ubuntify toolbar' option became white and possibly there is some funkiness with the 'ubuntify' function, but that is pure speculation not based in any data.

Removing all plugins fixed the issue. Adding them in one by one seemed to stall at Richard's 4wDevo plugin. Its preferences were corrupted and lost forever (a bit annoying as I had scripts attached to the 'other' buttons that are now lost forever).

Nevertheless I've been able to piece LC back together again and have a functional IDE.

I'm afraid I'm not brave enough to try MDL again just yet lol ;)

Re: Minimum Drawing Library Developments

Posted: Thu Mar 20, 2025 1:15 am
by FourthWorld
stam wrote:
Thu Mar 20, 2025 12:02 am
FWIW the issue is likely to be FourthWorld's 4wDevo (Devolution) plugin when testing the 'teaser' stack, not the base stack.
If this issue occurs on the desktop I'll address a provided recipe.

The web version is so far into the future I haven't begun pondering what plugins should look like in that environment. JS tools are so plentiful that for web apps I'm not sure I'd be using Devo on the web anyway.

Re: Minimum Drawing Library Developments

Posted: Thu Mar 20, 2025 2:17 am
by stam
FourthWorld wrote:
Thu Mar 20, 2025 1:15 am
If this issue occurs on the desktop I'll address a provided recipe.
Thanks Richard - Devo has always been rock-solid, which is why I always have this running. I think it may be a particular set of circumstances as I've not been able to do any coding at all for a couple of months due to work commitments and the Mac (un)helpfully offloads rarely used files to the cloud to be downloaded only when used. I noticed that severe files in the plugins folder had been offloaded, including I think the prefs file.

Something funky happened with the teaser stack as mentioned. It was a process to rectify and I don't have time to be experimenting with this I'm afraid... so unlikely to be able to provide a recipe. All works well again, but I don't have the bandwidth to keep repeating the process (and besides I don't think I can directly control the offloading process, it's an automatic disk space-saving thing on Mac).

I'll certainly contact you directly if I do come across something reproducible.

Until a final version of the Create IDE (both desktop and web) is available, it's difficult to know if there will be a need for Devo or similar, but certainly for "classic" I find it helpful and always have it running...

Regards
Stam

Re: Minimum Drawing Library Developments

Posted: Thu Mar 20, 2025 8:56 pm
by FourthWorld
Glad you have it sorted. If you come across anything I might be able to help with, drop me a line.

Re: Minimum Drawing Library Developments

Posted: Sat Mar 29, 2025 12:38 pm
by Hutchboy
Hi,

I have updated the Minimum Drawing Library to version 0.93 Draft. I had added a number of visual effects to the package but, in review I think only a small subset is worth including so the library doesn't get too large. The main update to the library is being able to handle alpha channel and transparency.

My test suite has become too large to upload here, so I will put it on my website soon and I'm starting a GitHub as well for my projects.

I've created a small image processing stack that uses the new MDL library. No bells and whistles... it just loads a max 350x350 pixel .png image and processes according to my simple instructions: make white pixels transparent, black pixels stay opaque, all other colors get varying degrees of transparency. I've attached a sample image to load. In the next post below I have uploaded an HTML file that explains all of this in more detail.

-Mike

Re: Minimum Drawing Library Developments

Posted: Sat Mar 29, 2025 12:39 pm
by Hutchboy
Hi,

The following HTML file explains in detail the MDL Image Transparency Processor I just uploaded.

-Mike

Re: Minimum Drawing Library Developments

Posted: Sat Mar 29, 2025 5:04 pm
by FourthWorld
What does this library do?

Re: Minimum Drawing Library Developments

Posted: Sat Mar 29, 2025 5:58 pm
by Hutchboy
Hi,

This library operates on the image data of an image object. In an earlier post in this topic I uploaded a user manual which provides more detail. It covered MDL version 0.92, which didn’t include handling transparency. When I release the final version 0.93 I will include an updated user manual.

The image processor demo I posted is a simple example of one way to use the library.

Mike