show

$dot show yes, $dot show
displays small circle around coordinates
$dot show no
removes circle
$dot show -fill fillcol -outline linecol …
displays small circle with different colors etc.

obj method dot show {{yesNo yes} args} {
  lassign [$self xy false] x y
  if {[string is true -strict $yesNo]} then {
    $self canvas delete dot$self
    $self canvas create oval [- $x 5] [- $y 5] [+ $x 5] [+ $y 5]\
      -width 2 -fill yellow -stipple gray25 -outline navy -tags "dot dot$self"
  } elseif {[string is false -strict $yesNo]} then {
    $self canvas delete dot$self
  } else {
    $self canvas create oval\
      [- $x 5] [- $y 5] [+ $x 5] [+ $y 5]\
      -width 2 -fill white -outline blue -tags dot {*}$args
  }
}

© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z