#ifndef OUTLINE_H
#define OUTLINE_H

#include <QObject>
#include <QImage>
#include "datafiledsr.h"

class OutLine : public QObject
{
    Q_OBJECT
public:
    explicit OutLine(QObject *parent = 0);

public:
    void setRangeXY(int maxX,int minX,int maxY,int minY);//设置花样范围
    QList<DsrStep> getOutLine(QImage *img);//获取花样轮廓

private:
    int m_maxX;
    int m_minX;
    int m_maxY;
    int m_minY;

    int getDsrDr(int dx, int dy);
    QStringList getDsrPointX(QStringList list_x_contour, int dsr_x_max, int dsr_x_min, int point_x_max, int point_x_min);
    QStringList getDsrPointY(QStringList list_y_contour, int dsr_y_max, int dsr_y_min, int point_y_max, int point_y_min);
    double getPointLength(int x1, int y1, int x2, int y2);

signals:

public slots:
};

#endif // OUTLINE_H
