1 /****************************************************************************
2 ** $Id: rs_linetypepattern.h 1676 2003-08-08 14:05:26Z andrew $
4 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6 ** This file is part of the qcadlib Library project.
8 ** This file may be distributed and/or modified under the terms of the
9 ** GNU General Public License version 2 as published by the Free Software
10 ** Foundation and appearing in the file LICENSE.GPL included in the
11 ** packaging of this file.
13 ** Licensees holding valid qcadlib Professional Edition licenses may use
14 ** this file in accordance with the qcadlib Commercial License
15 ** Agreement provided with the Software.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ** See http://www.ribbonsoft.com for further details.
22 ** Contact info@ribbonsoft.com if any conditions of this licensing are
25 **********************************************************************/
28 #ifndef RS_LINETYPEPATTERN_H
29 #define RS_LINETYPEPATTERN_H
34 * Stores a line type pattern.
36 class RS_LineTypePattern {
38 RS_LineTypePattern(int count ...) {
44 pattern = new double[num];
45 for (i=0; i<count; i++) {
46 pattern[i] = va_arg(ap, double);
51 ~RS_LineTypePattern() {
60 // Create line patterns
61 static RS_LineTypePattern patternSolidLine(1, 10.0);
63 static RS_LineTypePattern patternDotLine(2, 0.1, -6.2);
64 static RS_LineTypePattern patternDotLine2(2, 0.1, -3.1);
65 static RS_LineTypePattern patternDotLineX2(2, 0.1, -12.4);
67 static RS_LineTypePattern patternDashLine(2, 12.0, -6.0);
68 static RS_LineTypePattern patternDashLine2(2, 6.0, -3.0);
69 static RS_LineTypePattern patternDashLineX2(2, 24.0, -12.0);
71 static RS_LineTypePattern patternDashDotLine(4, 12.0, -5.95, 0.1, -5.95);
72 static RS_LineTypePattern patternDashDotLine2(4, 6.0, -2.95, 0.1, -2.95);
73 static RS_LineTypePattern patternDashDotLineX2(4, 24.0, -11.95, 0.1, -11.95);
75 static RS_LineTypePattern patternDivideLine(
76 6, 12.0, -5.9, 0.15, -5.9, 0.15, -5.9);
77 static RS_LineTypePattern patternDivideLine2(
78 6, 6.0, -2.9, 0.15, -2.9, 0.15, -2.9);
79 static RS_LineTypePattern patternDivideLineX2(
80 6, 24.0, -11.9, 0.15, -11.9, 0.15, -11.9);
82 static RS_LineTypePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
83 static RS_LineTypePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
84 static RS_LineTypePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);
86 static RS_LineTypePattern patternBorderLine(
87 6, 12.0, -6.0, 12.0, -5.95, 0.1, -5.95);
88 static RS_LineTypePattern patternBorderLine2(
89 6, 6.0, -3.0, 6.0, -2.95, 0.1, -2.95);
90 static RS_LineTypePattern patternBorderLineX2(
91 6, 24.0, -12.0, 24.0, -11.95, 0.1, -11.95);
93 static RS_LineTypePattern patternBlockLine(2, 0.5, -0.5);
94 static RS_LineTypePattern patternSelected(2, 1.0, -3.0);