GeometryUtil class

Constructors

GeometryUtil()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calculateDistance(double x1, double y1, double x2, double y2) double
计算两点之间的距离
getBoundingBox(Rect rect1, Rect rect2) Rect
计算2个矩形的外接矩形,用于计算圆点摸tip的位置
isClickImgArea(int sw, int sh, Size renderSize, Offset clicLtInSImg, int clickW, int clickH, Offset localPosition) → dynamic
判断是否点中图片的指定区域 sw,sh,图片的原始大小 renderSize:图片的渲染后所占用的像素大小 clicLtInSImg:原图上可以点击的区域左上角 clickW, clickH:原图上可点击的矩形的宽度和高度 localPosition:实际交互的时候点击的内容
isPointInRectangle(double px, double py, Rect rect) bool
判断点是否在矩形内部
percent2Offset(dynamic ox, Rect rect) Offset
计算标记点渲染后到真实的点距离