PageRenderTime 32ms CodeModel.GetById 10ms RepoModel.GetById 1ms app.codeStats 0ms

/jpgraph/docs/chunkhtml/ch14s16.html

https://gitlab.com/GLORIA04/conception-site-web
HTML | 95 lines | 90 code | 5 blank | 0 comment | 0 complexity | 178bc16baf8ff2d9605a1e33d49a5bce MD5 | raw file
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Using background gradients</title><link rel="stylesheet" type="text/css" href="manual.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.0"><link rel="home" href="index.html" title="JpGraph Manual"><link rel="up" href="ch14.html" title="Chapter 14. Common features for all Cartesian (x,y) graph types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using background gradients</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center">Chapter 14. Common features for all Cartesian (x,y) graph types</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="sect1" title="Using background gradients"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2552733"></a>Using background gradients</h2></div></div></div>
  2. <p>A color gradient background will change the color from a start color to a finish
  3. color in even steps (the number of steps depends on the size of the graph). The
  4. direction of the gradient is controlled by specifying a style parameter for the
  5. gradient. The signature for the gradient background method is</p>
  6. <p>
  7. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
  8. <p><code class="code">Graph::SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2,$aStyle=BGRAD_FRAME)</code></p>
  9. </li></ol></div><p>
  10. </p>
  11. <p>The last style par mater specified where in the graph the gradient style should be
  12. applied and the different options are</p>
  13. <p>
  14. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  15. <p><code class="code">BGRAD_FRAME</code>, The entire graph frame will be filled
  16. </p>
  17. </li><li class="listitem">
  18. <p><code class="code">BGRAD_MARGIN</code>, Only the margin area (the graph area
  19. outside the plot area) will be filled</p>
  20. </li><li class="listitem">
  21. <p><code class="code">GRAD_PLOT</code>, Only the plot area will be filled</p>
  22. </li></ul></div><p>
  23. </p>
  24. <p>This is illustrated in <a class="xref" href="ch14s16.html#fig.different-gradient-fill-types" title="Figure 14.93. What area of the graph the gradient should affect">Figure 14.93. What area of the graph the gradient should affect</a></p>
  25. <p>
  26. </p><div class="figure"><a name="fig.different-gradient-fill-types"></a><p class="title"><b>Figure 14.93. What area of the graph the gradient should affect</b></p><div class="figure-contents">
  27. <div class="informaltable">
  28. <table border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody><tr><td align="center">
  29. <p><span class="inlinemediaobject"><img src="images/grad_bgrad_frame.png" alt="What area of the graph the gradient should affect"></span></p>
  30. <p><code class="code">BGRAD_FRAME</code></p>
  31. </td><td align="center">
  32. <p><span class="inlinemediaobject"><img src="images/grad_bgrad_margin.png" alt="What area of the graph the gradient should affect"></span></p>
  33. <p><code class="code">BGRAD_MARGIN</code></p>
  34. </td><td align="center">
  35. <p><span class="inlinemediaobject"><img src="images/grad_bgrad_plot.png" alt="What area of the graph the gradient should affect"></span></p>
  36. <p><code class="code">BGRAD_PLOT</code></p>
  37. </td></tr></tbody></table>
  38. </div>
  39. </div></div><p><br class="figure-break">
  40. </p>
  41. <p>The different types of gradient fills are shown in <a class="xref" href="ch14s16.html#fig.different-gradient-types" title="Figure 14.94. Different types of gradient fills">Figure 14.94. Different types of gradient fills</a> where the gradient from color is
  42. "<code class="code">white</code>" and the to color is "<code class="code">orange</code>"</p>
  43. <p>
  44. </p><div class="figure"><a name="fig.different-gradient-types"></a><p class="title"><b>Figure 14.94. Different types of gradient fills</b></p><div class="figure-contents">
  45. <div class="informaltable">
  46. <table border="0"><colgroup><col class="c1"><col class="c2"></colgroup><tbody><tr><td>
  47. <p><span class="inlinemediaobject"><img src="images/grad_vert.png" alt="Different types of gradient fills"></span></p>
  48. </td><td>
  49. <p><span class="inlinemediaobject"><img src="images/grad_hor.png" alt="Different types of gradient fills"></span></p>
  50. </td></tr><tr><td>
  51. <p><span class="inlinemediaobject"><img src="images/grad_midhor.png" alt="Different types of gradient fills"></span></p>
  52. </td><td>
  53. <p><span class="inlinemediaobject"><img src="images/grad_midver.png" alt="Different types of gradient fills"></span></p>
  54. </td></tr><tr><td>
  55. <p><span class="inlinemediaobject"><img src="images/grad_wide_midhor.png" alt="Different types of gradient fills"></span></p>
  56. </td><td>
  57. <p><span class="inlinemediaobject"><img src="images/grad_wide_midver.png" alt="Different types of gradient fills"></span></p>
  58. </td></tr><tr><td>
  59. <p><span class="inlinemediaobject"><img src="images/grad_left_reflection.png" alt="Different types of gradient fills"></span></p>
  60. </td><td>
  61. <p><span class="inlinemediaobject"><img src="images/grad_right_reflection.png" alt="Different types of gradient fills"></span></p>
  62. </td></tr><tr><td>
  63. <p><span class="inlinemediaobject"><img src="images/grad_center.png" alt="Different types of gradient fills"></span></p>
  64. </td><td>
  65. <p><span class="inlinemediaobject"><img src="images/grad_raised_panel.png" alt="Different types of gradient fills"></span></p>
  66. </td></tr><tr><td>
  67. <p><span class="inlinemediaobject"><img src="images/grad_diagonal.png" alt="Different types of gradient fills"></span></p>
  68. </td><td> </td></tr></tbody></table>
  69. </div>
  70. </div></div><p><br class="figure-break">
  71. </p>
  72. <div class="sect2" title="Generating gradient background off-line"><div class="titlepage"><div><div><h3 class="title"><a name="id2553714"></a>Generating gradient background off-line</h3></div></div></div>
  73. <p>A drawback of using gradient backgrounds is that they are processing intensive
  74. and since they are generated each time the graph is generated it can take
  75. substantive amount of time for large graphs. To help with this the library
  76. offers a small (very simple) utility that can be tun to create gradient images
  77. off line. These images can later on be used as (static) background images. In
  78. the distribution there is a small utility in the
  79. "<code class="filename">Examples/</code>" directory called
  80. "<code class="filename">mkgrad.php</code>". Pointing the browser to this script will
  81. show a basic form as shown in <a class="xref" href="ch14s16.html#fig.mkgrad" title='Figure 14.95. The "mkgrad" utiliy to create gradient images'>Figure 14.95. The "mkgrad" utiliy to create gradient images</a>. The script will
  82. allow the creation of a gradient images using any of the predefined colors and
  83. gradient types.</p>
  84. <p>
  85. </p><div class="figure"><a name="fig.mkgrad"></a><p class="title"><b>Figure 14.95. The "mkgrad" utiliy to create gradient images</b></p><div class="figure-contents">
  86. <div class="mediaobject"><img src="images/mkgrad.png" alt='The "mkgrad" utiliy to create gradient images'></div>
  87. </div></div><p><br class="figure-break">
  88. </p>
  89. </div>
  90. </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"><a accesskey="u" href="ch14.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>