123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta name="author" content="Emanuel Eichhammer" />
- <meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
- <title>QCPLineEnding Class Reference</title>
- <link href="qt.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top">
- <a class="headerLink" href="index.html">Main Page</a> ·
- <a class="headerLink" href="classoverview.html">Class Overview</a> ·
- <a class="headerLink" href="hierarchy.html">Hierarchy</a> ·
- <a class="headerLink" href="annotated.html">All Classes</a> ·
- <a class="headerLink" href="pages.html">Special Pages</a>
- <!-- Generated by Doxygen 1.8.6 -->
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-types">Public Types</a> |
- <a href="#pub-methods">Public Functions</a> </div>
- <div class="headertitle">
- <div class="title">QCPLineEnding Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Handles the different ending decorations for line-like items.
- <a href="classQCPLineEnding.html#details">More...</a></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
- Public Types</h2></td></tr>
- <tr class="memitem:a5ef16e6876b4b74959c7261d8d4c2cd5"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">EndingStyle</a> </td></tr>
- <tr class="separator:a5ef16e6876b4b74959c7261d8d4c2cd5"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Functions</h2></td></tr>
- <tr class="memitem:af2eaf8123b000d97fbd11929c669f61b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#af2eaf8123b000d97fbd11929c669f61b">QCPLineEnding</a> ()</td></tr>
- <tr class="separator:af2eaf8123b000d97fbd11929c669f61b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abb2abc7542f0c7a3c081d878248896a4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#abb2abc7542f0c7a3c081d878248896a4">QCPLineEnding</a> (<a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">EndingStyle</a> style, double width=8, double length=10, bool inverted=false)</td></tr>
- <tr class="separator:abb2abc7542f0c7a3c081d878248896a4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aea324dbfddbca9895ca8a3a968671299"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea324dbfddbca9895ca8a3a968671299"></a>
- <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">EndingStyle</a> </td><td class="memItemRight" valign="bottom"><b>style</b> () const </td></tr>
- <tr class="separator:aea324dbfddbca9895ca8a3a968671299"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a028328ee3fb139a40acaf65fb56edf67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a028328ee3fb139a40acaf65fb56edf67"></a>
- double </td><td class="memItemRight" valign="bottom"><b>width</b> () const </td></tr>
- <tr class="separator:a028328ee3fb139a40acaf65fb56edf67"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1744315d7b73f6e7ead3621e2cb18c28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1744315d7b73f6e7ead3621e2cb18c28"></a>
- double </td><td class="memItemRight" valign="bottom"><b>length</b> () const </td></tr>
- <tr class="separator:a1744315d7b73f6e7ead3621e2cb18c28"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa4ffbb182cbc89fc3d92eb348630502c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4ffbb182cbc89fc3d92eb348630502c"></a>
- bool </td><td class="memItemRight" valign="bottom"><b>inverted</b> () const </td></tr>
- <tr class="separator:aa4ffbb182cbc89fc3d92eb348630502c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a56953b9cb8ed1bed0f025c3935f16910"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a56953b9cb8ed1bed0f025c3935f16910">setStyle</a> (<a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">EndingStyle</a> style)</td></tr>
- <tr class="separator:a56953b9cb8ed1bed0f025c3935f16910"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a26dc020ea985a72cc25881ce2115e34e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a26dc020ea985a72cc25881ce2115e34e">setWidth</a> (double width)</td></tr>
- <tr class="separator:a26dc020ea985a72cc25881ce2115e34e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae36fa01763751cd64b7f56c3507e935a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a> (double length)</td></tr>
- <tr class="separator:ae36fa01763751cd64b7f56c3507e935a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a580e4e2360b35ebb8d68f3494aa2335d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a580e4e2360b35ebb8d68f3494aa2335d">setInverted</a> (bool inverted)</td></tr>
- <tr class="separator:a580e4e2360b35ebb8d68f3494aa2335d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a586b45cf738881a70119e353dc1ed59c"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a586b45cf738881a70119e353dc1ed59c">boundingDistance</a> () const </td></tr>
- <tr class="separator:a586b45cf738881a70119e353dc1ed59c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6a528e6dc5aabe1077a573b045715f03"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a6a528e6dc5aabe1077a573b045715f03">realLength</a> () const </td></tr>
- <tr class="separator:a6a528e6dc5aabe1077a573b045715f03"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac4b2fa94bd27b2f008b5fc090fcd7c0b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#ac4b2fa94bd27b2f008b5fc090fcd7c0b">draw</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter, const QVector2D &pos, const QVector2D &dir) const </td></tr>
- <tr class="separator:ac4b2fa94bd27b2f008b5fc090fcd7c0b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a05c143b1f66cb68d746c309523c45e3e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLineEnding.html#a05c143b1f66cb68d746c309523c45e3e">draw</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter, const QVector2D &pos, double angle) const </td></tr>
- <tr class="separator:a05c143b1f66cb68d746c309523c45e3e"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Handles the different ending decorations for line-like items. </p>
- <div class="image">
- <img src="QCPLineEnding.png" alt="QCPLineEnding.png"/>
- <div class="caption">
- The various ending styles currently supported</div></div>
- <p> For every ending a line-like item has, an instance of this class exists. For example, <a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a> has two endings which can be set with <a class="el" href="classQCPItemLine.html#aebf3d687114d584e0459db6759e2c3c3">QCPItemLine::setHead</a> and <a class="el" href="classQCPItemLine.html#ac264222c3297a7efe33df9345c811a5f">QCPItemLine::setTail</a>.</p>
- <p>The styles themselves are defined via the enum <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">QCPLineEnding::EndingStyle</a>. Most decorations can be modified regarding width and length, see <a class="el" href="classQCPLineEnding.html#a26dc020ea985a72cc25881ce2115e34e">setWidth</a> and <a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a>. The direction of the ending decoration (e.g. direction an arrow is pointing) is controlled by the line-like item. For example, when both endings of a <a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a> are set to be arrows, they will point to opposite directions, e.g. "outward". This can be changed by <a class="el" href="classQCPLineEnding.html#a580e4e2360b35ebb8d68f3494aa2335d">setInverted</a>, which would make the respective arrow point inward.</p>
- <p>Note that due to the overloaded <a class="el" href="classQCPLineEnding.html" title="Handles the different ending decorations for line-like items. ">QCPLineEnding</a> constructor, you may directly specify a <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">QCPLineEnding::EndingStyle</a> where actually a <a class="el" href="classQCPLineEnding.html" title="Handles the different ending decorations for line-like items. ">QCPLineEnding</a> is expected, e.g. </p>
- <div class="fragment"><div class="line"> myItemLine->setHead(<a class="code" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5ab9964d0d03f812d1e79de15edbeb2cbf">QCPLineEnding::esSpikeArrow</a>);</div>
- </div><!-- fragment --></div><h2 class="groupheader">Member Enumeration Documentation</h2>
- <a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">QCPLineEnding::EndingStyle</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Defines the type of ending decoration for line-like items, e.g. an arrow.</p>
- <div class="image">
- <img src="QCPLineEnding.png" alt="QCPLineEnding.png"/>
- </div>
- <p>The width and length of these decorations can be controlled with the functions <a class="el" href="classQCPLineEnding.html#a26dc020ea985a72cc25881ce2115e34e">setWidth</a> and <a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a>. Some decorations like <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5ae5a3414916817258bcc6dddd605e8f5c">esDisc</a>, <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5ae1836502fa43d8990bb62b2d493a140a">esSquare</a>, <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5a378fe5a8b768411b0bc1765210fe7200">esDiamond</a> and <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5a2cf543bbca332df26d89bf779f50469f">esBar</a> only support a width, the length property is ignored.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemLine.html#aebf3d687114d584e0459db6759e2c3c3">QCPItemLine::setHead</a>, <a class="el" href="classQCPItemLine.html#ac264222c3297a7efe33df9345c811a5f">QCPItemLine::setTail</a>, <a class="el" href="classQCPItemCurve.html#a08a30d9cdd63995deea3d9e20430676f">QCPItemCurve::setHead</a>, <a class="el" href="classQCPItemCurve.html#ac3488d8b1a6489c845dc5bff3ef71124">QCPItemCurve::setTail</a>, <a class="el" href="classQCPAxis.html#a08af1c72db9ae4dc8cb8a973d44405ab">QCPAxis::setLowerEnding</a>, <a class="el" href="classQCPAxis.html#a69119b892fc306f651763596685aa377">QCPAxis::setUpperEnding</a> </dd></dl>
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5aca12d500f50cd6871766801bac30fb03"></a>esNone</em> </td><td class="fielddoc">
- <p>No ending decoration. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a3d7dcea2f100671727c3417142154f8f"></a>esFlatArrow</em> </td><td class="fielddoc">
- <p>A filled arrow head with a straight/flat back (a triangle) </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5ab9964d0d03f812d1e79de15edbeb2cbf"></a>esSpikeArrow</em> </td><td class="fielddoc">
- <p>A filled arrow head with an indented back. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a61f78ee8f375fb21cb9d250687bbcbd2"></a>esLineArrow</em> </td><td class="fielddoc">
- <p>A non-filled arrow head with open back. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5ae5a3414916817258bcc6dddd605e8f5c"></a>esDisc</em> </td><td class="fielddoc">
- <p>A filled circle. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5ae1836502fa43d8990bb62b2d493a140a"></a>esSquare</em> </td><td class="fielddoc">
- <p>A filled square. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a378fe5a8b768411b0bc1765210fe7200"></a>esDiamond</em> </td><td class="fielddoc">
- <p>A filled diamond (45° rotated square) </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a2cf543bbca332df26d89bf779f50469f"></a>esBar</em> </td><td class="fielddoc">
- <p>A bar perpendicular to the line. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a126c390f0c359fcd8df1fc5e38d26d5b"></a>esHalfBar</em> </td><td class="fielddoc">
- <p>A bar perpendicular to the line, pointing out to only one side (to which side can be changed with <a class="el" href="classQCPLineEnding.html#a580e4e2360b35ebb8d68f3494aa2335d">setInverted</a>) </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a5ef16e6876b4b74959c7261d8d4c2cd5a2b2cc96e757ca9bcd91fb70221ed43ab"></a>esSkewedBar</em> </td><td class="fielddoc">
- <p>A bar that is skewed (skew controllable via <a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a>) </p>
- </td></tr>
- </table>
- </div>
- </div>
- <h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="af2eaf8123b000d97fbd11929c669f61b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QCPLineEnding::QCPLineEnding </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Creates a <a class="el" href="classQCPLineEnding.html" title="Handles the different ending decorations for line-like items. ">QCPLineEnding</a> instance with default values (style <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5aca12d500f50cd6871766801bac30fb03">esNone</a>). </p>
- </div>
- </div>
- <a class="anchor" id="abb2abc7542f0c7a3c081d878248896a4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QCPLineEnding::QCPLineEnding </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">QCPLineEnding::EndingStyle</a> </td>
- <td class="paramname"><em>style</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>width</em> = <code>8</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>length</em> = <code>10</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>inverted</em> = <code>false</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Creates a <a class="el" href="classQCPLineEnding.html" title="Handles the different ending decorations for line-like items. ">QCPLineEnding</a> instance with the specified values. </p>
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a56953b9cb8ed1bed0f025c3935f16910"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::setStyle </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5">QCPLineEnding::EndingStyle</a> </td>
- <td class="paramname"><em>style</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the style of the ending decoration. </p>
- </div>
- </div>
- <a class="anchor" id="a26dc020ea985a72cc25881ce2115e34e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::setWidth </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>width</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the width of the ending decoration, if the style supports it. On arrows, for example, the width defines the size perpendicular to the arrow's pointing direction.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="ae36fa01763751cd64b7f56c3507e935a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::setLength </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>length</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the length of the ending decoration, if the style supports it. On arrows, for example, the length defines the size in pointing direction.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLineEnding.html#a26dc020ea985a72cc25881ce2115e34e">setWidth</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a580e4e2360b35ebb8d68f3494aa2335d"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::setInverted </td>
- <td>(</td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>inverted</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets whether the ending decoration shall be inverted. For example, an arrow decoration will point inward when <em>inverted</em> is set to true.</p>
- <p>Note that also the <em>width</em> direction is inverted. For symmetrical ending styles like arrows or discs, this doesn't make a difference. However, asymmetric styles like <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5a126c390f0c359fcd8df1fc5e38d26d5b">esHalfBar</a> are affected by it, which can be used to control to which side the half bar points to. </p>
- </div>
- </div>
- <a class="anchor" id="a586b45cf738881a70119e353dc1ed59c"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double QCPLineEnding::boundingDistance </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Returns the maximum pixel radius the ending decoration might cover, starting from the position the decoration is drawn at (typically a line ending/<a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> of an item).</p>
- <p>This is relevant for clipping. Only omit painting of the decoration when the position where the decoration is supposed to be drawn is farther away from the clipping rect than the returned distance. </p>
- </div>
- </div>
- <a class="anchor" id="a6a528e6dc5aabe1077a573b045715f03"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double QCPLineEnding::realLength </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Starting from the origin of this line ending (which is style specific), returns the length covered by the line ending symbol, in backward direction.</p>
- <p>For example, the <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5ab9964d0d03f812d1e79de15edbeb2cbf">esSpikeArrow</a> has a shorter real length than a <a class="el" href="classQCPLineEnding.html#a5ef16e6876b4b74959c7261d8d4c2cd5a3d7dcea2f100671727c3417142154f8f">esFlatArrow</a>, even if both have the same <a class="el" href="classQCPLineEnding.html#ae36fa01763751cd64b7f56c3507e935a">setLength</a> value, because the spike arrow has an inward curved back, which reduces the length along its center axis (the drawing origin for arrows is at the tip).</p>
- <p>This function is used for precise, style specific placement of line endings, for example in QCPAxes. </p>
- </div>
- </div>
- <a class="anchor" id="ac4b2fa94bd27b2f008b5fc090fcd7c0b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::draw </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
- <td class="paramname"><em>painter</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QVector2D & </td>
- <td class="paramname"><em>pos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QVector2D & </td>
- <td class="paramname"><em>dir</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Draws the line ending with the specified <em>painter</em> at the position <em>pos</em>. The direction of the line ending is controlled with <em>dir</em>. </p>
- </div>
- </div>
- <a class="anchor" id="a05c143b1f66cb68d746c309523c45e3e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLineEnding::draw </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
- <td class="paramname"><em>painter</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QVector2D & </td>
- <td class="paramname"><em>pos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>angle</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This is an overloaded function.</p>
- <p>Draws the line ending. The direction is controlled with the <em>angle</em> parameter in radians. </p>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>src/lineending.h</li>
- <li>src/lineending.cpp</li>
- </ul>
- </div><!-- contents -->
- </body>
- </html>
|