Documentation
 All Classes Functions Variables Properties
SinglePointAnnotation.h
1 #pragma once
2 #include "Annotation.h"
3 #include "AnnotationPage.h"
4 using namespace System;
5 using namespace System::Collections::Generic;
6 using namespace System::Text;
7 using namespace System::Drawing;
8 
9 namespace MST
10 {
11  namespace Imaging
12  {
13  namespace Annotations
14  {
19  public ref class SinglePointAnnotation abstract : public MSTAnnotation
20  {
21  public:
28  {
29  m_ptArr = gcnew array<PointF>(1);
30  }
31  };
32 
37  public ref class Point : public SinglePointAnnotation
38  {
39  public:
45  Point(Pen^ pen,MSTAnnotationPage^ page) : SinglePointAnnotation(pen,page)
46  {
47  }
48 
52  property Type AnnotationType
53  {
54  virtual Type get() override
55  {
56  return Annotations::Type::Point;
57  }
58  }
59  virtual void Draw(GraphicsPath^ gp,array<PointF>^ ptArr)override
60  {
61  RectangleF rect(ptArr[0].X-10,ptArr[0].Y-10,20,20);
62  gp->AddEllipse(rect);
63  PointF pt((ptArr[0].X-10+ptArr[0].X+10)/2,ptArr[0].Y-10);
64  PointF pt2(ptArr[0].X-10,(ptArr[0].Y-10 + ptArr[0].Y+10)/2);
65  gp->AddLine(pt.X,pt.Y,ptArr[0].X,ptArr[0].Y+(ptArr[0].Y-pt.Y));
66  gp->CloseFigure();
67  gp->AddLine(pt2.X,pt2.Y,ptArr[0].X+(ptArr[0].X-pt2.X),ptArr[0].Y);
68  }
74  virtual void Move(int cx,int cy)override;
75 
80  double GetDistance(System::Drawing::PointF start, PointF end);
81  private:
82  };
83 
84  }
85  }
86 }
SinglePointAnnotation(Pen^ pen, MSTAnnotationPage^ page)
Constructor of a class.
Definition: SinglePointAnnotation.h:27
Definition: AnnotationPage.h:95
Definition: SinglePointAnnotation.h:19
Point(Pen^ pen, MSTAnnotationPage^ page)
Constructor of a class.
Definition: SinglePointAnnotation.h:45
Definition: SinglePointAnnotation.h:37
Definition: Annotation.h:45