home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!stanford.edu!ames!pasteur!sickdog.CS.Berkeley.EDU!jiangwu
- From: jiangwu@sickdog.CS.Berkeley.EDU (Jiang Wu)
- Subject: Bugs in Canvas Rect/Oval item
- Message-ID: <1992Jul30.211531.13971@pasteur.Berkeley.EDU>
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Nntp-Posting-Host: sickdog.cs.berkeley.edu
- Organization: University of California, Berkeley
- Date: Thu, 30 Jul 1992 21:15:31 GMT
- Lines: 41
-
-
- While developing an application using tk2.1, I found a bug in canvas
- rectangle/oval item. I have a rectangle item that is being moved around in
- the screen by dragging it with the mouse. I use canvas command "move tagOrId
- xAmount yAmount" to shift the rectangle around. Everything is fine until I
- do a "xview" or "yview" on the canvas to shift origin of the canvas to
- none (0, 0). Then, the rectangle does not redraw correctly after "move"
- command. I think this only happens to rectangle/oval items. Other canvas
- items behave correctly to the "move" command after "xview"/"yview" is
- applied to the canvas.
-
- Type in the following commands in wish to see this bug:
-
- wish: canvas .c -scrollincrement 1 -background white
- wish: place .c -in .
- wish:
- wish: .c addtag a withtag [.c create rectangle 0 0 20 20 -fill red]
- wish: .c addtag a withtag [.c create oval 0 30 20 50 -fill yellow]
- wish:
- wish: # Everything works when you do move here
- wish: .c move a 10 0
- wish: .c move 1 10 0
- wish: .c move 2 10 0
- wish:
- wish: # Now we do a xview on the canvas
- wish: .c xview 10
- wish:
- wish: # Then we do move, only half of the rectangle/oval are showing now
- wish: .c move a 20 0
- wish:
- wish: # Let's move the origin of the canvas back to (0, 0)
- wish: .c xview 0
- wish:
- wish: # Everything is o.k. again.
- wish: .c move a 30 10
-
-
- Comments?
-
- -- Jiang Wu
- jiangwu@postgres.berkeley.edu
-