Chapter 9. Object Bounds Checking
In this chapter
Point-Array–Based Object Bounds
Arc Object Bounds
Employing Object Bounds
Next Steps
Every object of the Graphics Editor application has an associated size, position, width, and height. This chapter discusses methods of using the descriptive information available to the editor objects for determining whether an X ButtonPress
Event occurred within the bounds of the object. This test is necessary to support the function of selection on the objects, making them eligible for manipulation and insuring proper object control.
The list of objects created by the Graphics Editor includes LatexLine
, PolyLine
, Box
, Arrow
, Arc
, and Text
.
Calculating the bounds of an object is dependent on the geometric shape represented ...
Get X Window Programming from Scratch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.