Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Recent Chamber Activity

2023-04-16
2023-03-24
2023-03-22
2023-01-25

Recent Wiki Changes

2023-04-16
2023-03-24
2023-01-25
2023-01-08
2023-01-07

Wiki Guide

Side Bar

マウス操作に追従してマーカーを移動させたとき、枠外のマーカー描画が正しく行われない不具合の修正

現象

  • 下記のようなマウス操作に追従してマーカーが動くコードを動作させたとき、マウス操作でマーカーを枠外に移動させると枠外の部分だけ描画されなくなる。その後、ウィンドウを他のウィンドウで覆うなどして強制的に再描画させると正しく表示される。
    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]]
    }
    

bugfix_20141018.png

原因

BLT graphの内部処理が、マウス操作等のイベントが発生したときにプロットエリアのみを再描画するようになっていたため。

対処方法

-markerclippingarea graph を設定したときは、マウス操作等のイベントが発生したときの再描画範囲を全域に変更する。