0c784d0ee1ce9fc1a34b7a450cdfb5d013cff101
1 /************************************************************************
2 ************************************************************************
4 Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
5 ---------------------------------------------------------------------
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 ************************************************************************
20 ************************************************************************/
23 #include "cutSchema.h"
31 * Creates a new Cut schema.
33 schema
* makeCutSchema ()
35 return new cutSchema();
40 * A Cut is represented by a small black dot. It has 1 input
41 * and no outputs. It has a 0 width and a 1 wire height. The
42 * constructor is private in order to enforce the usage of
45 cutSchema::cutSchema ()
46 : schema (1, 0, 0, dWire
/100.0), fPoint(0,0)
51 * The input point is placed in the middle
53 void cutSchema::place(double ox
, double oy
, int orientation
)
55 beginPlace(ox
, oy
, orientation
);
56 fPoint
= point(ox
, oy
+ height()*0.5); //, -1);
62 * A cut is represented by a small black dot
64 void cutSchema::draw(device
& dev
)
66 //dev.rond(fPoint.x, fPoint.y, dWire/8.0);
69 void cutSchema::collectTraits(collector
& c
)
73 * By definition a Cut has only one input point
75 point
cutSchema::inputPoint(unsigned int i
) const
82 * By definition a Cut has no output point
84 point
cutSchema::outputPoint(unsigned int) const