Zend_Pdf-Drawing.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <sect1 id="zend.pdf.drawing">
  2. <title>Tekenen</title>
  3. <sect2 id="zend.pdf.drawing.geometry">
  4. <title>Geometrie</title>
  5. <para>
  6. PDF gebruikt dezelfde geometrie als PostScript. Het begint van de beneden-linkse
  7. hoek van de pagina en is standaard afgemeten in points (1/72 van een duim).
  8. </para>
  9. <para>
  10. De grootte van een pagina kan worden verkregen van het pagina object:
  11. </para>
  12. <programlisting role="php"><![CDATA[
  13. $width = $pdfPage->getWidth();
  14. $height = $pdfPage->getHeight();]]>
  15. </programlisting>
  16. </sect2>
  17. <sect2 id="zend.pdf.drawing.color">
  18. <title>Kleur</title>
  19. <para>
  20. PDF heeft geweldig goede kleurweergavemogelijkheden. Zend_Pdf ondersteunt grijsschalen, RGB en CMYK
  21. kleuren. Elk van deze notaties kan worden gebruikt daar waar een <code>Zend_Pdf_Color</code> object
  22. nodig is. De <code>Zend_Pdf_Color_GrayScale</code>, <code>Zend_Pdf_Color_RGB</code> en
  23. <code>Zend_Pdf_Color_CMYK</code> klassen verstrekken deze functionaliteit:
  24. </para>
  25. <programlisting role="php"><![CDATA[
  26. // $grayLevel (float number). 0.0 (zwart) - 1.0 (wit)
  27. $color1 = new Zend_Pdf_Color_GrayScale($grayLevel);
  28. // $r, $g, $b (float numbers). 0.0 (minimum intensiteit) - 1.0 (maximum intensiteit)
  29. $color2 = new Zend_Pdf_Color_RGB($r, $g, $b);
  30. // $c, $m, $y, $k (float numbers). 0.0 (minimum intensiteit) - 1.0 (maximum intensiteit)
  31. $color3 = new Zend_Pdf_Color_CMYK($c, $m, $y, $k);]]>
  32. </programlisting>
  33. </sect2>
  34. <sect2 id="zend.pdf.drawing.shape-drawing">
  35. <title>Vormen tekenen</title>
  36. <para>
  37. Alle tekenoperaties kunnen worden uitgevoerd in de context van een PDF pagina.
  38. </para>
  39. <para>
  40. De <code>Zend_Pdf_Page</code> klasse verstrekt een set van teken methodes:
  41. </para>
  42. <programlisting role="php"><![CDATA[
  43. /**
  44. * Een lijn trekken van x1,y1 naar x2,y2.
  45. *
  46. * @param float $x1
  47. * @param float $y1
  48. * @param float $x2
  49. * @param float $y2
  50. */
  51. public function drawLine($x1, $y1, $x2, $y2);]]>
  52. </programlisting>
  53. <programlisting role="php"><![CDATA[
  54. /**
  55. * Teken een rechthoek.
  56. *
  57. * Vultypes:
  58. * Zend_Pdf_Const::SHAPEDRAW_FILLNSTROKE - vul rechthoek en streep door (standaard)
  59. * Zend_Pdf_Const::SHAPEDRAW_STROKE - streep rechthoek door
  60. * Zend_Pdf_Const::SHAPEDRAW_FILL - vul rechthoek op
  61. *
  62. * @param float $x1
  63. * @param float $y1
  64. * @param float $x2
  65. * @param float $y2
  66. * @param integer $fillType
  67. */
  68. public function drawRectangle($x1, $y1, $x2, $y2, $fillType = Zend_Pdf_Const::SHAPEDRAW_FILLNSTROKE);]]>
  69. </programlisting>
  70. <programlisting role="php"><![CDATA[
  71. /**
  72. * Een polygoon tekenen.
  73. *
  74. * Als $fillType een Zend_Pdf_Const::SHAPEDRAW_FILLNSTROKE of Zend_Pdf_Const::SHAPEDRAW_FILL is,
  75. * zal de polygoon automatisch gesloten zijn.
  76. * Zie een gedetailleerde beschrijving van deze methodes in een PDF documentatie
  77. * (sectie 4.4.2 Path painting Operators, Opvulling)
  78. *
  79. * @param array $x - array of float (de X coordinaten van de toppen)
  80. * @param array $y - array of float (de Y coordinaten van de toppen)
  81. * @param integer $fillType
  82. * @param integer $fillMethod
  83. */
  84. public function drawPolygon($x, $y,
  85. $fillType = Zend_Pdf_Const::SHAPEDRAW_FILLNSTROKE,
  86. $fillMethod = Zend_Pdf_Const::FILLMETHOD_NONZEROWINDING);]]>
  87. </programlisting>
  88. <programlisting role="php"><![CDATA[
  89. /**
  90. * Teken een cirkel gecentreerd op x, y met een radius van radius.
  91. *
  92. * Hoeken zijn aangeduid in radianten
  93. *
  94. * Method signatures:
  95. * drawCircle($x, $y, $radius);
  96. * drawCircle($x, $y, $radius, $fillType);
  97. * drawCircle($x, $y, $radius, $startAngle, $endAngle);
  98. * drawCircle($x, $y, $radius, $startAngle, $endAngle, $fillType);
  99. *
  100. *
  101. * Het is niet echt een cirkel want PDF ondersteunt alleen Bezier krommen.
  102. * Maar het komt er héél dichtbij.
  103. * Het verschilt maximaal 0.00026 radianten van een cirkel
  104. * (op PI/8, 3*PI/8, 5*PI/8, 7*PI/8, 9*PI/8, 11*PI/8, 13*PI/8 and 15*PI/8 hoeken).
  105. * Op 0, PI/4, PI/2, 3*PI/4, PI, 5*PI/4, 3*PI/2 en 7*PI/4 zijn het exacte tangenten van cirkels.
  106. *
  107. * @param float $x
  108. * @param float $y
  109. * @param float $radius
  110. * @param mixed $param4
  111. * @param mixed $param5
  112. * @param mixed $param6
  113. */
  114. public function drawCircle($x, $y, $radius, $param4 = null, $param5 = null, $param6 = null);]]>
  115. </programlisting>
  116. <programlisting role="php"><![CDATA[
  117. /**
  118. * Teken een ellips in een bepaalde rechthoek.
  119. *
  120. * Method signatures:
  121. * drawEllipse($x1, $y1, $x2, $y2);
  122. * drawEllipse($x1, $y1, $x2, $y2, $fillType);
  123. * drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle);
  124. * drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle, $fillType);
  125. *
  126. * Hoeken zijn aangeduid in radianten
  127. *
  128. * @param float $x1
  129. * @param float $y1
  130. * @param float $x2
  131. * @param float $y2
  132. * @param mixed $param5
  133. * @param mixed $param6
  134. * @param mixed $param7
  135. */
  136. public function drawEllipse($x1, $y1, $x2, $y2, $param5 = null, $param6 = null, $param7 = null);]]>
  137. </programlisting>
  138. </sect2>
  139. <sect2 id="zend.pdf.drawing.text-drawing">
  140. <title>Tekst schrijven</title>
  141. <para>
  142. Ook tekst wordt geschreven in de paginacontext:
  143. </para>
  144. <programlisting role="php"><![CDATA[
  145. /**
  146. * Teken een regel tekst op de bepaalde plaats.
  147. *
  148. * @param string $text
  149. * @param float $x
  150. * @param float $y
  151. * @throws Zend_Pdf_Exception
  152. */
  153. public function drawText($text, $x, $y );]]>
  154. </programlisting>
  155. <para>
  156. Het huidige lettertype en de lettertypegrootte worden gebruikt om tekst te schrijven. Zie de gedetailleerde beschrijving
  157. hieronder.
  158. </para>
  159. </sect2>
  160. <sect2 id="zend.pdf.drawing.using-fonts">
  161. <title>Lettertypes gebruiken</title>
  162. <para>
  163. De <code>Zend_Pdf_Page::drawText()</code> methode gebruikt het actieve lettertype die kan gezet worden door
  164. de <code>Zend_Pdf_Page::drawText()</code> methode:
  165. </para>
  166. <programlisting role="php"><![CDATA[
  167. /**
  168. * Actief lettertype zetten.
  169. *
  170. * @param Zend_Pdf_Font $font
  171. * @param float $fontSize
  172. */
  173. public function setFont(Zend_Pdf_Font $font, $fontSize);]]>
  174. </programlisting>
  175. <para>
  176. PDF ondersteunt Type1, TrueType, Type3 and composite lettertypes. Er zijn ook 14 standaard Type1 lettertypes
  177. voorzien in PDF. De Zend_Pdf module verstrekt op dit moment alleen de 14 standaard lettertypes. Die kunnen
  178. verkregen worden door de <code>Zend_Pdf_Font_Standard</code> klasse te gebruiken. Een bepaalde lettertype
  179. moet worden gebruikt als argument:
  180. </para>
  181. <example>
  182. <title>Een standaard lettertype maken</title>
  183. <programlisting role="php"><![CDATA[<?php
  184. ...
  185. // Een nieuw lettertype maken
  186. $font = new Zend_Pdf_Font_Standard(Zend_Pdf_Const::FONT_HELVETICA);
  187. // lettertype actief maken
  188. $pdfPage->setFont($font, 36);
  189. ...
  190. ?>]]>
  191. </programlisting>
  192. </example>
  193. <para>
  194. De <code>Zend_Pdf_Const</code> verstrekt constanten voor de 14 standaard lettertypes:
  195. <itemizedlist>
  196. <listitem>
  197. <para>Zend_Pdf_Const::FONT_TIMES_ROMAN</para>
  198. </listitem>
  199. <listitem>
  200. <para>Zend_Pdf_Const::FONT_TIMES_BOLD</para>
  201. </listitem>
  202. <listitem>
  203. <para>Zend_Pdf_Const::FONT_TIMES_ITALIC</para>
  204. </listitem>
  205. <listitem>
  206. <para>Zend_Pdf_Const::FONT_TIMES_BOLDITALIC</para>
  207. </listitem>
  208. <listitem>
  209. <para>Zend_Pdf_Const::FONT_HELVETICA</para>
  210. </listitem>
  211. <listitem>
  212. <para>Zend_Pdf_Const::FONT_HELVETICA_BOLD</para>
  213. </listitem>
  214. <listitem>
  215. <para>Zend_Pdf_Const::FONT_HELVETICA_ITALIC</para>
  216. </listitem>
  217. <listitem>
  218. <para>Zend_Pdf_Const::FONT_HELVETICA_BOLDITALIC</para>
  219. </listitem>
  220. <listitem>
  221. <para>Zend_Pdf_Const::FONT_COURIER</para>
  222. </listitem>
  223. <listitem>
  224. <para>Zend_Pdf_Const::FONT_COURIER_BOLD</para>
  225. </listitem>
  226. <listitem>
  227. <para>Zend_Pdf_Const::FONT_COURIER_ITALIC</para>
  228. </listitem>
  229. <listitem>
  230. <para>Zend_Pdf_Const::FONT_COURIER_BOLDITALIC</para>
  231. </listitem>
  232. <listitem>
  233. <para>Zend_Pdf_Const::FONT_SYMBOL</para>
  234. </listitem>
  235. <listitem>
  236. <para>Zend_Pdf_Const::FONT_ZAPFDINGBATS</para>
  237. </listitem>
  238. </itemizedlist>
  239. </para>
  240. </sect2>
  241. <sect2 id="zend.pdf.drawing.image-drawing">
  242. <title>Beelden tekenen</title>
  243. <para>
  244. De <code>Zend_Pdf_Page</code> klasse voorziet de <code>drawImage()</code> methode om beelden te tekenen:
  245. </para>
  246. <programlisting role="php"><![CDATA[
  247. /**
  248. * Teken een beeld op de bepaalde positie.
  249. *
  250. * @param Zend_Pdf_Image $image
  251. * @param float $x1
  252. * @param float $y1
  253. * @param float $x2
  254. * @param float $y2
  255. */
  256. public function drawImage(Zend_Pdf_Image $image, $x1, $y1, $x2, $y2);]]>
  257. </programlisting>
  258. <para>
  259. Beeldobjecten worden door afstammelingen van de <code>Zend_Pdf_Image</code> klasse voorgesteld.
  260. </para>
  261. <para>
  262. Alleen JPG beelden zijn momenteel ondersteund:
  263. </para>
  264. <example>
  265. <title>Beelden tekenen</title>
  266. <programlisting role="php"><![CDATA[<?php
  267. ...
  268. $image = new Zend_Pdf_Image_JPEG('my_image.jpg');
  269. $pdfPage->drawImage($image, 100, 100, 400, 300);;
  270. ...
  271. ?>]]>
  272. </programlisting>
  273. </example>
  274. <para>
  275. <emphasis>Belangrijk! De <code>Zend_Pdf_Image_JPEG</code> klasse heeft de PHP GD extensie nodig.</emphasis>
  276. </para>
  277. <para>
  278. Zie de PHP documentatie voor meer informatie
  279. (<ulink url="http://www.php.net/manual/nl/ref.image.php">http://www.php.net/manual/nl/ref.image.php</ulink>).
  280. </para>
  281. </sect2>
  282. <sect2 id="zend.pdf.drawing.line-drawing-style">
  283. <title>Lijnstijl tekenen</title>
  284. <para>
  285. De lijnstijl wordt gedefinieerd door lijndikte, lijnkleur en lijnstippenpatroon. Al deze parameters kunnen door de <code>Zend_Pdf_Page</code> klasse methodes worden aangegeven:
  286. </para>
  287. <programlisting role="php"><![CDATA[
  288. /** Zet lijnkleur. */
  289. public function setLineColor(Zend_Pdf_Color $color);
  290. /** Zet lijndikte. */
  291. public function setLineWidth(float $width);
  292. /**
  293. * Zet lijnstippenpatroon.
  294. *
  295. * Het patroon ($pattern) is een Array van floats: array(on_length, off_length, on_length, off_length, ...)
  296. * Fase ($phase) is shift vanaf het begin van de lijn.
  297. *
  298. * @param array $pattern
  299. * @param array $phase
  300. */
  301. public function setLineDashingPattern($pattern, $phase = 0);]]>
  302. </programlisting>
  303. </sect2>
  304. <sect2 id="zend.pdf.drawing.fill-style">
  305. <title>Vulstijl</title>
  306. <para>
  307. De <code>Zend_Pdf_Page::drawRectangle()</code>, <code>Zend_Pdf_Page::drawPoligon()</code>,
  308. <code>Zend_Pdf_Page::drawCircle()</code> en <code>Zend_Pdf_Page::drawEllipse()</code> methodes aanvaarden
  309. het optionele argument <code>$fillType</code>. Dit kan het volgende zijn:
  310. </para>
  311. <itemizedlist>
  312. <listitem>
  313. <para>Zend_Pdf_Const::SHAPEDRAW_STROKE - streep</para>
  314. </listitem>
  315. <listitem>
  316. <para>Zend_Pdf_Const::SHAPEDRAW_FILL - alleen opvullen</para>
  317. </listitem>
  318. <listitem>
  319. <para>Zend_Pdf_Const::SHAPEDRAW_FILLNSTROKE - opvullen en doorstrepen (standaard)</para>
  320. </listitem>
  321. </itemizedlist>
  322. <para>
  323. De <code>Zend_Pdf_Page::drawPoligon()</code> methode accepteert ook een optionele parameter
  324. <code>$fillMethod</code>:
  325. </para>
  326. <itemizedlist>
  327. <listitem>
  328. <para>Zend_Pdf_Const::FILLMETHOD_NONZEROWINDING (standaard)</para>
  329. <para>
  330. <citetitle>De PDF referentie</citetitle> beschrijft deze regel als volgt (originele tekst):
  331. <blockquote>
  332. <para>
  333. The nonzero winding number rule determines whether a given point is inside a
  334. path by conceptually drawing a ray from that point to infinity in any direction
  335. and then examining the places where a segment of the path crosses the ray. Starting
  336. with a count of 0, the rule adds 1 each time a path segment crosses the ray
  337. from left to right and subtracts 1 each time a segment crosses from right to left.
  338. After counting all the crossings, if the result is 0 then the point is outside the path;
  339. otherwise it is inside.
  340. </para>
  341. <para>
  342. Note: The method just described does not specify what to do if a path segment coincides
  343. with or is tangent to the chosen ray. Since the direction of the ray is arbitrary,
  344. the rule simply chooses a ray that does not encounter such problem intersections.
  345. For simple convex paths, the nonzero winding number rule defines the inside
  346. and outside as one would intuitively expect. The more interesting cases are those
  347. involving complex or self-intersecting paths like the ones shown in Figure 4.10
  348. (in a PDF Reference).
  349. </para>
  350. <para>
  351. For a path consisting of a five-pointed star, drawn with five connected straight
  352. line segments intersecting each other, the rule considers the inside to be the entire
  353. area enclosed by the star, including the pentagon in the center. For a path composed
  354. of two concentric circles, the areas enclosed by both circles are considered
  355. to be inside, provided that both are drawn in the same direction. If the circles are
  356. drawn in opposite directions, only the "doughnut" shape between them is inside,
  357. according to the rule; the "doughnut hole" is outside.
  358. </para>
  359. </blockquote>
  360. </para>
  361. </listitem>
  362. <listitem>
  363. <para>Zend_Pdf_Const::FILLMETHOD_EVENODD</para>
  364. <para>
  365. <citetitle>De PDF referentie</citetitle> beschrijft deze regel als volgt (originele tekst):
  366. <blockquote>
  367. <para>
  368. An alternative to the nonzero winding number rule is the even-odd rule. This rule
  369. determines the "insideness" of a point by drawing a ray from that point in any
  370. direction and simply counting the number of path segments that cross the ray,
  371. regardless of direction. If this number is odd, the point is inside; if even, the point
  372. is outside. This yields the same results as the nonzero winding number rule for
  373. paths with simple shapes, but produces different results for more complex
  374. shapes.
  375. Figure 4.11 (in a PDF Reference) shows the effects of applying the even-odd rule
  376. to complex paths. For the five-pointed star, the rule considers the triangular
  377. points to be inside the path, but not the pentagon in the center. For the two
  378. concentric circles, only the "doughnut" shape between the two circles is considered inside,
  379. regardless of the directions in which the circles are drawn.
  380. </para>
  381. </blockquote>
  382. </para>
  383. </listitem>
  384. </itemizedlist>
  385. </sect2>
  386. <sect2 id="zend.pdf.drawing.rotations">
  387. <title>Rotaties</title>
  388. <para>
  389. Een PDF pagina kan geroteerd worden zo lang er nog niets op werd geschreven of getekend.
  390. Het wordt gedaan door de <code>Zend_Pdf_Page::rotate()</code> methode:
  391. </para>
  392. <programlisting role="php"><![CDATA[
  393. /**
  394. * De pagina rond het punt ($x, $y) roteren met de aangeduide hoek (in radianten).
  395. *
  396. * @param float $angle
  397. */
  398. public function rotate($x, $y, $angle);]]>
  399. </programlisting>
  400. </sect2>
  401. <sect2 id="zend.pdf.drawing.save-restore">
  402. <title>Opslaan/herstellen van een grafische staat</title>
  403. <para>
  404. Op eender welk moment kan een grafische staat van een pagina (huidig lettertype, lettertype
  405. grootte, lijnkleur, vulkleur, lijnstijl, paginarotatie, clip area) worden opgeslagen
  406. en worden hersteld. De opsla-operatie slaat de data in een grafische staatstapel op,
  407. de hersteloperatie haalt ze er weer uit.
  408. </para>
  409. <para>
  410. Dit zijn de <code>Zend_Pdf_Page</code> klassemethodes om deze operaties uit te voeren:
  411. </para>
  412. <programlisting role="php"><![CDATA[
  413. /**
  414. * De grafische staat van deze pagina opslaan.
  415. * Dit neemt een "foto" van de huidige stijl, positie en clipping area en
  416. * enige aangebrachte rotatie/vertaling/schaling.
  417. */
  418. public function saveGS();
  419. /**
  420. * De laatst opgeslagen grafische staat herstellen.
  421. */
  422. public function restoreGS();]]>
  423. </programlisting>
  424. </sect2>
  425. <sect2 id="zend.pdf.drawing.clipping">
  426. <title>Clipping draw area</title>
  427. <para>
  428. PDF en de Zend_Pdf module ondersteunen clippen van een teken area.
  429. De actieve clip area begrenst de regios van de pagina die door tekenoperaties worden beïnvloed.
  430. Initieel is het de volledige pagina.
  431. </para>
  432. <para>
  433. De <code>Zend_Pdf_Page</code> klasse verstrekt een set methodes voor clipoperaties.
  434. </para>
  435. <programlisting role="php"><![CDATA[
  436. /**
  437. * Rechthoekig clippen.
  438. *
  439. * @param float $x1
  440. * @param float $y1
  441. * @param float $x2
  442. * @param float $y2
  443. */
  444. public function clipRectangle($x1, $y1, $x2, $y2);]]>
  445. </programlisting>
  446. <programlisting role="php"><![CDATA[
  447. /**
  448. * Polygoon clippen.
  449. *
  450. * @param array $x - array of float (the X co-ordinates of the vertices)
  451. * @param array $y - array of float (the Y co-ordinates of the vertices)
  452. * @param integer $fillMethod
  453. */
  454. public function clipPolygon($x, $y, $fillMethod = Zend_Pdf_Const::FILLMETHOD_NONZEROWINDING);]]>
  455. </programlisting>
  456. <programlisting role="php"><![CDATA[
  457. /**
  458. * Cirkel clippen.
  459. *
  460. * @param float $x
  461. * @param float $y
  462. * @param float $radius
  463. * @param float $startAngle
  464. * @param float $endAngle
  465. */
  466. public function clipCircle($x, $y, $radius, $startAngle = null, $endAngle = null);]]>
  467. </programlisting>
  468. <programlisting role="php"><![CDATA[
  469. /**
  470. * Ellips clippen.
  471. *
  472. * Method signatures:
  473. * drawEllipse($x1, $y1, $x2, $y2);
  474. * drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle);
  475. *
  476. * @todo process special cases with $x2-$x1 == 0 or $y2-$y1 == 0
  477. *
  478. * @param float $x1
  479. * @param float $y1
  480. * @param float $x2
  481. * @param float $y2
  482. * @param float $startAngle
  483. * @param float $endAngle
  484. */
  485. public function clipEllipse($x1, $y1, $x2, $y2, $startAngle = null, $endAngle = null);]]>
  486. </programlisting>
  487. </sect2>
  488. <sect2 id="zend.pdf.drawing.styles">
  489. <title>Stijlen</title>
  490. <para>
  491. De <code>Zend_Pdf_Style</code> klasse voorziet in stijlen
  492. </para>
  493. <para>
  494. Stijlen kunnen gebruikt worden om een set grafische parameters op te slaan en ze toe te brengen op een
  495. PDF pagina in één operatie:
  496. </para>
  497. <programlisting role="php"><![CDATA[
  498. /**
  499. * Zet de stijl voor de komende tekenoperaties voor deze pagina
  500. *
  501. * @param Zend_Pdf_Style $style
  502. */
  503. public function setStyle(Zend_Pdf_Style $style);
  504. /**
  505. * Geef de stijl terug en breng ze op de pagina aan.
  506. *
  507. * @return Zend_Pdf_Style|null
  508. */
  509. public function getStyle();]]>
  510. </programlisting>
  511. <para>
  512. De <code>Zend_Pdf_Style</code> klasse voorziet in een set methodes om verschillende grafische
  513. staat parameters te zetten of te verkrijgen:
  514. </para>
  515. <programlisting role="php"><![CDATA[
  516. /**
  517. * Zet de lijnkleur.
  518. *
  519. * @param Zend_Pdf_Color $color
  520. */
  521. public function setLineColor(Zend_Pdf_Color $color);]]>
  522. </programlisting>
  523. <programlisting role="php"><![CDATA[
  524. /**
  525. * verkrijg de lijnkleur.
  526. *
  527. * @return Zend_Pdf_Color|null
  528. */
  529. public function getLineColor();]]>
  530. </programlisting>
  531. <programlisting role="php"><![CDATA[
  532. /**
  533. * Zet de lijndikte.
  534. *
  535. * @param float $width
  536. */
  537. public function setLineWidth($width);]]>
  538. </programlisting>
  539. <programlisting role="php"><![CDATA[
  540. /**
  541. * Verkrijg de lijndikte.
  542. *
  543. * @return float
  544. */
  545. public function getLineWidth($width);]]>
  546. </programlisting>
  547. <programlisting role="php"><![CDATA[
  548. /**
  549. * Zet het lijnstippenpatroon
  550. *
  551. * @param array $pattern
  552. * @param float $phase
  553. */
  554. public function setLineDashingPattern($pattern, $phase = 0);]]>
  555. </programlisting>
  556. <programlisting role="php"><![CDATA[
  557. /**
  558. * Verkrijg het lijnstippenpatroon
  559. *
  560. * @return array
  561. */
  562. public function getLineDashingPattern();]]>
  563. </programlisting>
  564. <programlisting role="php"><![CDATA[
  565. /**
  566. * Verkrijg de lijnstippenfase
  567. *
  568. * @return float
  569. */
  570. public function getLineDashingPhase();]]>
  571. </programlisting>
  572. <programlisting role="php"><![CDATA[
  573. /**
  574. * Zet de vulkleur
  575. *
  576. * @param Zend_Pdf_Color $color
  577. */
  578. public function setFillColor(Zend_Pdf_Color $color);]]>
  579. </programlisting>
  580. <programlisting role="php"><![CDATA[
  581. /**
  582. * Verkrijg de vulkleur
  583. *
  584. * @return Zend_Pdf_Color|null
  585. */
  586. public function getFillColor();]]>
  587. </programlisting>
  588. <programlisting role="php"><![CDATA[
  589. /**
  590. * Zet actief lettertype
  591. *
  592. * @param Zend_Pdf_Font $font
  593. * @param float $fontSize
  594. */
  595. public function setFont(Zend_Pdf_Font $font, $fontSize);]]>
  596. </programlisting>
  597. <programlisting role="php"><![CDATA[
  598. /**
  599. * Wijzig huidige lettertype grootte
  600. *
  601. * @param float $fontSize
  602. */
  603. public function setFontSize($fontSize);]]>
  604. </programlisting>
  605. <programlisting role="php"><![CDATA[
  606. /**
  607. * Verkrijg huidig lettertype
  608. *
  609. * @return Zend_Pdf_Font $font
  610. */
  611. public function getFont();]]>
  612. </programlisting>
  613. <programlisting role="php"><![CDATA[
  614. /**
  615. * Verkrijg huidige lettertype grootte
  616. *
  617. * @return float $fontSize
  618. */
  619. public function getFontSize();]]>
  620. </programlisting>
  621. </sect2>
  622. </sect1>
  623. <!--
  624. vim:se ts=4 sw=4 et:
  625. -->