FAUST compiler  0.9.9.6b8
inverterSchema.cpp
Go to the documentation of this file.
00001 
00002 /************************************************************************
00003  ************************************************************************
00004     FAUST compiler
00005     Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
00006     ---------------------------------------------------------------------
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  ************************************************************************
00021  ************************************************************************/
00022 
00023 
00024 #include "inverterSchema.h"
00025 #include <assert.h>
00026 #include <iostream>
00027 
00028 using namespace std;
00029 
00030 //#define invcolor "#f44444"
00031 
00035 schema* makeInverterSchema (const string& color)
00036 {
00037     return new inverterSchema(color);
00038 }
00039 
00040 
00044 inverterSchema::inverterSchema(const string& color)
00045     :   blockSchema (1, 1, 2.5*dWire, dWire, "-1", color, "")
00046 {
00047 }
00048 
00049 
00054 void inverterSchema::draw(device& dev)
00055 {
00056     dev.triangle(x() + dHorz, y()+0.5, width() - 2*dHorz, height()-1, fColor.c_str(),fLink.c_str(), orientation()==kLeftRight);
00057 }