CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
UtilsRect.h 文件参考

struct  LayoutPosition
 

命名空间

namespace  UtilsMath
 
namespace  UtilsRect
 

函数

UI_EXP void UtilsMath::LinearFit (VecFloat2 *points, int len, double &k, double &b)
 线性拟合-最小二乘法。拟合结果为 y= k * x + b
 
UI_EXP void UtilsMath::LinearFitExp (VecFloat2 *points, int len, double &a, double &b)
 非线性拟合指数函数-最小二乘法。拟合结果为 y= a * b^x
 
UI_EXP void UtilsMath::LinearFitPower (VecFloat2 *points, int len, double &a, double &b)
 非线性拟合幂函数-最小二乘法。拟合结果为 y= a * x^b
 
UI_EXP double UtilsMath::InterpolationLagrange (VecFloat2 *points, int len, double xp)
 拉格朗日插值,求任意点xp的Y坐标
 
UI_EXP BOOL UtilsMath::PtInLine (POINT pt, POINT p1, POINT p2, int nWeight)
 判断点是否在线段上
 
UI_EXP BOOL UtilsMath::PtInRegion (POINT pt, std::vector< POINT > &points)
 判断点是否在points点围成的区域内
 
UI_EXP BOOL UtilsMath::PtInRegion (POINT pt, const POINT points[], int nlen)
 
UI_EXP BOOL UtilsMath::LineCrossPoint (POINT line1_p1, POINT line1_p2, POINT line2_p1, POINT line2_p2, POINT &ptCross)
 线段在各自延长线上存在交点
 
UI_EXP BOOL UtilsMath::LineCrossPointInside (POINT line1_p1, POINT line1_p2, POINT line2_p1, POINT line2_p2, POINT &ptCross)
 线段上的交点,不包括各自延长线
 
UI_EXP void UtilsMath::RectLayoutCalculator (LayoutPosition *objs, int len, RECT rcBox, UINT align, BOOL bHorz, int interval, BOOL bReverse)
 根据尺寸列表,计算在区域中的位置
 
UI_EXP void UtilsMath::TrianglePoint (POINT pt[], RECT rect, int dir, int size)
 三角形顶点源
 
UI_EXP BOOL UtilsMath::IsSameSign (double v1, double v2)
 同号
 
UI_EXP double UtilsMath::VectorAngle (double x1, double y1, double x2, double y2)
 向量基于x轴的夹角
 
UI_EXP BOOL UtilsRect::PointInRect (const RECT *lprc1, POINT pt)
 点是否在矩形区域内
 
UI_EXP BOOL UtilsRect::PointInRect (const RECT *lprc1, LONG x, LONG y)
 点是否在矩形区域内
 
UI_EXP void UtilsRect::SetRectEmpty (RECT *lprc1)
 设置矩形为空(0,0,0,0)
 
UI_EXP void UtilsRect::SetRect (RECT *lprc1, int l, int t, int r, int b)
 设置矩形尺寸
 
UI_EXP BOOL UtilsRect::IsRectangleEmpty (const RECT *lprcSrc1)
 
UI_EXP BOOL UtilsRect::IsRectIntersect (LPRECT lprc1, LPRECT lprc2)
 lprc1与lprc2矩形,是否有交集
 
UI_EXP BOOL UtilsRect::IntersectRectangle (LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
 求lprcSrc1与lprcSrc2矩形交集
 
UI_EXP BOOL UtilsRect::UnionRectangle (LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
 求lprcSrc1与lprcSrc2矩形并集
 
UI_EXP BOOL UtilsRect::IsRectContain (LPRECT lprc1, LPRECT lprc2)
 矩形(lprc1)内是否包含矩形(lprc2)
 
UI_EXP BOOL UtilsRect::IsRectEqual (LPRECT lprc1, LPRECT lprc2)
 矩形(lprc1)与矩形(lprc2),是否相等
 
UI_EXP BOOL UtilsRect::DeflateRect (LPRECT pRect, int l, int t, int r, int b)
 矩形(pRect),边距缩小或放大
 
UI_EXP BOOL UtilsRect::DeflateRect (LPRECT pRect, int dx, int dy, BOOL check_min=FALSE)
 矩形(pRect),边距缩小或放大
 
UI_EXP BOOL UtilsRect::OffsetRect (LPRECT pRect, int dx, int dy)
 矩形(pRect)平移
 
UI_EXP void UtilsRect::Normal (RECT &rect)
 矩形(pRect)坐标标准化(左边必须小于右边,底部大于顶部)
 
UI_EXP void UtilsRect::TransformRect (RECT &rect, BUI::Transform2d &mtx)
 根据变换矩阵mtx,变换矩形位置
 
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有