September 1998
Intermediate to advanced
970 pages
18h 42m
English
Before looking at the code for the Rubberband base class, let's briefly outline the steps involved in rubberbanding a shape on screen:
1. |
A mouse pressed event occurs in a Component equipped with a Rubberband.
|
2. |
The mouse is dragged inside of the Component where the mouse pressed event occurred.
|
3. |
A mouse released event occurs in the same Component.
|
Step one defines the anchor point for the rubberband. The anchor point remains constant throughout the remaining steps.
Step two involves dynamically updating the stretch point for the rubberband; the stretch point is kept in synch with the last mouse drag location.
Step three defines the end point for the rubberband. After a rubberbanding operation is complete, a rubberband ...
Read now
Unlock full access