Skip to content

Instantly share code, notes, and snippets.

@sidupadhyay
Created November 6, 2012 14:12

Revisions

  1. sidupadhyay created this gist Nov 6, 2012.
    13 changes: 13 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    PDF_save($this->pdf);
    PDF_setcolor($this->pdf, "both", "rgb", 0.0, 0.0, 0.0, 0.0);
    $sh = PDF_shading(
    this->pdf,
    "radial", $this->pdf->PAGE_WIDTH/2, $this->pdf->PAGE_HEIGHT/2,
    $this->pdf->PAGE_WIDTH/2, $this->pdf->PAGE_HEIGHT/2,
    1.0, 0.5, 0.5, 0.0,
    "r0 0 r1 500"
    );
    PDF_rect(this->pdf, 0, 0, $this->pdf->PAGE_WIDTH, $this->pdf->PAGE_HEIGHT);
    PDF_clip(this->pdf);
    PDF_shfill(this->pdf, $sh);
    PDF_restore(this->pdf);