InnerGlowEffectLib — Inner Glow Effect
Creates a glow inside control boundaries. Unlike GlowEffectLib which radiates outwards, inner glow shines inward from the edges, creating an embossed or inset look. Wraps FireMonkey’s TInnerGlowEffect. 16 functions.
| Category | Count | Description |
|---|---|---|
| Error Handling | 4 | innerglow_error, errormsg$, strerror$, clearerror |
| Creation & Destruction | 2 | innerglow# (create), innerglow_free (destroy) |
| Properties | 6 | softness (2), color (2), opacity (2) |
| Effect Control | 4 | enabled, trigger (get/set) |
ⓘ Color functions: InnerGlow has 2 colour functions:
innerglow_color# sets by string name/hex, innerglow_color$ gets as string. Unlike GlowEffectLib, there is no numeric colour getter.Inner vs Outer Glow
| Feature | InnerGlowEffectLib | GlowEffectLib (Outer) |
|---|---|---|
| Direction | Inward — glows inside edges | Outward — radiates beyond edges |
| Visual | Inner border glow / embossed frame | Luminous halo / aura |
| Best for | Panels, cards, inset effects, frames | Neon buttons, selection, hover |
| Default colour | Gold | Yellow |
| Functions | 16 | 17 |
| Colour functions | 2 (set string, get string) | 3 (set string, get string, get number) |
Default Values
| Property | Range | Default | Description |
|---|---|---|---|
| Color | Named / hex | Gold | Glow colour |
| Softness | 0.0–9.0 | 4.0 | Glow spread into interior |
| Opacity | 0.0–1.0 | 0.9 | Glow intensity |
Cross-Platform Support
| Platform | Status |
|---|---|
| Windows | ✅ Full Support | Linux | ✅ Full Support |
| Android | ✅ Full Support |
Error Handling
| Function | Signature | Description |
|---|---|---|
innerglow_error() | innerglow_error@ | Returns last error code (0 = no error) |
innerglow_errormsg$() | innerglow_errormsg$@ | Returns last error message |
innerglow_strerror$(code) | innerglow_strerror$@n | Converts error code to text |
innerglow_clearerror() | innerglow_clearerror@ | Clears error state |
Error Codes
| Code | Constant | Meaning |
|---|---|---|
| 0 | ERR_NONE | No error |
| 1 | ERR_NIL_EFFECT | Effect pointer is nil |
| 2 | ERR_INVALID_EFFECT | Not a valid TInnerGlowEffect |
| 3 | ERR_INVALID_VALUE | Property value out of range |
| 4 | ERR_NIL_PARENT | Parent control is nil |
| 5 | ERR_INVALID_PARENT | Not a valid TFmxObject |
| 6 | ERR_INVALID_COLOR | Unrecognised colour name/hex |
Creation & Destruction
| Function | Signature | Description |
|---|---|---|
innerglow#(parent#) | innerglow#@# | Creates inner glow on parent. Returns effect pointer. Defaults: softness 4.0, colour Gold, opacity 0.9 |
innerglow_free(effect#) | innerglow_free@# | Destroys effect, removes from parent |
Softness
Controls how far the inner glow spreads from the edges towards the centre. Range 0.0–9.0.
| Function | Signature | Description |
|---|---|---|
innerglow_softness#(effect#, value) | innerglow_softness#@#n | Sets softness (0.0–9.0) |
innerglow_softness(effect#) | innerglow_softness@# | Gets current softness |
| Range | Effect | Use Case |
|---|---|---|
| 0.0–2.0 | Thin inner border glow | Subtle frame, selection outline |
| 2.0–5.0 | Normal inner glow spread | Embossed panels, card frames |
| 5.0–9.0 | Deep glow reaching centre | Dramatic inset, vignette-like |
Color
Accepts named colours or hex strings. Two functions: set (by string) and get (as string).
| Function | Signature | Description |
|---|---|---|
innerglow_color#(effect#, color$) | innerglow_color#@#$ | Sets colour (name or hex) |
innerglow_color$(effect#) | innerglow_color$@# | Gets colour as string |
Supported named colours: Black, White, Red, Green, Blue, Yellow, Cyan, Magenta, Gray, Grey, Silver, Maroon, Olive, Navy, Purple, Teal, Orange, Pink, Brown, Lime, Aqua, Fuchsia, Transparent, Null
Hex format: #RRGGBB or #AARRGGBB
Opacity
| Function | Signature | Description |
|---|---|---|
innerglow_opacity#(effect#, value) | innerglow_opacity#@#n | Sets opacity (0.0–1.0) |
innerglow_opacity(effect#) | innerglow_opacity@# | Gets current opacity |
Effect Control
| Function | Signature | Description |
|---|---|---|
innerglow_enabled#(effect#, value) | innerglow_enabled#@#n | Enables (1) or disables (0) |
innerglow_enabled(effect#) | innerglow_enabled@# | Gets enabled state |
innerglow_trigger#(effect#, trigger$) | innerglow_trigger#@#$ | Sets trigger string |
innerglow_trigger$(effect#) | innerglow_trigger$@# | Gets trigger string |
Complete Examples
Basic Inner Glow
let frm# = Pointer#(0) let rect# = Pointer#(0) let ig# = Pointer#(0) frm# = form#("Inner Glow Demo", 400, 300) rect# = rectangle#(frm#) rectangle_bounds#(rect#, 100, 80, 200, 120) rectangle_fill#(rect#, "White") ig# = innerglow#(rect#) innerglow_color#(ig#, "Gold") innerglow_softness#(ig#, 4) innerglow_opacity#(ig#, 0.8) form_show(frm#)
Toggle Inner Glow
let frm# = Pointer#(0) let rect# = Pointer#(0) let ig# = Pointer#(0) frm# = form#("Toggle Inner Glow", 400, 300) rect# = rectangle#(frm#) rectangle_bounds#(rect#, 100, 50, 200, 120) rectangle_fill#(rect#, "SteelBlue") ig# = innerglow#(rect#) innerglow_color#(ig#, "Cyan") innerglow_softness#(ig#, 5) let btn# = button#(frm#, "Toggle Glow") button_bounds#(btn#, 130, 200, 120, 35) button_onclick#(btn#, "OnToggle") form_show(frm#) function OnToggle(sender#) if innerglow_enabled(ig#) = 1 then innerglow_enabled#(ig#, 0) else innerglow_enabled#(ig#, 1) endif endfunction
Colour Selector
let frm# = Pointer#(0) let rect# = Pointer#(0) let ig# = Pointer#(0) frm# = form#("Glow Colors", 450, 280) rect# = rectangle#(frm#) rectangle_bounds#(rect#, 125, 40, 200, 100) rectangle_fill#(rect#, "White") ig# = innerglow#(rect#) innerglow_color#(ig#, "Gold") innerglow_softness#(ig#, 4) let btn1# = button#(frm#, "Gold") button_bounds#(btn1#, 50, 180, 80, 30) button_onclick#(btn1#, "SetGold") let btn2# = button#(frm#, "Cyan") button_bounds#(btn2#, 140, 180, 80, 30) button_onclick#(btn2#, "SetCyan") let btn3# = button#(frm#, "Red") button_bounds#(btn3#, 230, 180, 80, 30) button_onclick#(btn3#, "SetRed") let btn4# = button#(frm#, "Lime") button_bounds#(btn4#, 320, 180, 80, 30) button_onclick#(btn4#, "SetLime") form_show(frm#) function SetGold(sender#) innerglow_color#(ig#, "Gold") endfunction function SetCyan(sender#) innerglow_color#(ig#, "Cyan") endfunction function SetRed(sender#) innerglow_color#(ig#, "Red") endfunction function SetLime(sender#) innerglow_color#(ig#, "Lime") endfunction
Best Practices
| Practice | Why |
|---|---|
| Use on light backgrounds | Inner glow is most visible on white/light surfaces |
| Softness 3–5 for panel frames | Natural-looking embossed border effect |
| Softness 6+ for vignette | Deep glow reaching the centre creates a vignette look |
| Combine outer + inner glow | Both effects can be applied to the same control |
| Animate with FloatAnimationLib | Animate Softness or Opacity for pulsing inner glow |
| Gold on white for elegance | Classic premium/luxury panel look |
Quick Reference
| Function | Signature | Description |
|---|---|---|
| ERROR HANDLING | ||
innerglow_error() | innerglow_error@ | Last error code |
innerglow_errormsg$() | innerglow_errormsg$@ | Last error message |
innerglow_strerror$(code) | innerglow_strerror$@n | Error code to text |
innerglow_clearerror() | innerglow_clearerror@ | Clear error state |
| CREATION & DESTRUCTION | ||
innerglow#(parent#) | innerglow#@# | Create inner glow on control |
innerglow_free(effect#) | innerglow_free@# | Destroy effect |
| SOFTNESS | ||
innerglow_softness#(e#, val) | innerglow_softness#@#n | Set spread (0–9) |
innerglow_softness(e#) | innerglow_softness@# | Get spread |
| COLOR | ||
innerglow_color#(e#, color$) | innerglow_color#@#$ | Set colour (name/hex) |
innerglow_color$(e#) | innerglow_color$@# | Get colour as string |
| OPACITY | ||
innerglow_opacity#(e#, val) | innerglow_opacity#@#n | Set opacity (0–1) |
innerglow_opacity(e#) | innerglow_opacity@# | Get opacity |
| EFFECT CONTROL | ||
innerglow_enabled#(e#, val) | innerglow_enabled#@#n | Enable (1) / disable (0) |
innerglow_enabled(e#) | innerglow_enabled@# | Get enabled state |
innerglow_trigger#(e#, str$) | innerglow_trigger#@#$ | Set trigger string |
innerglow_trigger$(e#) | innerglow_trigger$@# | Get trigger string |
16 functions. Part of the Plan9Basic visual effects library system.
See Also
- GlowEffectLib — Outer glow around controls
- ShadowEffectLib — Drop shadow effects
- BevelEffectLib — Bevelled edge effects
- FloatAnimationLib — Animate Softness and Opacity
