stackSequence

$canvaseditor stackSequence
returns list of lowlevel objects, ascending order
$canvaseditor stackSequence yes
returns list of canvas tags, ascending order

obj method canvaseditor stackSequence {{tagMode no}} {
  set result {}
  foreach item [$self canvas find all] {
    foreach tag [$self canvas gettags $item] {
      if {[regexp {(?:line|fill)(::.*)} $tag - obj]} then {
        if {$tagMode} then {
          lappend result $tag
        } else {
          lappend result $obj
        }
        break
      }
    }
  }
  set result
}

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