Lines Matching defs:writer

21 	private $writer;
23 public function __construct(Mpdf $mpdf, BaseWriter $writer)
26 $this->writer = $writer;
127 $this->writer->object();
128 $this->writer->write('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
131 $this->writer->write('/XObject <</FO' . $image_id . ' ' . $img_obj . ' 0 R >>');
138 $this->writer->write('/ExtGState <<');
142 $this->writer->write('/' . $extgstate['trans'] . ' ' . $extgstate['n'] . ' 0 R');
144 $this->writer->write('/GS' . $k . ' ' . $extgstate['n'] . ' 0 R');
148 $this->writer->write('>>');
153 $this->writer->write('/Shading <<');
156 $this->writer->write('/Sh' . $id . ' ' . $grad['id'] . ' 0 R');
159 $this->writer->write('>>');
163 $this->writer->write('/Font <<');
172 $this->writer->write('/F' . $font['subsetfontids'][$k] . ' ' . $font['n'][$k] . ' 0 R');
175 $this->writer->write('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
179 $this->writer->write('>>');
181 $this->writer->write('/XObject <</I' . $image_id . ' ' . $img_obj . ' 0 R >>');
184 $this->writer->write('>>');
185 $this->writer->write('endobj');
187 $this->writer->object();
189 $this->writer->write('<< /Type /Pattern /PatternType 1 /PaintType 1 /TilingType 2');
190 $this->writer->write('/Resources ' . ($this->mpdf->n - 1) . ' 0 R');
192 $this->writer->write(sprintf('/BBox [0 0 %.3F %.3F]', $orig_w, $orig_h));
195 $this->writer->write(sprintf('/XStep %.3F', $orig_w));
197 $this->writer->write(sprintf('/XStep %d', 99999));
201 $this->writer->write(sprintf('/YStep %.3F', $orig_h));
203 $this->writer->write(sprintf('/YStep %d', 99999));
207 $this->writer->write(sprintf('/Matrix [1 0 0 -1 %.3F %.3F]', $adj_x, $adj_y + $orig_h));
210 $this->writer->write(sprintf('/Matrix [1 0 0 1 %.3F %.3F]', $adj_x, $adj_y));
215 $this->writer->write('/Filter /FlateDecode');
218 $this->writer->write('/Length ' . strlen($s) . '>>');
219 $this->writer->stream($s);
220 $this->writer->write('endobj');
232 $this->writer->object();
233 $this->writer->write('<<');
234 $this->writer->write('/FunctionType 3');
235 $this->writer->write('/Domain [0 1]');
249 $this->writer->write('/Functions [' . implode(' ', $fn) . ']');
250 $this->writer->write('/Bounds [' . implode(' ', $bd) . ']');
251 $this->writer->write('/Encode [' . implode(' ', $en) . ']');
252 $this->writer->write('>>');
253 $this->writer->write('endobj');
258 $this->writer->object();
259 $this->writer->write('<<');
260 $this->writer->write('/FunctionType 2');
261 $this->writer->write('/Domain [0 1]');
262 $this->writer->write('/C0 [' . $grad['stops'][$i]['col'] . ']');
263 $this->writer->write('/C1 [' . $grad['stops'][$i + 1]['col'] . ']');
264 $this->writer->write('/N 1');
265 $this->writer->write('>>');
266 $this->writer->write('endobj');
274 $this->writer->object();
275 $this->writer->write('<<');
276 $this->writer->write('/FunctionType 3');
277 $this->writer->write('/Domain [0 1]');
291 $this->writer->write('/Functions [' . implode(' ', $fn) . ']');
292 $this->writer->write('/Bounds [' . implode(' ', $bd) . ']');
293 $this->writer->write('/Encode [' . implode(' ', $en) . ']');
294 $this->writer->write('>>');
295 $this->writer->write('endobj');
300 $this->writer->object();
301 $this->writer->write('<<');
302 $this->writer->write('/FunctionType 2');
303 $this->writer->write('/Domain [0 1]');
304 $this->writer->write(sprintf('/C0 [%.3F]', $grad['stops'][$i]['opacity']));
305 $this->writer->write(sprintf('/C1 [%.3F]', $grad['stops'][$i + 1]['opacity']));
306 $this->writer->write('/N 1');
307 $this->writer->write('>>');
308 $this->writer->write('endobj');
315 $this->writer->object();
316 $this->writer->write('<<');
317 $this->writer->write('/ShadingType ' . $grad['type']);
320 $this->writer->write('/ColorSpace /Device' . $grad['colorspace']); // Can use CMYK if all C0 and C1 above have 4 values
322 $this->writer->write('/ColorSpace /DeviceRGB');
326 $this->writer->write(sprintf('/Coords [%.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]));
327 $this->writer->write('/Function ' . $f1 . ' 0 R');
328 $this->writer->write('/Extend [' . $grad['extend'][0] . ' ' . $grad['extend'][1] . '] ');
329 $this->writer->write('>>');
337 $this->writer->write(sprintf('/Coords [%.3F %.3F %.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $ir, $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]));
338 $this->writer->write('/Function ' . $f1 . ' 0 R');
339 $this->writer->write('/Extend [' . $grad['extend'][0] . ' ' . $grad['extend'][1] . '] ');
340 $this->writer->write('>>');
342 $this->writer->write('/BitsPerCoordinate 16');
343 $this->writer->write('/BitsPerComponent 8');
345 $this->writer->write('/Decode[0 1 0 1 0 1 0 1 0 1 0 1]');
347 $this->writer->write('/Decode[0 1 0 1 0 1]');
349 $this->writer->write('/Decode[0 1 0 1 0 1 0 1 0 1]');
351 $this->writer->write('/BitsPerFlag 8');
352 $this->writer->write('/Length ' . strlen($grad['stream']));
353 $this->writer->write('>>');
354 $this->writer->stream($grad['stream']);
357 $this->writer->write('endobj');
363 $this->writer->object();
368 $this->writer->write($out);
378 $this->writer->object();
379 $this->writer->write('<<');
380 $this->writer->write('/ShadingType ' . $grad['type']);
381 $this->writer->write('/ColorSpace /DeviceGray');
384 $this->writer->write(sprintf('/Coords [%.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3]));
385 $this->writer->write('/Function ' . $f2 . ' 0 R');
386 $this->writer->write('/Extend [' . $grad['extend'][0] . ' ' . $grad['extend'][1] . '] ');
387 $this->writer->write('>>');
395 $this->writer->write(sprintf('/Coords [%.3F %.3F %.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $ir, $grad['coords'][2], $grad['coords'][3], $grad['coords'][4]));
396 $this->writer->write('/Function ' . $f2 . ' 0 R');
397 $this->writer->write('/Extend [' . $grad['extend'][0] . ' ' . $grad['extend'][1] . '] ');
398 $this->writer->write('>>');
400 $this->writer->write('/BitsPerCoordinate 16');
401 $this->writer->write('/BitsPerComponent 8');
402 $this->writer->write('/Decode[0 1 0 1 0 1]');
403 $this->writer->write('/BitsPerFlag 8');
404 $this->writer->write('/Length ' . strlen($grad['stream_trans']));
405 $this->writer->write('>>');
406 $this->writer->stream($grad['stream_trans']);
408 $this->writer->write('endobj');
412 $this->writer->object();
413 $this->writer->write('<< /Type /Pattern /PatternType 2');
414 $this->writer->write('/Shading ' . $this->mpdf->gradients[$transid]['id'] . ' 0 R');
415 $this->writer->write('>>');
416 $this->writer->write('endobj');
419 $this->writer->object();
426 $this->writer->write('<< /Type /XObject /Subtype /Form /FormType 1 ' . $filter);
427 $this->writer->write('/Length ' . strlen($p));
428 $this->writer->write('/BBox [-' . ($this->mpdf->wPt / 2) . ' -' . ($this->mpdf->hPt / 2) . ' ' . (2 * $this->mpdf->wPt) . ' ' . (2 * $this->mpdf->hPt) . ']');
429 $this->writer->write('/Group << /Type /Group /S /Transparency /CS /DeviceGray >>');
430 $this->writer->write('/Resources <<');
431 $this->writer->write('/ExtGState << /a0 << /ca 1 /CA 1 >> >>');
432 $this->writer->write('/Pattern << /p' . $transid . ' ' . $this->mpdf->gradients[$transid]['pattern'] . ' 0 R >>');
433 $this->writer->write('>>');
434 $this->writer->write('>>');
435 $this->writer->stream($p);
436 $this->writer->write('endobj');
437 $this->writer->object();
438 $this->writer->write('<< /Type /Mask /S /Luminosity /G ' . ($this->mpdf->n - 1) . ' 0 R >>' . "\n" . 'endobj');
439 $this->writer->object();
440 $this->writer->write('<< /Type /ExtGState /SMask ' . ($this->mpdf->n - 1) . ' 0 R /AIS false >>' . "\n" . 'endobj');