Am 22.11.2008, 03:01 Uhr, schrieb Marcos Duarte <[EMAIL PROTECTED]>: > Just a small observation: created lines can't be rotated or scaled > using the gui tool unless I group the line.
You are right. This is something which I haven't thought about earlier. It does not work, because the current hit-testing is not exact enough. It considers lines as infinitely thin and so you can't select it (by a point). To solve this I'd have to write the image-based hit-testing tool I've talked about in an earlier mail. You can still make the gui mode rotate the object by specifying the exact = False parameter to the canvas.hitTest function. This will select objects based on their bounding box instead of considering the line infinitely thin. Using the bounding box is probably even more appropriate than the image-based approach, because trying to hit a 1-point thick line with the cursor would not be fun. Grouping makes the query code use the bounding box instead of the exact test, so that's why it works if you create a group first. In general the current GUI modes are more examples than really useful tools. To make them really useful, they'd need to have some kind of selection tool which you could use to select an objects (showing this by drawing a highlighted bounding box around it) and then you could manipulate the object further (e.g. through a gizmo control or something like the current rotate tool). All of this is rather application specific, so I left it out and made the GUI modes as simple as possible. If you want further control you'll write your own GUI mode. > FC2 does not have a 'Point' object for drawing, correct? (I went as > far as canvas.create( 'Point'... ) That's right. Use a 'Circle' object for this purpose (or define an adapter which adopts a Point model to a Circle model. -Matthias _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
