#ifndef BASE_VISION_H #define BASE_VISION_H #ifdef EXPORT_DLL_BASE_DISPLAY #define EXPORTED_BASE_DISPLAY _declspec(dllexport) #else #define EXPORTED_BASE_DISPLAY _declspec(dllimport) #endif #include "typesdef.h" class EXPORTED_BASE_DISPLAY BaseVision { public: BaseVision(); ~BaseVision(); public: //1. »ñÈ¡µ±Ç°µÄÈí¼þ°æ±¾ static std::string GetVersion(void); //2. »ñÈ¡¸üÐÂÄÚÈÝ static std::string GetUpdate(void); //3. »ñÈ¡µ±Ç°µÄĿ¼ static std::string GetAppPathA(); public: //1. »­¾ØÐÎ static bool drawRect1(CDC* pDC, RECT1 rect, bool isDraw, COLORREF color, COLORREF bgColor); //2. »­Ô²ÐÎ static bool drawCircle(CDC* pDC, Circle2D cirle, bool isDraw, COLORREF color, COLORREF bgColor); //3. »­Ö±Ïß static bool drawLine(CDC* pDC, Line2D line, bool isDraw, COLORREF color, COLORREF bgColor); //4. »­Ê®×Ö¼Û static bool drawCross(CDC* pDC, CROSS cross, COLORREF color, int lineWidth); //5. »­²¼¾ØÐÎ2 static bool drawRect2(CDC* pDC, RECT2 rect, bool isDraw, COLORREF color, COLORREF bgColor); //6. Ðýת±ä»»¹«Ê½ static Point2D rotatePoint(Point2D pt, Point2D ptCenter, double angle); //7. »­ÈÎÒâÇøÓò static bool drawRegion(CDC* pDC, Region2D region, bool isDraw, COLORREF color, COLORREF bgColor); //8. ³õʼ»¯Í¼Ïñ static bool createImage(CImage &image, int width, int height, COLORREF color); //9. ¿½±´Í¼Ïñ static bool copyImage(const CImage *pSrcImage, CImage &destImage); //10. ×ø±êת»» static Point2I toPoint2I(Point2D pt); //11. ×ø±êת»» static Point2D toPoint2D(Point2I pt); //12. 2µã¾àÀë static double distancePP(double x1, double y1, double x2, double y2); //13. 2µãµÄ½Ç¶È static double anglePP(double x1, double y1, double x2, double y2); //14. ÅжϵãÊÇ·ñÔÚÖ±Ï߽߱çÉÏ static bool judgeLinePoint(Point2D pt, Line2D line, double fzDist); //15. ÅжϵãÓëµãÊÇ·ñÏàÁÚ static bool judgePointNear(Point2D pt0, Point2D pt1, double fzDist); //16. µãµ½Ö±ÏߵľàÀë static double distancePL(double px, double py, double lineX1, double lineY1, double lineX2, double lineY2); //17. ͼÏñ¶þÖµ»¯ static void imageThreshold(CImage *image, int minThreshold, int maxThreshold); //18. ±¦±´Êý¾Ý static bool bmpToImage(CBitmap *pBitmap, CImage &image); //19. ÅжÏÎļþÊÇ·ñ´æÔÚ static bool fileIsExist(std::string fileName); }; #endif