| 393 | } |
| 394 | |
| 395 | bool Shape::polygon (Shape::polygon_type &p) const |
| 396 | { |
| 397 | if (m_type == Polygon) { |
| 398 | p = polygon (); |
| 399 | return true; |
| 400 | } else if (m_type == PolygonRef || m_type == PolygonPtrArrayMember) { |
| 401 | polygon_ref ().instantiate (p); |
| 402 | return true; |
| 403 | } else if (m_type == SimplePolygon) { |
| 404 | p.clear (); |
| 405 | const simple_polygon_type &sp = simple_polygon (); |
| 406 | p.assign_hull (sp.hull ()); |
| 407 | return true; |
| 408 | } else if (m_type == SimplePolygonRef || m_type == SimplePolygonPtrArrayMember) { |
| 409 | p.clear (); |
| 410 | const simple_polygon_ref_type &sp = simple_polygon_ref (); |
| 411 | p.assign_hull (sp.obj ().begin_hull (), sp.obj ().end_hull (), sp.trans (), false /*no additional compression*/); |
| 412 | return true; |
| 413 | } else if (m_type == Path) { |
| 414 | p = path ().polygon (); |
| 415 | return true; |
| 416 | } else if (m_type == PathRef || m_type == PathPtrArrayMember) { |
| 417 | p = path_ref ().obj ().polygon (); |
| 418 | p.transform (path_ref ().trans (), false /*no additional compression*/); |
| 419 | return true; |
| 420 | } else if (is_box ()) { |
| 421 | p = Shape::polygon_type (box ()); |
| 422 | return true; |
| 423 | } else { |
| 424 | return false; |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | bool Shape::simple_polygon (Shape::simple_polygon_type &p) const |
| 429 | { |
nothing calls this directly
no test coverage detected