storeXY

Stores current coordinates for later use of transform.

$dot storeXY info
returns current stored daa
$dot storeXY
stores current coordinates in private baseX, baseY
$dot storeXY x y
stores arguments x, y in private baseX, baseY

obj method dot storeXY {{x ""} {y ""}} {
  if {[regexp {^[[:alpha:]]+$} $x]} then {
    list [my baseX] [my baseY]
  } else {
    if {[string is double -strict $x]} then {
      my baseX $x
    } else {
      my baseX [$self cget -x]
    }
    if {[string is double -strict $y]} then {
      my baseY $y
    } else {
      my baseY [$self cget -y]
    }
  }
}

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