COPASI API  4.16.103
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CArrow Class Reference

#include <CArrow.h>

Collaboration diagram for CArrow:
Collaboration graph
[legend]

Public Member Functions

 CArrow ()
 
 CArrow (CLLineSegment l, C_FLOAT64 x, C_FLOAT64 y, C_FLOAT64 currentZoomFactor)
 
C_FLOAT64 getArrowLength ()
 
C_FLOAT64 getArrowWidth ()
 
CLPoint getEndOfLine ()
 
CLLineSegment getLine ()
 
CLPoint getPoint ()
 
CLPoint getStartOfLine ()
 
void scale (C_FLOAT64 zoomFactor)
 
void setLine (CLLineSegment l)
 
void setPoint (CLPoint p)
 

Private Member Functions

void scaleHeadSize (C_FLOAT64 zoomFactor)
 
void scalePosition (C_FLOAT64 zoomFactor)
 

Private Attributes

C_FLOAT64 arrowLength
 
C_FLOAT64 arrowWidth
 
CLPoint endPoint
 
CLLineSegment line
 

Detailed Description

Definition at line 29 of file CArrow.h.

Constructor & Destructor Documentation

CArrow::CArrow ( )
inline

Definition at line 37 of file CArrow.h.

References arrowLength, arrowWidth, and endPoint.

37 {endPoint = CLPoint(0.0, 0.0);arrowLength = 12.0; arrowWidth = 5.0;}
Definition: CLBase.h:54
C_FLOAT64 arrowWidth
Definition: CArrow.h:35
CLPoint endPoint
Definition: CArrow.h:33
C_FLOAT64 arrowLength
Definition: CArrow.h:34
CArrow::CArrow ( CLLineSegment  l,
C_FLOAT64  x,
C_FLOAT64  y,
C_FLOAT64  currentZoomFactor 
)

Definition at line 26 of file CArrow.cpp.

References arrowLength, arrowWidth, endPoint, line, and scaleHeadSize().

27 {
28  line = l;
29  endPoint = CLPoint(x, y);
30  arrowLength = 12.0;
31  arrowWidth = 5.0;
32  scaleHeadSize(currentZoomFactor);
33 }
Definition: CLBase.h:54
C_FLOAT64 arrowWidth
Definition: CArrow.h:35
void scaleHeadSize(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:49
CLLineSegment line
Definition: CArrow.h:32
CLPoint endPoint
Definition: CArrow.h:33
C_FLOAT64 arrowLength
Definition: CArrow.h:34

Member Function Documentation

C_FLOAT64 CArrow::getArrowLength ( )
inline

Definition at line 47 of file CArrow.h.

References arrowLength.

47 {return arrowLength;}
C_FLOAT64 arrowLength
Definition: CArrow.h:34
C_FLOAT64 CArrow::getArrowWidth ( )
inline

Definition at line 46 of file CArrow.h.

References arrowWidth.

46 {return arrowWidth;}
C_FLOAT64 arrowWidth
Definition: CArrow.h:35
CLPoint CArrow::getEndOfLine ( )
inline

Definition at line 41 of file CArrow.h.

References CLLineSegment::getEnd(), and line.

Referenced by CQGLNetworkPainter::drawArrow().

41 {return line.getEnd();}
const CLPoint & getEnd() const
Definition: CLCurve.h:75
CLLineSegment line
Definition: CArrow.h:32
CLLineSegment CArrow::getLine ( )
inline

Definition at line 42 of file CArrow.h.

References line.

42 {return line;}
CLLineSegment line
Definition: CArrow.h:32
CLPoint CArrow::getPoint ( )
inline

Definition at line 44 of file CArrow.h.

References endPoint.

44 {return endPoint;}
CLPoint endPoint
Definition: CArrow.h:33
CLPoint CArrow::getStartOfLine ( )
inline

Definition at line 40 of file CArrow.h.

References CLLineSegment::getStart(), and line.

Referenced by CQGLNetworkPainter::drawArrow().

40 {return line.getStart();}
CLLineSegment line
Definition: CArrow.h:32
const CLPoint & getStart() const
Definition: CLCurve.h:74
void CArrow::scale ( C_FLOAT64  zoomFactor)

Definition at line 36 of file CArrow.cpp.

References scaleHeadSize(), and scalePosition().

Referenced by CGraphCurve::scale().

37 {
38  this->scaleHeadSize(zoomFactor);
39  this->scalePosition(zoomFactor);
40 }
void scalePosition(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:42
void scaleHeadSize(C_FLOAT64 zoomFactor)
Definition: CArrow.cpp:49
void CArrow::scaleHeadSize ( C_FLOAT64  zoomFactor)
private

Definition at line 49 of file CArrow.cpp.

References arrowLength, and arrowWidth.

Referenced by CArrow(), and scale().

50 {
51  this->arrowWidth *= zoomFactor;
52  this->arrowLength *= zoomFactor;
53 }
C_FLOAT64 arrowWidth
Definition: CArrow.h:35
C_FLOAT64 arrowLength
Definition: CArrow.h:34
void CArrow::scalePosition ( C_FLOAT64  zoomFactor)
private

Definition at line 42 of file CArrow.cpp.

References endPoint, CLPoint::getX(), CLPoint::getY(), line, CLLineSegment::scale(), CLPoint::setX(), and CLPoint::setY().

Referenced by scale().

43 {
44  this->line.scale(zoomFactor);
45  this->endPoint.setX(this->endPoint.getX() * zoomFactor);
46  this->endPoint.setY(this->endPoint.getY() * zoomFactor);
47 }
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
const C_FLOAT64 & getY() const
Definition: CLBase.h:84
CLLineSegment line
Definition: CArrow.h:32
CLPoint endPoint
Definition: CArrow.h:33
void CArrow::setLine ( CLLineSegment  l)
inline

Definition at line 43 of file CArrow.h.

References line.

Referenced by CGraphCurve::invertOrderOfPoints().

43 {line = l;}
CLLineSegment line
Definition: CArrow.h:32
void CArrow::setPoint ( CLPoint  p)
inline

Definition at line 45 of file CArrow.h.

References endPoint.

Referenced by CGraphCurve::invertOrderOfPoints().

45 {endPoint = p;}
CLPoint endPoint
Definition: CArrow.h:33

Member Data Documentation

C_FLOAT64 CArrow::arrowLength
private

Definition at line 34 of file CArrow.h.

Referenced by CArrow(), getArrowLength(), and scaleHeadSize().

C_FLOAT64 CArrow::arrowWidth
private

Definition at line 35 of file CArrow.h.

Referenced by CArrow(), getArrowWidth(), and scaleHeadSize().

CLPoint CArrow::endPoint
private

Definition at line 33 of file CArrow.h.

Referenced by CArrow(), getPoint(), scalePosition(), and setPoint().

CLLineSegment CArrow::line
private

Definition at line 32 of file CArrow.h.

Referenced by CArrow(), getEndOfLine(), getLine(), getStartOfLine(), scalePosition(), and setLine().


The documentation for this class was generated from the following files: