Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Xác định các khu vực bên trong của đa giác tiêu chuẩn nói chung là một quá trình đơn giản. Tuy nhiên, trong hầu hết các ứng dụng đồ họa, chúng ta có thể chỉ định bất kỳ trình tự cho các đỉnh của một khu vực điền vào, bao gồm cả chuỗi sản xuất intersectf các cạnh, | Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com To illustrate the use of labeling we create structure labeledGizmo in the Section 7-2 following routine that has the elements and position numbers as shown in Fig. 7-5. Editing Structures openstructure labeledGizmo label objectlLinetype setLinetype Itl label objectlColor setPolylineColourlndex del label objectl polyline nl ptsl label object2Linetype setLinetype lt2 label object2Color setPolylineColourlndex lc2 label object2 polyline n2 pts2 closestructure Now if we want to change any of the primitives or attributes in this structure we can do it by referencing the labels. Although we have labeled every item in this structure other labeling schemes could be used depending on what type and how much editing is anticipated. For example all attributes could be lumped under one label or all color attributes could be given the same label identifier. A label is referenced with the function setElementPointerAtLabel k which sets the element pointer to the value of parameter k. The search for the label begins at the current element-pointer position and proceeds forward through the element list. This means that we may have to reset the pointer when reopening a structure since the pointer is always positioned at the last element in a reopened structure and label searching is not done backward through the element list. If for instance we want to change the color of the second object in structure label edGi zmo we could reposition the pointer at the start of the element list after reopening the structure to search for the appropriate color attributestatement label 0 labeledGizmo structure 1 label objectlLinetype __ 2 setLinetype It 3 label objectlColor 4 setPolylineColourlndex lei 5 label objectl 6 polyline nl ptsl 7 label objectsLinetype 8 setLinetype lt2 __ 9 label object2Color 10 setPolylineColourIndex lc2 11 label objects nninl 12 polyline n2 Pts2 figure 7 5 A set of labeled objects .