Ecran de démarrage

 

ulis, 07-10-2005. Un écran de démarrage dynamique pour Tcl.


Pourquoi

Bin pour mettre un peu d'animation, tiens !


Comment

L'image de la plume suit l'écriture du logo.


Le script

  ####################
  #                  #
  #   Animated Tcl   #
  #                  #
  ####################

  set font(t) \
  {
    {w 40}
    {l 10 70 10 110}
    {c 10 100 30 120 180 150}
    {l 10 85 25 85}
  }
  set font(c) \
  {
    {w 40}
    {c 5 95 30 120 35 300}
  }
  set font(l) \
  {
    {w 40}
    {l 10 50 10 110}
    {c 10 100 30 120 180 150}
  }

  # draw
  proc draw {w x y char color} \
  {
    set width 0
    set moved 0
    set pi [expr {atan(1) * 4}]
    foreach stroke $char \
    {
      foreach {func x0 y0 x1 y1 start extent} $stroke break
      set ww [expr {$::size + 1}]
      switch -glob -- $func \
      {
        h*    {}
        w*    { set width $x0 }
        l*    \
        {
          set XX0 [expr {round(($x + $x0) * $::size)}]
          set YY0 [expr {round(($y + $y0) * $::size)}]
          set XX1 [expr {round(($x + $x1) * $::size)}]
          set YY1 [expr {round(($y + $y1) * $::size)}]
          set xl [expr {$XX1 - $XX0}]
          set yl [expr {$YY1 - $YY0}]
          set len [expr {sqrt($xl * $xl + $yl * $yl) / $ww}]
          set dxl [expr {$xl / $len}]
          set dyl [expr {$yl / $len}]
          set ids [list]
          foreach {dx dy} $::deltas \
          {
            set DX [expr {$dx * $::size}]
            set DY [expr {$dy * $::size}]
            set X0 [expr {$XX0 + $DX}]
            set Y0 [expr {$YY0 + $DY}]
            set id [$w create line $X0 $Y0 $X0 $Y0 -width $ww -fill $color]
            lappend ids $id
            set a(X0:$id) $X0
            set a(Y0:$id) $Y0
            set a(X1:$id) $X0
            set a(Y1:$id) $Y0
          }
          $w raise img
          if {!$moved} { move $w img $X0 $Y0; set moved 1 }
          for {set l 0} {$l < $len} {incr l} \
          {
            foreach id $ids \
            {
              set a(X1:$id) [expr {$a(X1:$id) + $dxl}]
              set a(Y1:$id) [expr {$a(Y1:$id) + $dyl}]
              $w coords $id $a(X0:$id) $a(Y0:$id) $a(X1:$id) $a(Y1:$id)
            }
            set X0 [expr {$X0 + $dxl}]
            set Y0 [expr {$Y0 + $dyl}]
            $w coords img $X0 $Y0
            update; after $::delay
          }
          array unset a
        }
        c*    \
        {
          set XX0 [expr {round(($x + $x0) * $::size)}]
          set YY0 [expr {round(($y + $y0) * $::size)}]
          set XX1 [expr {round(($x + $x1) * $::size)}]
          set YY1 [expr {round(($y + $y1) * $::size)}]
          set aa [expr {abs($XX1 - $XX0) / 2.0}]
          set bb [expr {abs($YY1 - $YY0) / 2.0}]
          set xc [expr {$XX0 + $aa}]
          set yc [expr {$YY0 + $bb}]
          set ids [list]
          if {$extent < 0} { set start [expr {$start + $extent}]; set extent [expr {-$extent}] }
          while {$start < 0} { set start [expr {$start + 360}] }
          foreach {dx dy} $::deltas \
          {
            set DX [expr {$dx * $::size}]
            set DY [expr {$dy * $::size}]
            set X0 [expr {round($XX0 + $DX)}]
            set Y0 [expr {round($YY0 + $DY)}]
            set X1 [expr {round($XX1 + $DX)}]
            set Y1 [expr {round($YY1 + $DY)}]
            set id [$w create arc $X0 $Y0 $X1 $Y1 \
              -start $start -extent 0 -style arc -width $ww -outline $color]
            lappend ids $id
          }
          $w raise img
          if {!$moved} \
          {
            set ee [expr {$start * $pi / 180.0}]
            set X0 [expr {$xc + $aa * cos(-$ee)}]
            set Y0 [expr {$yc + $bb * sin(-$ee)}]
            move $w img $X0 $Y0
            set moved 1
          }
          for {set e 0} {$e < $extent} {set e [expr {$e + $ww}]} \
          {
            foreach id $ids \
            {
              $w itemconfig $id -extent $e
            }
            set ee [expr {($start + $e) * $pi / 180.0}]
            set X0 [expr {$xc + $aa * cos(-$ee)}]
            set Y0 [expr {$yc + $bb * sin(-$ee)}]
            $w coords img $X0 $Y0
            update; after $::delay
          }
          array unset a
        }
      }
    }
    return [list $width $X0 $Y0]
  }

  proc move {w tag x y} \
  {
    set delay [expr {$::delay / 4}]
    set xl [expr {($x - $::x0)}]
    set yl [expr {($y - $::y0)}]
    set len [expr {sqrt($xl * $xl + $yl * $yl) / $::size}]
    set dxl [expr {$xl / $len}]
    set dyl [expr {$yl / $len}]
    set  X0 $::x0
    set  Y0 $::y0
    for {set l 0} {$l < $len} {incr l} \
    {
      set X0 [expr {$X0 + $dxl}]
      set Y0 [expr {$Y0 + $dyl}]
      $w coords $tag $X0 $Y0
      update; after $delay
    }
  }

  proc write {w x y font text color} \
  {
    set ::x0 0
    set ::y0 0
    while {$text != ""} \
    {
      set char [string index $text 0]
      set text [string range $text 1 end]
      foreach {dx ::x0 ::y0} [draw $w $x $y [set ${font}($char)] $color] break
      incr x $dx
    }
  }

  # test
  package require Tk
  package require base64
  set size 2
  set delay 20
  set width 200
  set height 150
  set deltas {+1 -1 0 0 -1 +1}
  wm protocol . WM_DELETE_WINDOW exit
  set plume(1) \
  "
  R0lGODlhjAB/AP8AAAAymPz6+gAzoRJCoBU3lfvz7ffj2gEtlfjp5euzmPTU
  yBtEnOmge+GGaiU5kPba1BkzjPPQvzI1gyhTnu3x9Dg0eWQ5YvXBq+WZhEVn
  qkszadrj6yVJoGU0WOns8srV5OmplvLGuQ49iuOTeeXm6+ikjOu3p+3ArfG7
  q+KLdrG600I3gCcyhVcxXaq61SxVo4Wbxll2tNbb6UY1dcbM4jZZprnG2u69
  sOaropany92EZ0lyqKyJiIujydLi8HuUxPPMw+Tc5MPN21Q2cjljqGMtUdSU
  id2SdnSKujo0bwosi+jMw63D2FJvtJeWs3JJbFUzZTJBlcjR29mhlcN2d+7g
  1pSm0XBahd/QzM7FztmyqaFyg8FsaF+IvWqCuryIhKe2zB9RqMi4x7SFe6aI
  lC0yfcuGfHiRuE1SjXCNwKarx1REeIOSvW2MwChCj/K+tNV8dEVFhlV1rejY
  2Y1YZxgshUJcqkktZ1Jsrve1mr+OmU1stLTM4mR3rycsf4dkfMKRf9arsE9y
  saeXqcSbpqaNp2V8tKeavJ62yOzFtzwpbNu7t9qIdSVKnPKqkodwjJJ5ksmo
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oIKpUSF/EXImthxzAQEQEASq
  hySwQAeOsBmaNUh+4UNjA4QEIQdIMAAHkGyxhTpYwAEypIQE4Qk8gC9M0zQm
  aHVWeBCLoAELpAAFoAOxUgGP8oUEkQNI9AJg0TsEUGxqWBAbIC84oAA0YHlU
  4WxzWBA4YAAqkAdYgEH11YfoEgB8YIgewQAKgGGKoAgRjVAAjviICJEBCqB7
  lFgQGVAymQgRelQADtGJ01IAXieKEyESpogQH7IpqUgQFFAArNiKWXZYsngY
  CqB5sjhWtehKuNiKb7OLA5EBBuBlwJgBjZAEwCgQiQeMCFAAtLiLepSMsMBf
  k9iKNIGJqdh1pbiLbSeN81JCu5gBEzBUtbiMu/g2ogSNCZeMg4aNppgm0kiD
  sogAsbiL0MYVAQEAOw==
  "
  wm withdraw .
  image create photo img -data $plume(1)
  set bg #cc3300
  set cw [expr {round($width * $size)}]
  set ch [expr {round($height * $size)}]
  toplevel .t
  set sw [winfo screenwidth .t]
  set sh [winfo screenheight .t]
  set x [expr {($sw - $cw) / 2}]
  set y [expr {($sh - $ch) / 2}]
  wm geometry .t +$x+$y
  wm overrideredirect .t 1
  pack [canvas .t.c -width $cw -height $ch -bg $bg -highlightt 0]
  .t.c create image -200 -200 -anchor sw -image img -tags img
  focus -force .t
  focus -force .t.c
  raise .t
  write .t.c 20 10 ::font tcl #003399
  img blank
  .t.c move img 50 0
  img put $plume(2)
  after 2500 exit

Discussion

Kroc - 10 Oct 2005 : Très chouette, beau boulot Maurice !


Catégorie Exemple