53 s1->width() + s2->width() + hgap,
54 max(s1->height(), s2->height()) ),
schema * makeMergeSchema(schema *s1, schema *s2)
Creates a new merge schema.
void addTrait(const trait &t)
virtual void draw(device &dev)
Draw the two sub schema and the connections between them.
unsigned int outputs() const
const double dWire
distance between two wires
virtual point inputPoint(unsigned int i) const =0
mergeSchema(schema *s1, schema *s2, double hgap)
Constructor for a merge schema s1 :> s2 where the outputs of s1 are merged to the inputs of s2...
void beginPlace(double x, double y, int orientation)
virtual void draw(device &dev)=0
virtual point outputPoint(unsigned int i) const
The outputs of s1 :> s2 are the outputs of s2.
virtual void collectTraits(collector &c)=0
unsigned int inputs() const
Place and connect two diagrams in merge composition.
double max(double x, double y)
virtual void place(double x, double y, int orientation)=0
virtual point outputPoint(unsigned int i) const =0
An abstract block diagram schema.
virtual void place(double ox, double oy, int orientation)
Places the two subschema horizontaly, centered, with enough gap for the connections.
virtual point inputPoint(unsigned int i) const
The inputs of s1 :> s2 are the inputs of s1.
virtual void collectTraits(collector &c)
Draw the two sub schema and the connections between them.
virtual void trait(double x1, double y1, double x2, double y2)=0
schema * makeEnlargedSchema(schema *s, double width)
Returns an enlarged schema, but only if really needed that is if the requiered width is greater that ...