28 require_once(
'tcpdf_include.php');
35 $pdf->SetAuthor(
'Nicola Asuni');
36 $pdf->SetTitle(
'TCPDF Example 030');
37 $pdf->SetSubject(
'TCPDF Tutorial');
38 $pdf->SetKeywords(
'TCPDF, PDF, example, test, guide');
62 if (@file_exists(dirname(__FILE__).
'/lang/eng.php')) {
63 require_once(dirname(__FILE__).
'/lang/eng.php');
64 $pdf->setLanguageArray(
$l);
70 $pdf->SetFont(
'helvetica',
'B', 20);
77 $pdf->Cell(0, 0,
'TCPDF Gradients', 0, 1,
'C', 0,
'', 0,
false,
'T',
'M');
94 $pdf->Text(20, 130,
'LinearGradient()');
97 $coords = array(0.5, 0.5, 1, 1, 1.2);
103 $pdf->Text(110, 130,
'RadialGradient()');
109 $pdf->Text(20, 240,
'CoonsPatchMesh()');
113 0.00,0.00, 0.33,0.20,
114 0.67,0.00, 1.00,0.00, 0.80,0.33,
115 0.80,0.67, 1.00,1.00, 0.67,0.80,
116 0.33,1.00, 0.00,1.00, 0.20,0.67,
122 $pdf->CoonsPatchMesh(110, 155, 80, 80,
$yellow,
$blue,
$green,
$red,
$coords,
$coords_min,
$coords_max);
125 $pdf->Text(110, 240,
'CoonsPatchMesh()');
133 0.00,0.00, 0.33,0.00,
134 0.67,0.00, 1.00,0.00, 1.00,0.33,
135 0.8,0.67, 1.00,1.00, 0.67,0.8,
136 0.33,1.80, 0.00,1.00, 0.00,0.67,
138 $patch_array[0][
'colors'][0] = array(
'r' => 255,
'g' => 255,
'b' => 0);
147 0.00,1.67, 0.00,2.00, 0.33,2.00,
148 0.67,2.00, 1.00,2.00, 1.00,1.67,
157 1.67,1.50, 2.00,1.00, 2.00,1.33,
158 2.00,1.67, 2.00,2.00, 1.67,2.00,
160 $patch_array[2][
'colors'][0] = array(
'r' => 0,
'g' => 255,
'b' => 255);
167 2.00,0.33, 2.00,0.00, 1.67,0.00,
168 1.33,0.00, 1.00,0.00, 1.00,0.33,
176 $pdf->CoonsPatchMesh(10, 45, 190, 200,
'',
'',
'',
'',
$patch_array,
$coords_min,
$coords_max);
179 $pdf->Text(10, 250,
'CoonsPatchMesh()');
184 $pdf->Output(
'example_030.pdf',
'D');
const PDF_MARGIN_BOTTOM
Bottom margin.
const PDF_MARGIN_LEFT
Left margin.
const PDF_MARGIN_HEADER
Header margin.
const PDF_HEADER_STRING
Header description string.
const PDF_FONT_SIZE_MAIN
Default main font size.
const PDF_FONT_SIZE_DATA
Default data font size.
const PDF_FONT_NAME_MAIN
Default main font name.
PHP class for generating PDF documents without requiring external extensions.
const PDF_HEADER_LOGO_WIDTH
Header logo image width in user units.
const PDF_HEADER_LOGO
Deafult image logo used be the default Header() method.
const PDF_UNIT
Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
const PDF_IMAGE_SCALE_RATIO
Ratio used to adjust the conversion of pixels to user units.
const PDF_PAGE_ORIENTATION
Page orientation (P=portrait, L=landscape).
const PDF_MARGIN_RIGHT
Right margin.
const PDF_HEADER_TITLE
Header title.
const PDF_FONT_NAME_DATA
Default data font name.
const PDF_CREATOR
Document creator.
const PDF_PAGE_FORMAT
Page format.
const PDF_FONT_MONOSPACED
Default monospaced font name.
const PDF_MARGIN_TOP
Top margin.
const PDF_MARGIN_FOOTER
Footer margin.