File: qwt__rect_8h-source.html

package info (click to toggle)
libqwt 4.2.0-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,832 kB
  • ctags: 5,512
  • sloc: cpp: 22,973; ansic: 244; makefile: 66
file content (54 lines) | stat: -rw-r--r-- 4,370 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Qwt User&apos;s Guide: qwt_rect.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>qwt_rect.h</h1><pre class="fragment"><div>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
00002 <span class="comment"> * Qwt Widget Library</span>
00003 <span class="comment"> * Copyright (C) 1997   Josef Wilgen</span>
00004 <span class="comment"> * Copyright (C) 2002   Uwe Rathmann</span>
00005 <span class="comment"> * </span>
00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
00008 <span class="comment"> *****************************************************************************/</span>
00009 
00010 <span class="preprocessor">#ifndef QWT_RECT_H</span>
00011 <span class="preprocessor"></span><span class="preprocessor">#define QWT_RECT_H</span>
00012 <span class="preprocessor"></span>
00013 <span class="preprocessor">#include &lt;qrect.h&gt;</span>
00014 <span class="preprocessor">#include "qwt_global.h"</span>
00015 
00016 <span class="keyword">class </span>QPoint;
00017 <span class="keyword">class </span>QPointArray;
00018 
<a name="l00023"></a><a class="code" href="class_qwt_rect.html">00023</a> <span class="keyword">class </span>QWT_EXPORT QwtRect : <span class="keyword">public</span> QRect
00024 {
00025 <span class="keyword">public</span>:
00026     QwtRect();
00027     QwtRect(<span class="keyword">const</span> QRect &amp;r);
00028 
00029     QRect cutTop(<span class="keywordtype">int</span> h , <span class="keywordtype">int</span> distTop = 0, <span class="keywordtype">int</span> distBottom = 0);
00030     QRect cutBottom(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> distTop = 0, <span class="keywordtype">int</span> distBottom = 0);
00031     QRect cutLeft(<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> distLeft = 0, <span class="keywordtype">int</span> distRight = 0);
00032     QRect cutRight(<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> distLeft = 0, <span class="keywordtype">int</span> distRight = 0);
00033     <span class="keyword">const</span> QwtRect &amp;cutMargin(<span class="keywordtype">int</span> mLeft, <span class="keywordtype">int</span> mRight, <span class="keywordtype">int</span> Top, <span class="keywordtype">int</span> mBottom);
00034 
00035     QPointArray clip(<span class="keyword">const</span> QPointArray &amp;) <span class="keyword">const</span>;
00036 
00037 <span class="keyword">private</span>:
00038     <span class="keyword">enum</span> Edge { Left, Top, Right, Bottom, NEdges };
00039 
00040     <span class="keywordtype">void</span> clipEdge(Edge, <span class="keyword">const</span> QPointArray &amp;, QPointArray &amp;) <span class="keyword">const</span>;
00041     <span class="keywordtype">bool</span> insideEdge(<span class="keyword">const</span> QPoint &amp;, Edge edge) <span class="keyword">const</span>;
00042     QPoint intersectEdge(<span class="keyword">const</span> QPoint &amp;p1, 
00043         <span class="keyword">const</span> QPoint &amp;p2, Edge edge) <span class="keyword">const</span>;
00044 };
00045 
00046 <span class="preprocessor">#endif</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:21 2004 for Qwt User's Guide by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>