You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iPlot/iPlotCurveT/ZxHandleHelper.h

44 lines
859 B
C

#pragma once
#include <QPainter>
#include <QRectF>
#include "Defines.h"
#include "iPlotCurveT_global.h"
class ZxPaintParam;
// 8控制点管理器
class I_PLOTCURVE_T_EXPORT ZxHandleHelper
{
public:
ZxHandleHelper();
ZxHandleHelper(const QRectF& rt);
public:
// 边界
virtual void setBounds(const QRectF& rt);
virtual QRectF getBounds() const;
// handle
virtual RectPos hitTest(const QPointF& pt, float fHdlSize = 2.2f);
static QVector<QPointF> getEightPoints(const QRectF& rtBound);
static QPointF getOnePointOf(const QRectF& rtBound, RectPos o);
// 光标
virtual QCursor getCursor(RectPos o);
// 绘制
virtual void paintBack(QPainter* painter,
const ZxPaintParam& param,
RectPos oActive = OUTER);
private:
QRectF m_rtBound;
};