Project

General

Profile

Statistics
| Branch: | Revision:

root / src / layout / graphlayouter.cc @ 8aeaaccc

History | View | Annotate | Download (996 Bytes)

1
//==========================================================================
2
//  GRAPHLAYOUTER.CC - part of
3
//                     OMNeT++/OMNEST
4
//            Discrete System Simulation in C++
5
//
6
//  Author: Levente Meszaros
7
//
8
//==========================================================================
9

    
10
/*--------------------------------------------------------------*
11
  Copyright (C) 2006-2008 OpenSim Ltd.
12

13
  This file is distributed WITHOUT ANY WARRANTY. See the file
14
  `license' for details on this and other legal matters.
15
*--------------------------------------------------------------*/
16

    
17
#include "graphlayouter.h"
18

    
19
USING_NAMESPACE
20

    
21

    
22
GraphLayouter::GraphLayouter()
23
{
24
    width = height = border = 0;
25
}
26

    
27
void GraphLayouter::setSize(int w, int h, int bd)
28
{
29
    width = w; height = h; border = bd;
30

    
31
    if ((width!=0 && width < 2*border) || (height!=0 && height < 2*border))
32
        throw opp_runtime_error("GraphLayouter::setSize(): required width or height smaller than 2*border");
33
}
34

    
35