Filling, framing, and hit testing work as described in Chapter 3 for all basic 2D graphics, including areas, without the need to write code for any of these operations. You need to write code to iterate through the TGArea geometries when you want to create your own filling, framing, or hit testing algorithms, or when you need to know which points of the geometries lie inside or outside of the area for some other purpose.
The information in TGArea is iterated for operations such as filling, framing, and hit testing because a device needs to know what portions of the geometries to draw, or whether a point in one of the geometries is also a point in the area. Figure 68 shows a TGArea that consists of a rectangle, ellipse, and a polygon. Although the complete data for all three geometries is known to TGArea, only the points that lie within the heavy outline are drawn. Any points that lie outside of the heavy outline are not drawn and would return False on a hit test.