|
|
|
|
|
// FaultRoseLib.cpp : <20><><EFBFBD><EFBFBD> DLL <20>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>̡<EFBFBD>
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
#include "FaultRosesCreator.h"
|
|
|
|
|
|
//#ifdef _DEBUG
|
|
|
|
|
|
//#define new DEBUG_NEW
|
|
|
|
|
|
//#endif
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" __declspec(dllexport)
|
|
|
|
|
|
bool CreateFaultRoseImage(LPCTSTR inputDataFile, LPCTSTR outputDrawFile
|
|
|
|
|
|
,int dataColumn, int startRow
|
|
|
|
|
|
, double barInterval, int barCount, bool barCountAuto, int tickInterval
|
|
|
|
|
|
, int colorR, int colorG, int colorB)
|
|
|
|
|
|
{
|
|
|
|
|
|
double centerX = 0;
|
|
|
|
|
|
double centerY = 0;
|
|
|
|
|
|
double radius = 100;
|
|
|
|
|
|
CFaultRosesCreator fc;
|
|
|
|
|
|
fc.m_iRotateAngle = 0;
|
|
|
|
|
|
fc.m_fBarInterval = barInterval; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
fc.m_nBarMaxNumber = barCount; // <20><><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
|
fc.m_bAutoCalc = barCountAuto; // <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>㻨<EFBFBD><E3BBA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
|
fc.m_dCX = centerX; // Բ<><D4B2>X
|
|
|
|
|
|
fc.m_dCY = centerY; // Բ<><D4B2>Y
|
|
|
|
|
|
fc.m_dR = radius; // <20>뾶
|
|
|
|
|
|
fc.m_barColor = RGB(colorR, colorG, colorB); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
fc.m_nCircleTickInterval = tickInterval; // Բ<><D4B2><EFBFBD>̱<EFBFBD><CCB1><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>Ϊ 30,45,90
|
|
|
|
|
|
|
|
|
|
|
|
if (fc.ReadFile(inputDataFile, dataColumn, startRow) == false) {
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fc.CreateRoseBars();
|
|
|
|
|
|
fc.WriteDFD(outputDrawFile); // д<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|