COPASI API  4.16.103
CArrow.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layoutUI/CArrow.cpp,v $
3 // $Revision: 1.4 $
4 // $Name: $
5 // $Author: pwilly $
6 // $Date: 2008/06/11 10:15:40 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /*!
19  \file CArrow.cpp
20  \brief Implementation file of class CArrow
21  */
22 
23 #include "CArrow.h"
24 #include <iostream>
25 
27 {
28  line = l;
29  endPoint = CLPoint(x, y);
30  arrowLength = 12.0;
31  arrowWidth = 5.0;
32  scaleHeadSize(currentZoomFactor);
33 }
34 
35 // scale line segment (curve) and end point, a curve (with basepoints) will not be scaled correctly
36 void CArrow::scale(C_FLOAT64 zoomFactor)
37 {
38  this->scaleHeadSize(zoomFactor);
39  this->scalePosition(zoomFactor);
40 }
41 
43 {
44  this->line.scale(zoomFactor);
45  this->endPoint.setX(this->endPoint.getX() * zoomFactor);
46  this->endPoint.setY(this->endPoint.getY() * zoomFactor);
47 }
48 
50 {
51  this->arrowWidth *= zoomFactor;
52  this->arrowLength *= zoomFactor;
53 }
void scalePosition(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:42
void scale(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:36
void setX(const C_FLOAT64 &x)
Definition: CLBase.h:91
void setY(const C_FLOAT64 &y)
Definition: CLBase.h:92
void scale(const double &scaleFactor)
Definition: CLCurve.h:104
const C_FLOAT64 & getX() const
Definition: CLBase.h:83
Definition: CLBase.h:54
C_FLOAT64 arrowWidth
Definition: CArrow.h:35
Header file of class CArrow.
CArrow()
Definition: CArrow.h:37
const C_FLOAT64 & getY() const
Definition: CLBase.h:84
void scaleHeadSize(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:49
#define C_FLOAT64
Definition: copasi.h:92
CLLineSegment line
Definition: CArrow.h:32
CLPoint endPoint
Definition: CArrow.h:33
C_FLOAT64 arrowLength
Definition: CArrow.h:34