123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /////////////////////////////////////////////
- //Copyright (c) 2011, 北京探索者软件公司
- //All rights reserved.
- //文件名称:
- //文件描述:
- //创 建 者: mjy
- //创建日期: 2011-11-02
- //版 本 号:4.0.0.0
- /////////////////////////////////////////////
- using System.Drawing;
- namespace SAGA.DotNetUtils.Geometry
- {
- public class TwoPointRelation
- {
- private PointF fix;
- private PointF other;
- public TwoPointRelation(PointF fix, PointF other)
- {
- this.fix = fix;
- this.other = other;
- }
- public RelationOptions RelationGraphics
- {
- get
- {
- if (other.X >= fix.X)
- {
- if (other.Y >= fix.Y)
- return RelationOptions.RightDown;
- return RelationOptions.RightUp;
- }
- else
- {
- if (other.Y >= fix.Y)
- return RelationOptions.LeftDown;
- return RelationOptions.LeftUp;
- }
- }
- }
- public RelationOptions RelationCAD
- {
- get
- {
- if (other.X >= fix.X)
- {
- if (other.Y >= fix.Y)
- return RelationOptions.RightUp;
- return RelationOptions.RightDown;
- }
- else
- {
- if (other.Y >= fix.Y)
- return RelationOptions.LeftUp;
- return RelationOptions.LeftDown;
- }
- }
- }
- }
- }
|