-/****************************************************************************
-** $Id: rs_linetypepattern.h 1676 2003-08-08 14:05:26Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-
#ifndef RS_LINETYPEPATTERN_H
#define RS_LINETYPEPATTERN_H
/**
* Stores a line type pattern.
*/
-class RS_LineTypePattern {
-public:
- RS_LineTypePattern(int count ...) {
- va_list ap;
- int i=0;
- num = count;
-
- va_start(ap, count);
- pattern = new double[num];
- for (i=0; i<count; i++) {
- pattern[i] = va_arg(ap, double);
- }
- va_end(ap);
- }
-
- ~RS_LineTypePattern() {
- delete[] pattern;
- }
-
-public:
- double* pattern;
- int num;
+class RS_LineTypePattern
+{
+ public:
+ RS_LineTypePattern(int count ...);
+ ~RS_LineTypePattern();
+
+ public:
+ double * pattern;
+ int num;
};
// Create line patterns
6, 6.0, -2.9, 0.15, -2.9, 0.15, -2.9);
static RS_LineTypePattern patternDivideLineX2(
6, 24.0, -11.9, 0.15, -11.9, 0.15, -11.9);
-
+
static RS_LineTypePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
static RS_LineTypePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
static RS_LineTypePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);