// FaultRoseLib.cpp : 定义 DLL 的初始化例程。 // #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; // 花瓣条间隔, 度数 fc.m_nBarMaxNumber = barCount; // 花瓣刻度最大值 fc.m_bAutoCalc = barCountAuto; // 自动计算花瓣最大值 fc.m_dCX = centerX; // 圆心X fc.m_dCY = centerY; // 圆心Y fc.m_dR = radius; // 半径 fc.m_barColor = RGB(colorR, colorG, colorB); // 花瓣颜色 fc.m_nCircleTickInterval = tickInterval; // 圆环刻标间隔, 建议为 30,45,90 if (fc.ReadFile(inputDataFile, dataColumn, startRow) == false) { return false; } fc.CreateRoseBars(); fc.WriteDFD(outputDrawFile); // 写出结果文件 return true; }