$person["SECONDARY_ROLE"] = $person["PRIMARY_ROLE"]; } if (!isset($person["SECONDARY_COLOR"]) || $person["SECONDARY_COLOR"] == "") { $person["SECONDARY_COLOR"] = $person["PRIMARY_COLOR"]; } /* present a uniform outline if the roles are the same */ if ($person["PRIMARY_ROLE"] == $person["SECONDARY_ROLE"]) { $rpoints[2] = $right_edge - $base_width * 11; $rpoints[4] = $right_edge - $base_width * 10; $rpoints[10] = $right_edge - 3 * $base_width; $rpoints[12] = $right_edge - 2 * $base_width; } /* don't display the outline if the person has no role */ if ($person["PRIMARY_ROLE"] != "Unknown") { $color = get_color($person["PRIMARY_COLOR"]); $pdf->setcolor($color[0], $color[1], $color[2]); $pdf->polygon($lpoints, 8, 1); $color = get_text_color($person["PRIMARY_COLOR"]); $pdf->setcolor($color[0], $color[1], $color[2]); $role1Width = $pdf->getTextWidth(12, $person["PRIMARY_ROLE"]); $pdf->addText($left_edge + $base_width / 2, $top_edge - 12, 12, $person["PRIMARY_ROLE"]); $color = get_color($person["SECONDARY_COLOR"]); $pdf->setcolor($color[0], $color[1], $color[2]); $pdf->polygon($rpoints, 8, 1); $color = get_text_color($person["SECONDARY_COLOR"]); $pdf->setcolor($color[0], $color[1], $color[2]); $role2Width = $pdf->getTextWidth(12, $person["SECONDARY_ROLE"]); $pdf->addText($right_edge - $base_width / 2 - $role2Width, $bottom_edge + 6, 12, $person["SECONDARY_ROLE"]); $pdf->setcolor(0, 0, 0); } }