function footer($p, $text) { $psfont = PS_findfont($p, "Helvetica", "", 0); PS_setfont($p, $psfont, 8.0); $buffer = sprintf("This file has been created with pslib %s", PS_get_parameter($p, "dottedversion", 0.0)); PS_show_xy($p, $buffer, LEFT_BORDER, 25); }
function colorline($ps, $leftborder, $spot) { for ($i = 1; $i <= 10; $i++) { PS_setcolor($ps, "fill", "spot", $spot["id"], $i * 0.1, 0.0, 0.0); PS_rect($ps, $leftborder, 35 + $i * 65, 50, 50); PS_fill($ps); } PS_setcolor($ps, "stroke", "gray", 0.0, 0.0, 0.0, 0.0); $psfont = PS_findfont($ps, "Helvetica", "", 0); PS_setfont($ps, $psfont, 7.0); PS_show_xy($ps, $spot["name"], $leftborder, 100 + 10 * 65 + 13); if (!strcmp($spot["colorspace"], "cmyk")) { $buffer = sprintf("%.2f, %.2f, %.2f, %.2f", $spot["c1"], $spot["c2"], $spot["c3"], $spot["c4"]); PS_show_xy($ps, $buffer, $leftborder, 100 + 10 * 65 + 3); } else { if (!strcmp($spot["colorspace"], "rgb")) { $buffer = sprintf("%.2f, %.2f, %.2f", $spot["c1"], $spot["c2"], $spot["c3"]); PS_show_xy($ps, $buffer, $leftborder, 100 + 10 * 65 + 3); } } }