Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
グラフを描画するために GEF を使用して Eclipse プラグインを実行しています。FigureCanvas を使用してグラフを表示しています。キャンバスをスクロールしているときに、キャンバスがスクロールされた距離を取得する方法はありますか?
スクロールした Figure の座標を相対座標系に変換できます。これを試して:
org.eclipse.draw2d.geometry.Point p = new org.eclipse.draw2d.geometry.Point(e.x,e.y); root.translateToRelative(p);
次に、座標を参照するときに px と py を使用します