2
Cassowary.net: an incremental constraint solver for .NET
3
(http://lumumba.uhasselt.be/jo/projects/cassowary.net/)
5
Copyright (C) 2005 Jo Vermeulen (jo.vermeulen@uhasselt.be)
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public License
9
as published by the Free Software Foundation; either version 2.1
10
of the License, or (at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
public ClPoint(double x, double y)
30
_clv_x = new ClVariable(x);
31
_clv_y = new ClVariable(y);
34
public ClPoint(double x, double y, int a)
36
_clv_x = new ClVariable("x"+a,x);
37
_clv_y = new ClVariable("y"+a,y);
40
public ClPoint(ClVariable clv_x, ClVariable clv_y)
48
get { return _clv_x; }
49
set { _clv_x = value; }
54
get { return _clv_y; }
55
set { _clv_y = value; }
59
/// Use only before adding into the solver
61
public void SetXY(double x, double y)
67
public void SetXY(ClVariable clv_x, ClVariable clv_y)
75
get { return X.Value; }
76
set { X.Value = value; }
81
get { return Y.Value; }
82
set { Y.Value = value; }
85
public override string ToString()
87
return "(" + _clv_x.ToString() + ", " + _clv_y.ToString() + ")";
90
private ClVariable _clv_x;
91
private ClVariable _clv_y;