Neatware Company

An ISV for Mobile, Cloud, and Video Technologies and Software.

Word

This script shows text over a video

Overlay
package require media
package require mcllib
_mcl

load media, mcllib packages. open mcl.

proc transition_forward {{start 0.0} {end 1.0} {step 0.05}} {
  for {set r $start} {$r <= $end} {set r [expr {$r+$step}]} {

forward transition from $star and stop $end with $step.

    !transform {progress $r}
    graph show
  }
}

change transform progress value and show graph on the theme.

proc transition_backward {{start 1.0} {end 0.0} {step 0.05}} {
  for {set r $start} {$r >= $end} {set r [expr {$r-$step}]} {
    !transform {progress $r}
    graph show
  }
}

backward transition.

set iname [getPath media image image003.jpg]
set wtheme 352
set htheme 240

_theme {
  title  "Ladybug Studio XP" 
  orgx   250
  orgy   90
  width  $wtheme 
  height $htheme 
  region window
  mode   windowless}

open theme.

  _image {name $iname}

  set wimage [?image width]
  set himage [?image height]
  !theme {width $wimage height $himage}

open image and get image width and height, then reset the theme size.

    _text {
       string   "Welcome to Ladybug Studio XP" 
       orgx     0 
       orgy     0
       fgcolor  0xffffff
       bgcolor  0xff3333 
       fill     0xff3333ff
       font     Impact
       size     40}

open text object. The surface size of text will be uniformed to the same size of image.

       _transform {name Fade}
         _graph {theme {transform image text}}
           set w [?text width]
           set h [?text height]

open transform Fade. link theme, transform, image and text in the graph. get text width and height.

           while {1} {
             !text {string "Welcome to Ladybug Studio XP" 
                    orgx [expr ($wimage-$w)/2] 
                    orgy [expr ($himage-$h)/2] 
                    fgcolor 0xffffff}
              transition_forward
              transition_backward
           }

write the in the center of the image and show transition in forward and backward.

         graph_
       transform_
    image_
  text_
theme_
mcl_

close graph, transform, image, text, theme, and mcl.