07 Oct 2004 09:04:23 UTC
- Distribution: Draft
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (6 / 0 / 0)
- KwaliteeBus factor: 0
- 61.92% Coverage
- License: unknown
- Activity24 month
- Download (27.4KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBPOSTLE Bruno Postle
Draft::TkGui - Display a Draft world
Opens a Tk GUI window, displays a drawing and allows some user interaction.
This module knows a little bit about Draft drawings and displays them on screen using TK::WorldCanvas which takes care of all the drawing, panning etc..
Create a Draft::TkGui object like so:
my $canvas = Draft::TkGui->new;
This should show a window and display the drawing, some interaction is possible:
Use the 'i' and 'o' keys to zoom in and out.
Use the left mouse button to drag items around the screen.
Use the middle mouse button to pan around the viewport.
You can redraw the canvas window like so:
This scans all drawing elements and updates the display with any changes. No files are accessed unnecessarily, so feel free to call this method as often as you like; by default this method is called whenever a mouse pointer enters the canvas area.