127 lines
9.9 KiB
HTML
127 lines
9.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><style type="text/css">
|
|
<!--
|
|
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
|
|
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
|
|
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: underline; color: #FF0000}
|
|
A.no:link {font-family:inherit; font-size: inhreit;text-decoration: none; color: #000000}
|
|
A.no:visited {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
|
|
A.no:hover {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
|
|
th {font-family: helvetica, arial; color : black; font-size:90%; background : #b7c8b7; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
|
td {font-family: helvetica, arial; color : black; font-size:90%; background : white; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
|
|
|
//-->
|
|
</style></HEAD><hr><div style="padding-left:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;background-color:#deaa87;font-family:courier new;font-size:16pt;">Class <a class="no" name="_C_ICONIMAGE"><b>IconImage</b></a></div>
|
|
<i>(Defined in: jpgraph_gantt.php : 1482)</i><br> <br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" > <a href="IconImage.html" style="font-family:arial;font-weight:bold;color:darkblue;">IconImage</a> </td></tr><tr><td valign=top> <a href="IconImage.html#_ICONIMAGE_SETALIGN">SetAlign()</a> <br>
|
|
<a href="IconImage.html#_ICONIMAGE___CONSTRUCT">__construct()</a> <br>
|
|
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>Icon object to be used in a title for a Gantt plot object, e.g. bar or milestones.
|
|
<p>
|
|
The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example:
|
|
<code>
|
|
$icon = new IconImage(GICON_WARNING,0.7);
|
|
$titles = array($icon,'65 days','3 Aug','5 sep');
|
|
$bar = new GanttBar(0,$titles,$startdat,$enddate);
|
|
...
|
|
</code>
|
|
<p>
|
|
<b>Hint:</b> When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor() <p>
|
|
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_ICONIMAGE_SETALIGN"><span style="color:#555555;">IconImage ::</span><br><b>SetAlign</b>($aX, $aY)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Specify anchor point for icon</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB">$aX</span>
|
|
</span>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB"></span><span style="color: #DD0000">'left'</span><span style="color: #0000BB"></span>
|
|
</span>
|
|
</td><td>Horizontal anchor point</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB">$aY</span>
|
|
</span>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB"></span><span style="color: #DD0000">'center'</span><span style="color: #0000BB"></span>
|
|
</span>
|
|
</td><td>Vertical anchor point</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify where the anchor point for the icon should be. valid anchor points (for both hor and ver - directions) are:
|
|
<ul>
|
|
<li>"left"
|
|
<li>"center"
|
|
<li>"right"
|
|
</ul>
|
|
The anchor points determines what position on the icon shoudl be aligned with the specifed x,y position for the icon.
|
|
|
|
<br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
|
<span style="color: #0000BB">$icon </span><span style="color: #007700">= new </span><span style="color: #0000BB">IconImage</span><span style="color: #007700">(</span><span style="color: #DD0000">"../smiley.png"</span><span style="color: #007700">,</span><span style="color: #0000BB">0.7</span><span style="color: #007700">);
|
|
<br /></span><span style="color: #0000BB">$icon</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAlign</span><span style="color: #007700">(</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">);
|
|
<br /></span><span style="color: #0000BB"></span>
|
|
</span>
|
|
</b></div><br>
|
|
<p>
|
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_ICONIMAGE___CONSTRUCT"><span style="color:#555555;">IconImage ::</span><br><b>__construct</b>($aIcon, $aScale)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Create a new icon for use in Gantt title columns</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB">$aIcon</span>
|
|
</span>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Icon specification. Either an image file or one of the builtin icons</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB">$aScale</span>
|
|
</span>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
|
<span style="color: #0000BB">1</span>
|
|
</span>
|
|
</td><td>Scale of icon</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Create a new icon object to be used in a title for a Gantt plot object, e.g. bar or milestones.
|
|
<p>
|
|
An icon can either be created from an arbitrary image file (type is determined by the file extension) or it can also be one of the builtin icons. The builtin icons are:
|
|
<ul>
|
|
<li>GICON_WARNINGRED
|
|
<li>GICON_TEXT
|
|
<li>GICON_ENDCONS
|
|
<li>GICON_MAIL
|
|
<li>GICON_STARTCONS
|
|
<li>GICON_CALC
|
|
<li>GICON_MAGNIFIER
|
|
<li>GICON_LOCK
|
|
<li>GICON_STOP
|
|
<li>GICON_WARNINGYELLOW
|
|
<li>GICON_FOLDEROPEN
|
|
<li>GICON_FOLDER
|
|
<li>GICON_TEXTIMPORTANT
|
|
</ul>
|
|
<p>
|
|
A graphic illustration of the differenmt icons can be found in the manual.
|
|
<p>
|
|
The second argument specifies an optional scaling factor for the image/builtin icon.
|
|
<p>
|
|
The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example:
|
|
<code>
|
|
$icon = new IconImage(GICON_WARNING,0.7);
|
|
$titles = array($icon,'65 days','3 Aug','5 sep');
|
|
$bar = new GanttBar(0,$titles,$startdat,$enddate);
|
|
...
|
|
</code>
|
|
<p>
|
|
<b>Hint:</b> When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor() <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="GanttGraph.html#_GANTTGRAPH_SETVMARGINFACTOR">GanttGraph::SetVMarginFactor()</a></ul>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
|
<span style="color: #0000BB"></span><span style="color: #FF8000">// Creating an icon from an image file and scaling it to 70%
|
|
<br />// of original size
|
|
<br /></span><span style="color: #0000BB">$icon </span><span style="color: #007700">= new </span><span style="color: #0000BB">IconImage</span><span style="color: #007700">(</span><span style="color: #DD0000">"smiley.png"</span><span style="color: #007700">,</span><span style="color: #0000BB">0.7</span><span style="color: #007700">);
|
|
<br />
|
|
<br /></span><span style="color: #FF8000">// Using on of the bultin icons
|
|
<br /></span><span style="color: #0000BB">$icon </span><span style="color: #007700">= new </span><span style="color: #0000BB">IconImage</span><span style="color: #007700">(</span><span style="color: #0000BB">GICON_TEXT</span><span style="color: #007700">,</span><span style="color: #0000BB">0.8</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
|
</span>
|
|
</b></div><br>
|
|
<p> <hr> <p></html> |