Overview
BlindTransitionEffectLib reveals the target image through vertical blinds — like window blinds opening — wrapping the FireMonkey TBlindTransitionEffect component. A classic presentation-style transition.
| Property | Details |
|---|---|
| Library | BlindTransitionEffectLib |
| Prefix | blindtrans_ |
| Wraps | TBlindTransitionEffect |
| Functions | 18 |
| Type | Transition effect |
| Category | Count | Description |
|---|---|---|
| Creation / Destruction | 2 | Create and free effect |
| Target Image | 4 | Set/get/load target bitmap |
| Progress | 2 | Get/set transition progress |
| Number of Blinds | 2 | Get/set blind count |
| Effect Control | 4 | Enabled and trigger get/set |
| Error Handling | 4 | Error codes and messages |
▦ Venetian Blinds: More blinds create a finer, more subtle transition. Fewer blinds (2–5) give a bold, dramatic reveal. Range is 2–100.
Cross-Platform Support
| Platform | Support |
|---|---|
| Windows | ✅ Full support |
| Linux | ✅ Full support |
| Android | ✅ Full support |
Creation & Destruction
blindtrans#(parent#)
Creates a new blind transition effect attached to the specified visual control.
| Parameter | Type | Description |
|---|---|---|
parent# | Pointer | Target visual control |
| Returns | Pointer | Effect handle, or 0 on failure |
blindtrans_free(effect#)
Destroys the effect and releases associated resources.
Error Handling
| Function | Signature | Description |
|---|---|---|
blindtrans_error() | blindtrans_error@ | Returns last error code (0 = none) |
blindtrans_errormsg$() | blindtrans_errormsg$@ | Returns last error message |
blindtrans_strerror$(code) | blindtrans_strerror$@n | Converts error code to text |
blindtrans_clearerror() | blindtrans_clearerror@ | Clears the error state |
Target Image
| Function | Signature | Description |
|---|---|---|
blindtrans_target#(effect#, bitmap#) | blindtrans_target#@## | Sets target from bitmap pointer |
blindtrans_target#(effect#) | blindtrans_target#@# | Gets target bitmap pointer |
blindtrans_loadtarget#(effect#, url$) | blindtrans_loadtarget#@#$ | Loads target from URL or file |
blindtrans_targetfromimage#(effect#, image#) | blindtrans_targetfromimage#@## | Sets target from TImage control |
Progress
| Function | Signature | Description |
|---|---|---|
blindtrans_progress#(effect#, value) | blindtrans_progress#@#n | Set progress (0.0–1.0) |
blindtrans_progress(effect#) | blindtrans_progress@# | Get current progress |
Number of Blinds
| Function | Signature | Description |
|---|---|---|
blindtrans_numblinds#(effect#, value) | blindtrans_numblinds#@#n | Set number of blinds (2–100) |
blindtrans_numblinds(effect#) | blindtrans_numblinds@# | Get number of blinds |
| Count | Effect |
|---|---|
2–5 | Bold, dramatic reveal |
8–15 | Classic presentation-style |
20–50 | Fine, subtle transition |
50–100 | Very fine — approaches dissolve |
Effect Control
| Function | Signature | Description |
|---|---|---|
blindtrans_enabled#(effect#, value) | blindtrans_enabled#@#n | Enable (1) or disable (0) |
blindtrans_enabled(effect#) | blindtrans_enabled@# | Gets enabled state |
blindtrans_trigger#(effect#, trigger$) | blindtrans_trigger#@#$ | Sets trigger string |
blindtrans_trigger$(effect#) | blindtrans_trigger$@# | Gets trigger string |
Complete Examples
Example 1: Adjustable Blinds and Progress
let frm# = Pointer#(0) let img# = Pointer#(0) let trans# = Pointer#(0) let trkBlinds# = Pointer#(0) let trkProg# = Pointer#(0) let lblBlinds# = Pointer#(0) let lblProg# = Pointer#(0) frm# = form#("Blinds Control", 450, 450) img# = image#(frm#) image_bounds#(img#, 125, 20, 200, 150) image_load#(img#, "https://picsum.photos/200/150?random=1") trans# = blindtrans#(img#) blindtrans_loadtarget#(trans#, "https://picsum.photos/200/150?random=2") blindtrans_numblinds#(trans#, 5) lblBlinds# = label#(frm#, "Blinds: 5", 50, 190) trkBlinds# = trackbar#(frm#) trackbar_bounds#(trkBlinds#, 50, 220, 350, 30) trackbar_max#(trkBlinds#, 98) trackbar_value#(trkBlinds#, 3) trackbar_onchange#(trkBlinds#, "OnBlinds") lblProg# = label#(frm#, "Progress: 0.00", 50, 270) trkProg# = trackbar#(frm#) trackbar_bounds#(trkProg#, 50, 300, 350, 30) trackbar_max#(trkProg#, 100) trackbar_value#(trkProg#, 0) trackbar_onchange#(trkProg#, "OnProgress") form_show(frm#) function OnBlinds(sender#) local b let b = trackbar_value(trkBlinds#) + 2 blindtrans_numblinds#(trans#, b) label_text#(lblBlinds#, "Blinds: " + str$(b)) endfunction function OnProgress(sender#) local p let p = trackbar_value(trkProg#) / 100 blindtrans_progress#(trans#, p) label_text#(lblProg#, "Progress: " + stri$(p, 2)) endfunction
Example 2: Animated Blinds Transition
let frm# = Pointer#(0) let img# = Pointer#(0) let trans# = Pointer#(0) let tmr# = Pointer#(0) let btn# = Pointer#(0) let progress = 0 let direction = 1 frm# = form#("Animated Blinds", 400, 350) img# = image#(frm#) image_bounds#(img#, 100, 30, 200, 150) image_load#(img#, "https://picsum.photos/200/150?random=1") trans# = blindtrans#(img#) blindtrans_loadtarget#(trans#, "https://picsum.photos/200/150?random=2") blindtrans_numblinds#(trans#, 10) tmr# = timer#() timer_interval#(tmr#, 30) timer_enabled#(tmr#, 0) timer_ontimer#(tmr#, "Animate") btn# = button#(frm#, "Start Transition") button_bounds#(btn#, 130, 210, 140, 30) button_onclick#(btn#, "StartAnim") form_show(frm#) function StartAnim(sender#) timer_enabled#(tmr#, 1) button_enabled#(btn#, 0) endfunction function Animate(sender#) progress = progress + (direction * 0.02) blindtrans_progress#(trans#, progress) if progress >= 1 then direction = -1 endif if progress <= 0 then direction = 1 timer_enabled#(tmr#, 0) button_enabled#(btn#, 1) endif endfunction
Quick Reference
| Function | Signature | Description |
|---|---|---|
| CREATION & DESTRUCTION | ||
blindtrans#(parent#) | blindtrans#@# | Create effect |
blindtrans_free(effect#) | blindtrans_free@# | Destroy effect |
| TARGET IMAGE | ||
blindtrans_target#(effect#, bitmap#) | blindtrans_target#@## | Set target bitmap |
blindtrans_target#(effect#) | blindtrans_target#@# | Get target bitmap |
blindtrans_loadtarget#(effect#, url$) | blindtrans_loadtarget#@#$ | Load target |
blindtrans_targetfromimage#(effect#, image#) | blindtrans_targetfromimage#@## | Target from image |
| PROGRESS | ||
blindtrans_progress#(effect#, value) | blindtrans_progress#@#n | Set progress (0–1) |
blindtrans_progress(effect#) | blindtrans_progress@# | Get progress |
| NUMBER OF BLINDS | ||
blindtrans_numblinds#(effect#, value) | blindtrans_numblinds#@#n | Set blind count (2–100) |
blindtrans_numblinds(effect#) | blindtrans_numblinds@# | Get blind count |
| EFFECT CONTROL | ||
blindtrans_enabled#(effect#, value) | blindtrans_enabled#@#n | Enable/disable |
blindtrans_enabled(effect#) | blindtrans_enabled@# | Get enabled state |
blindtrans_trigger#(effect#, trigger$) | blindtrans_trigger#@#$ | Set trigger |
blindtrans_trigger$(effect#) | blindtrans_trigger$@# | Get trigger |
| ERROR HANDLING | ||
blindtrans_error() | blindtrans_error@ | Last error code |
blindtrans_errormsg$() | blindtrans_errormsg$@ | Last error message |
blindtrans_strerror$(code) | blindtrans_strerror$@n | Code to text |
blindtrans_clearerror() | blindtrans_clearerror@ | Clear error state |
See Also
| Library | Description |
|---|---|
SlideTransitionEffectLib | Slide transition |
FadeTransitionEffectLib | Fade transition |
DissolveTransitionEffectLib | Dissolve transition |
