User Manual - Comprehensive Guide for LiveCode Developers
The MinimumDraw Library (MDL) is a lightweight, powerful graphics library originally created by UDI (http://udimac.web.fc2.com) and adapted by Michael Roberts for use in LiveCode projects. Version 0.92 includes bug fixes, optimizations, and enhanced debugging capabilities compared to the original 0.91 version.
MDL provides direct pixel-level control for drawing operations, making it ideal for custom graphics that would be difficult to achieve with LiveCode's standard drawing tools. The library is compact, efficient, and includes a wide range of functions for buffer management, drawing primitives, color handling, pixel manipulation, text rendering, and visual effects.
Note: This manual covers MDL version 0.92, which includes several enhancements and bug fixes over the original 0.91 version.
There are two primary methods to incorporate the MDL into your LiveCode project:
start using stack "lib_MDL_0.92.livecode"
Follow these steps to set up a basic drawing environment with MDL:
Create an image object in your LiveCode stack to serve as your drawing canvas:
create image "myCanvas"
set the width of image "myCanvas" to 400
set the height of image "myCanvas" to 300
Initialize the MDL buffer using your image:
MdMakeBuffer "myCanvas"
Set the pen and background colors:
MdSetPenColor "255,0,0" -- Red
MdSetBgColor "255,255,255" -- White
Draw a simple shape:
MdDrawRect "50,50,150,150", true -- Draw a filled rectangle
Update the image with your drawing:
MdUpdate "myCanvas"
Here's a complete example that puts everything together:
-- Create a canvas image if it doesn't exist
if there is not an image "myCanvas" then
create image "myCanvas"
set the width of image "myCanvas" to 400
set the height of image "myCanvas" to 300
set the loc of image "myCanvas" to the loc of this card
end if
-- Initialize MDL buffer
MdMakeBuffer "myCanvas"
-- Clear the canvas
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Draw a red rectangle
MdSetPenColor "255,0,0" -- Red
MdDrawRect "50,50,150,150", true
-- Draw a blue circle
MdSetPenColor "0,0,255" -- Blue
MdDrawOval "200,50,300,150", true
-- Draw some text
MdSetPenColor "0,0,0" -- Black
MdDrawText "Hello, MDL!", "50,200", 15, "bold"
-- Update the display
MdUpdate "myCanvas"
Tip: Always remember to call MdUpdate
after your drawing operations to display the results on your image.
MDL uses a buffer-based drawing system where operations are performed on a virtual canvas in memory before being applied to the visible image. This approach improves performance and enables more complex operations.
MDL uses a pixel-based coordinate system with the following characteristics:
Rectangles in MDL are specified as a string of four comma-separated integers representing the coordinates of the top-left and bottom-right corners:
"left,top,right,bottom"
Example: "50,50,150,150"
defines a 100x100 pixel rectangle with its top-left corner at (50,50).
MDL supports multiple formats for specifying colors:
Format | Description | Example |
---|---|---|
Single value | Grayscale (0-255) | "128" (medium gray) |
Two values | Alpha + Grayscale | "128,255" (semi-transparent white) |
Three values | RGB | "255,0,0" (red) |
Four values | Alpha + RGB | "128,255,0,0" (semi-transparent red) |
Hex (with #) | RGB in hexadecimal | "#FF0000" (red) |
Hex with alpha | Alpha + RGB in hexadecimal | "#80FF0000" (semi-transparent red) |
Note: Alpha values range from 0 (completely transparent) to 255 (completely opaque).
MDL uses a special format called "pix" for storing and manipulating image data. A pix consists of:
These elements are stored as a comma-separated list with the binary image data following the dimensions.
Buffer management functions handle the creation, manipulation, and updating of drawing buffers.
Initializes the drawing buffer based on an existing image object. This is typically the first MDL function called in an application.
MdMakeBuffer "myCanvas"
Creates a new buffer with specified dimensions. The buffer will be filled with the current background color.
MdNewBuffer 800, 600
Updates the image object with the current buffer content. Optionally applies visual effects.
MdUpdate "myCanvas"
MdUpdate "myCanvas", "pushLeft", "fast"
Saves the current buffer state to temporary memory for later restoration.
MdPushBuffer
Note: In version 0.92, only one buffer state can be saved at a time.
Restores the buffer state from temporary memory (previously saved with MdPushBuffer).
MdPopBuffer
Returns the width of the current buffer in pixels.
put MdGetBufferWidth() into tWidth
Returns the height of the current buffer in pixels.
put MdGetBufferHeight() into tHeight
Returns the dimensions of the buffer as a rectangle specification.
put MdGetBufferRect() into tBufferRect
Fills the entire buffer with the current pen color.
MdSetPenColor "255,0,0" -- Red
MdFillScreen
Fills the entire buffer with the current background color.
MdSetBgColor "255,255,255" -- White
MdEraseScreen
Scrolls the buffer content by the specified amounts.
MdScroll 10, 0 -- Scroll right 10 pixels
MdScroll 0, -20 -- Scroll up 20 pixels
The following example demonstrates typical buffer management operations:
-- Initialize the main buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Save the empty buffer state
MdPushBuffer
-- Draw something
MdSetPenColor "255,0,0" -- Red
MdDrawRect "50,50,150,150", true
MdUpdate "myCanvas"
-- Wait briefly to show the red rectangle
wait 1 second
-- Restore empty buffer state
MdPopBuffer
MdUpdate "myCanvas", "dissolve", "fast"
-- Draw something else
MdSetPenColor "0,0,255" -- Blue
MdDrawOval "50,50,150,150", true
MdUpdate "myCanvas"
MDL provides a variety of drawing tools for creating shapes and lines.
Draws a line using the current pen color.
MdDrawLine "10,10,100,100" -- Diagonal line
Draws a line using the current background color (effectively erasing).
MdEraseLine "10,10,100,100" -- Erase a diagonal line
Draws a rectangle using the current pen color.
MdDrawRect "50,50,150,150", true -- Filled rectangle
MdDrawRect "200,50,300,150", false -- Outline only
Draws a rectangle using the current background color (effectively erasing).
MdEraseRect "50,50,150,150", true -- Erase a filled area
Draws an oval or circle using the current pen color. The oval will fit within the specified rectangle.
MdDrawOval "50,50,150,150", true -- Filled circle
MdDrawOval "200,50,300,100", false -- Outline oval
Draws an oval using the current background color (effectively erasing).
MdEraseOval "50,50,150,150", true -- Erase a circular area
Draws a diamond shape using the current pen color. The diamond will fit within the specified rectangle.
MdDrawDia "50,50,150,150", true -- Filled diamond
Draws a diamond using the current background color (effectively erasing).
MdEraseDia "50,50,150,150", true -- Erase a diamond-shaped area
Draws a star shape using the current pen color. The star will fit within the specified rectangle.
MdDrawStar "50,50,150,150", true -- Filled star
Draws a star using the current background color (effectively erasing).
MdEraseStar "50,50,150,150", true -- Erase a star-shaped area
Here's an example that demonstrates various drawing tools:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Draw a red outline rectangle
MdSetPenColor "255,0,0" -- Red
MdDrawRect "20,20,120,80", false
-- Draw a blue filled oval
MdSetPenColor "0,0,255" -- Blue
MdDrawOval "150,20,250,80", true
-- Draw a green filled diamond
MdSetPenColor "0,255,0" -- Green
MdDrawDia "20,100,120,160", true
-- Draw a purple star outline
MdSetPenColor "128,0,128" -- Purple
MdDrawStar "150,100,250,160", false
-- Draw some connecting lines
MdSetPenColor "0,0,0" -- Black
MdDrawLine "120,50,150,50" -- Horizontal line connecting rectangle and oval
MdDrawLine "70,80,70,100" -- Vertical line connecting rectangle and diamond
MdDrawLine "200,80,200,100" -- Vertical line connecting oval and star
-- Update the display
MdUpdate "myCanvas"
MDL provides several functions for managing colors and transparency.
Sets the current pen color used for drawing operations.
MdSetPenColor "255,0,0" -- Red in RGB format
MdSetPenColor "#00FF00" -- Green in hex format
MdSetPenColor "128" -- Medium gray in grayscale format
MdSetPenColor "128,255,0,0" -- Semi-transparent red
Returns the current pen color as an RGBA string.
put MdGetPenColor() into tCurrentColor
Sets the current background color used for erasing operations.
MdSetBgColor "255,255,255" -- White in RGB format
MdSetBgColor "#000000" -- Black in hex format
MdSetBgColor "200" -- Light gray in grayscale format
Returns the current background color as an RGBA string.
put MdGetBgColor() into tCurrentBgColor
Returns a color that is a blend between two specified colors.
-- Get a 50/50 blend of red and blue (purple)
put MdGetBlendColor("255,255,0,0", "255,0,0,255", 5) into tPurple
-- Get a 70/30 blend of red and blue
put MdGetBlendColor("255,255,0,0", "255,0,0,255", 3) into tRedPurple
Similar to MdGetBlendColor, but works with binary color data for improved performance.
Note: This function is primarily for internal use or performance optimization.
Sets the alpha channel value for a pixel array (pix).
-- Create a pix and set half transparency
put MdBufferToPix() into tPix
MdSetPixAlpha tPix, 128
MdDrawPix tPix, "50,50"
Sets the alpha channel value for the current buffer.
-- Make the entire buffer semi-transparent
MdSetBufferAlpha 128
-- Make just a specific area semi-transparent
MdSetBufferAlpha 128, "50,50,150,150"
Here's an example that demonstrates various color management techniques:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Draw overlapping shapes with different colors
MdSetPenColor "255,0,0" -- Red
MdDrawRect "50,50,150,150", true
-- Create a blend of red and blue (purple)
put MdGetBlendColor("255,255,0,0", "255,0,0,255", 5) into tPurple
MdSetPenColor tPurple
MdDrawRect "100,100,200,200", true
-- Create a semi-transparent green overlay
MdSetPenColor "128,0,255,0" -- Semi-transparent green
MdDrawOval "75,75,175,175", true
-- Update the display
MdUpdate "myCanvas"
MDL provides functions for manipulating individual pixels and pixel arrays.
Sets a single pixel to the current pen color.
MdSetPixel "100,100" -- Set pixel at (100,100) to pen color
Sets a single pixel to the current background color (effectively erasing it).
MdErasePixel "100,100" -- Set pixel at (100,100) to background color
Returns the color of a specific pixel as an RGBA string.
put MdGetPixel("100,100") into tPixelColor
Creates a new pixel array (pix) filled with the current background color.
put MdNewPix(100, 100) into tEmptyPix
Converts an image object to a pixel array (pix).
-- Convert entire image
put MdImageToPix("sourceImage") into tFullPix
-- Convert just a portion of the image
put MdImageToPix("sourceImage", "10,10,110,110") into tPartialPix
Converts the current buffer to a pixel array (pix).
-- Convert entire buffer
put MdBufferToPix() into tBufferPix
-- Convert just a portion of the buffer
put MdBufferToPix("10,10,110,110") into tPartialPix
Creates a copy of a pixel array (pix), optionally selecting just a portion.
-- Copy entire pix
put MdCopyPix(tSourcePix) into tCopyPix
-- Copy just a portion
put MdCopyPix(tSourcePix, "10,10,60,60") into tPartialCopy
Draws a pixel array onto the current buffer at the specified location.
MdDrawPix tSpritePix, "100,100" -- Draw sprite at position 100,100
Draws a pixel array as a repeating pattern within the specified rectangle.
-- Create a small pattern
MdNewBuffer 10, 10
MdSetPenColor "0,0,0"
MdDrawRect "0,0,4,4", true
MdDrawRect "5,5,9,9", true
put MdBufferToPix() into tPatternPix
-- Restore original buffer and draw pattern as a fill
MdNewBuffer 400, 300
MdDrawPixPat tPatternPix, "50,50,350,250" -- Fill area with checkerboard pattern
Here's an example that demonstrates various pixel manipulation techniques:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Create a small 10x10 pixel pattern
MdNewBuffer 10, 10
MdSetPenColor "255,0,0" -- Red
MdDrawRect "0,0,4,4", true
MdSetPenColor "0,0,255" -- Blue
MdDrawRect "5,5,9,9", true
put MdBufferToPix() into tPattern
-- Restore main buffer
MdNewBuffer 400, 300
MdEraseScreen
-- Draw the pattern as a repeating tile in a rectangle
MdDrawPixPat tPattern, "50,50,350,150"
-- Create a sprite by drawing a simple shape
MdNewBuffer 20, 20
MdSetPenColor "0,255,0" -- Green
MdDrawOval "0,0,19,19", true
MdSetPenColor "0,0,0" -- Black
MdDrawOval "4,4,15,15", false
put MdBufferToPix() into tSprite
-- Make the sprite semi-transparent
MdSetPixAlpha tSprite, 128
-- Restore main buffer and draw the sprite at three locations
MdNewBuffer 400, 300
MdDrawPix tSprite, "100,200"
MdDrawPix tSprite, "200,200"
MdDrawPix tSprite, "300,200"
-- Draw individual pixels to create a dotted line
MdSetPenColor "0,0,0" -- Black
repeat with x = 50 to 350 step 10
MdSetPixel x & ",180"
end repeat
-- Update the display
MdUpdate "myCanvas"
MDL includes functions for rendering text and numbers using built-in vector fonts.
Draws text using the built-in vector font.
-- Basic text drawing
MdDrawText "Hello World", "20,20"
-- Styled text
MdDrawText "BOLD TEXT", "20,50", 10, "bold"
MdDrawText "CENTERED", "200,80", 10, "center"
MdDrawText "LARGE", "20,110", 5, "X:2 Y:2"
-- Multi-line text
MdDrawText "Line 1" & return & "Line 2", "20,150"
Note: The built-in font supports: space, punctuation, digits 0-9, letters A-Z, and special characters.
Draws custom vector shapes defined by a point list.
-- Draw a simple arrow shape
MdDrawVec "254525", "50,50" -- Triangle
Note: This function is primarily used internally for text rendering but can be used for custom vector shapes.
Draws numbers using a 7-segment display style.
-- Basic number display
MdDrawNumber 12345, "20,20"
-- Right-aligned with padding
MdDrawNumber 42, "100,50", 5, 0, "right" -- Shows " 42"
-- Thicker segments
MdDrawNumber 789, "20,80", 3, 2
Draws a custom 7-segment display pattern.
-- Segment numbering:
-- 1
-- 2 3
-- 4
-- 5 6
-- 7
-- Draw a custom pattern
MdDrawSegment "1234567", "20,20" -- All segments (8)
MdDrawSegment "3567", "40,20" -- Letter "C"
MdDrawSegment "134567", "60,20" -- Letter "E"
Here's an example that demonstrates text and number rendering:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Draw a title
MdSetPenColor "0,0,0" -- Black
MdDrawText "MDL TEXT DEMO", "50,30", 20, "bold center"
-- Draw standard text
MdSetPenColor "0,0,255" -- Blue
MdDrawText "Standard Text", "50,70"
-- Draw formatted text
MdSetPenColor "255,0,0" -- Red
MdDrawText "BOLD", "50,100", 4, "bold"
MdDrawText "WIDE", "120,100", 4, "X:1.5"
MdDrawText "TALL", "200,100", 4, "Y:1.5"
MdDrawText "BIG", "270,100", 3, "X:2 Y:2"
-- Draw multi-line text
MdSetPenColor "0,128,0" -- Green
MdDrawText "Line 1" & return & "Line 2" & return & "Line 3", "50,150"
-- Draw 7-segment numbers
MdSetPenColor "0,0,0" -- Black
MdDrawText "7-Segment Numbers:", "50,220"
-- Draw numbers with different weights
repeat with i = 0 to 3
MdDrawNumber 8, (50 + i * 40) & ",250", 1, i
end repeat
-- Draw a digital clock display
MdSetPenColor "0,0,255" -- Blue
MdDrawNumber 12, "200,250", 2, 1
MdDrawText ":", "230,250", 1, "bold"
MdDrawNumber 34, "245,250", 2, 1
-- Custom segments to spell "HELLO"
MdSetPenColor "255,0,0" -- Red
MdDrawSegment "23567", "50,300" -- H
MdDrawSegment "13467", "80,300" -- E
MdDrawSegment "167", "110,300" -- L
MdDrawSegment "167", "140,300" -- L
MdDrawSegment "23567", "170,300" -- O
-- Update the display
MdUpdate "myCanvas"
MDL provides a variety of visual effects and transitions that can be applied when updating the display.
Returns a list of all available visual effects.
put MdGetEffectList() into tEffects
Visual effects are applied using the MdUpdate
function with additional parameters:
MdUpdate "myCanvas", pEffect, pSpeed
Pushes the new content onto the screen from a direction, moving the old content out.
Scrolls the content in a specific direction.
Wipes the new content onto the screen in a specific direction.
Reveals the new content gradually in a specific direction.
Square-based transitions.
Clam-shell style transitions.
Dissolve-based transitions.
Here's an example that demonstrates several visual effects:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
-- Function to draw a test screen
on drawTestScreen pScreenNum
MdEraseScreen
MdSetPenColor "0,0,0" -- Black
MdDrawText "Screen " & pScreenNum, "20,20", 10, "bold"
-- Draw different shapes based on screen number
if pScreenNum = 1 then
MdSetPenColor "255,0,0" -- Red
MdDrawRect "50,50,150,150", true
else if pScreenNum = 2 then
MdSetPenColor "0,0,255" -- Blue
MdDrawOval "50,50,150,150", true
else if pScreenNum = 3 then
MdSetPenColor "0,255,0" -- Green
MdDrawStar "50,50,150,150", true
else
MdSetPenColor "128,0,128" -- Purple
MdDrawDia "50,50,150,150", true
end if
end drawTestScreen
-- Draw the first screen
drawTestScreen 1
MdUpdate "myCanvas"
-- Wait briefly
wait 1 second
-- Test various effects
drawTestScreen 2
MdUpdate "myCanvas", "pushLeft", "fast"
wait 1 second
drawTestScreen 3
MdUpdate "myCanvas", "dissolve", "normal"
wait 1 second
drawTestScreen 4
MdUpdate "myCanvas", "wipeOpen", "slow"
wait 1 second
-- Return to first screen with a different effect
drawTestScreen 1
MdUpdate "myCanvas", "squareClose", "fast"
Tip: Effects are particularly useful for slide shows, animations, and interactive presentations.
MDL provides a variety of utility functions for rectangle manipulation, data handling, and other common operations.
Creates a rectangle string from individual coordinates.
put MdPackRect(10, 20, 110, 120) into tRect -- "10,20,110,120"
Extracts individual coordinates from a rectangle string.
MdUnpackRect "10,20,110,120", tLeft, tTop, tRight, tBottom
Moves a rectangle by the specified offset.
put "10,20,110,120" into tRect
MdOffsetRect tRect, 20, 30
-- tRect is now "30,50,130,150"
Shrinks or enlarges a rectangle from its center.
put "10,20,110,120" into tRect
MdInsetRect tRect, 10, 10
-- tRect is now "20,30,100,110" (smaller)
put "10,20,110,120" into tRect
MdInsetRect tRect, -10, -10
-- tRect is now "0,10,120,130" (larger)
Checks if a point is inside a rectangle.
if MdPtInRect("50,60", "10,20,110,120") then
-- Point is inside the rectangle
end if
Scales a rectangle while keeping its top-left corner fixed.
put "10,20,110,120" into tRect
MdZoomRect tRect, 2, 1.5
-- tRect is now "10,20,210,170" (wider and taller)
Moves a location by the specified offset.
put "50,60" into tLoc
MdOffsetLoc tLoc, 10, 20
-- tLoc is now "60,80"
Repeats data to fill a specified length.
put MdPackData(100, "ABCD") into tRepeatedData
-- Results in "ABCDABCDABCD..." repeated to 100 bytes
Note: This function is primarily used internally but can be useful for creating patterns.
Swaps the values of two variables.
put 10 into tValue1
put 20 into tValue2
MdSwap tValue1, tValue2
-- tValue1 is now 20, tValue2 is now 10
Randomly shuffles a list of comma-separated items.
put "1,2,3,4,5" into tList
MdShuffleItems tList
-- tList might now be something like "4,1,5,2,3"
Returns a shuffled list of numbers from 1 to N.
put MdGetShuffeItems(10) into tShuffledList
-- tShuffledList might be something like "7,3,1,10,6,2,8,5,9,4"
Returns a simple help text describing MDL functions.
put MdGetHelp() into tHelpText
Here's an example that demonstrates various utility functions:
-- Initialize the buffer
MdMakeBuffer "myCanvas"
MdSetBgColor "255,255,255" -- White
MdEraseScreen
-- Create a rectangle and manipulate it
put "50,50,150,150" into tRect
MdSetPenColor "255,0,0" -- Red
MdDrawRect tRect, false
-- Offset the rectangle and draw it
MdOffsetRect tRect, 20, 20
MdSetPenColor "0,255,0" -- Green
MdDrawRect tRect, false
-- Inset the rectangle and draw it
MdInsetRect tRect, 10, 10
MdSetPenColor "0,0,255" -- Blue
MdDrawRect tRect, false
-- Create a shuffled list of positions
put MdGetShuffeItems(10) into tShuffledList
-- Draw dots at shuffled positions
MdSetPenColor "0,0,0" -- Black
repeat for each item i in tShuffledList
put 200 + (i * 15) into tX
put 100 into tY
MdDrawOval (tX - 5) & "," & (tY - 5) & "," & (tX + 5) & "," & (tY + 5), true
end repeat
-- Use point-in-rectangle testing
put "50,200,250,300" into tTestRect
MdDrawRect tTestRect, false
-- Draw text explaining the test
MdDrawText "Click inside or outside the rectangle:", "50,180"
-- Update the display
MdUpdate "myCanvas"
-- In a mouseDown handler, you could do this:
on mouseDown
if MdPtInRect(the mouseH & "," & the mouseV, tTestRect) then
answer "You clicked inside the rectangle!"
else
answer "You clicked outside the rectangle!"
end if
end mouseDown
MDL version 0.92 includes enhanced debugging capabilities to help you identify and resolve issues in your code.
The primary debugging tool in MDL 0.92 is the debugLog
function:
Outputs a debug message to a field named "DebugOutput".
-- Create a debug output field if it doesn't exist
if there is not a field "DebugOutput" then
create field "DebugOutput"
set the rect of field "DebugOutput" to "10,400,500,600"
set the vScrollbar of field "DebugOutput" to true
end if
-- Log debug messages
debugLog "Starting MDL operations..."
MdMakeBuffer "myCanvas"
debugLog "Buffer created with dimensions: " & MdGetBufferWidth() & "x" & MdGetBufferHeight()
MdDrawRect "50,50,150,150", true
debugLog "Rectangle drawn at 50,50,150,150"
To get the best performance from MDL, consider these optimization strategies:
MdDrawPixPat
can be more efficient than drawing multiple individual shapes.Here's an example that demonstrates debugging techniques:
-- Create a debug output field if it doesn't exist
if there is not a field "DebugOutput" then
create field "DebugOutput"
set the rect of field "DebugOutput" to "10,400,500,600"
set the vScrollbar of field "DebugOutput" to true
set the lockText of field "DebugOutput" to false
end if
-- Initialize MDL with debugging
debugLog "Starting MDL initialization"
MdMakeBuffer "myCanvas"
debugLog "Buffer initialized: " & MdGetBufferWidth() & "x" & MdGetBufferHeight()
-- Track memory usage and performance
put the milliseconds into tStartTime
MdSetBgColor "255,255,255"
MdEraseScreen
debugLog "Screen erased in " & (the milliseconds - tStartTime) & "ms"
-- Test drawing performance
put the milliseconds into tStartTime
MdSetPenColor "255,0,0"
repeat with i = 1 to 10
MdDrawRect (i * 20) & "," & (i * 20) & "," & (i * 20 + 100) & "," & (i * 20 + 100), true
debugLog "Drew rectangle " & i & " at " & (i * 20) & "," & (i * 20)
end repeat
debugLog "Drew 10 rectangles in " & (the milliseconds - tStartTime) & "ms"
-- Check pixel operations
put the milliseconds into tStartTime
put MdGetPixel("50,50") into tPixelColor
debugLog "Pixel at 50,50 is " & tPixelColor & " (retrieved in " & (the milliseconds - tStartTime) & "ms)"
-- Update with timing
put the milliseconds into tStartTime
MdUpdate "myCanvas"
debugLog "Updated display in " & (the milliseconds - tStartTime) & "ms"
-- Final summary
debugLog "All operations completed"
While MDL is a powerful library, it has some limitations that you should be aware of:
Released: September 2024
Released: April 2024
Released: Unknown date (original version by UDI)