
package require BLT
namespace import blt::*
graph .g -plotbackground black
pack .g
.g configure -markerclippingarea graph
.g axis configure x -title {X Axis} -min 0 -max 20
.g axis configure y -title {Y Axis} -min 0 -max 20
set txt [.g marker create text -outline red -text {Hoge} -coords {10 10} -font { {} 20 }]
bind .g <Motion> {
.g marker configure $txt -coords [concat [.g axis invtransform x %x] [.g axis invtransform y %y]]
}
BLT graphの内部処理が、マウス操作等のイベントが発生したときにプロットエリアのみを再描画するようになっていたため。
-markerclippingarea graph を設定したときは、マウス操作等のイベントが発生したときの再描画範囲を全域に変更する。
[PageInfo]
LastUpdate: 2014-10-18 10:08:47, ModifiedBy: mocchi_2012
[Permissions]
view:all, edit:admins, delete/config:admins