setdrawcolor.htm 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5. <title>SetDrawColor</title>
  6. <link type="text/css" rel="stylesheet" href="../fpdf.css">
  7. </head>
  8. <body>
  9. <h1>SetDrawColor</h1>
  10. <code>SetDrawColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
  11. <h2>Description</h2>
  12. Defines the color used for all drawing operations (lines, rectangles and cell borders). It
  13. can be expressed in RGB components or gray scale. The method can be called before the first
  14. page is created and the value is retained from page to page.
  15. <h2>Parameters</h2>
  16. <dl class="param">
  17. <dt><code>r</code></dt>
  18. <dd>
  19. If <code>g</code> et <code>b</code> are given, red component; if not, indicates the gray level.
  20. Value between 0 and 255.
  21. </dd>
  22. <dt><code>g</code></dt>
  23. <dd>
  24. Green component (between 0 and 255).
  25. </dd>
  26. <dt><code>b</code></dt>
  27. <dd>
  28. Blue component (between 0 and 255).
  29. </dd>
  30. </dl>
  31. <h2>See also</h2>
  32. <a href="setfillcolor.htm">SetFillColor()</a>,
  33. <a href="settextcolor.htm">SetTextColor()</a>,
  34. <a href="line.htm">Line()</a>,
  35. <a href="rect.htm">Rect()</a>,
  36. <a href="cell.htm">Cell()</a>,
  37. <a href="multicell.htm">MultiCell()</a>.
  38. <hr style="margin-top:1.5em">
  39. <div style="text-align:center"><a href="index.htm">Index</a></div>
  40. </body>
  41. </html>