极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9679|回复: 2

求图形外轮廓线的一个类

[复制链接]
发表于 2015-6-16 22:17:31 | 显示全部楼层 |阅读模式
用图形剪切了做软件界面是个常用的手段,算法也有很多,这个算做原创,非常简单,图形不是很复杂的情况下效率比较高(也是一般的情况)

.h

#ifndef _UtilClsH
#define _UtilClsH

#include <vcl.h>

//---------------------------------------------------------------------------
class UtilCls
{
public:
        static TPoint* ComputeOutline(TImage * image, TColor crKey, int& count);
protected:
private:
        static TPoint LocateFirstPoint(TImage * image, TColor crKey);
        static TPoint LocatePoint(TPoint curr, int& orgin, TImage * image, TColor crKey);
};
#endif

.cpp

#pragma hdrstop

#include "_UtilCls.h"
回复

使用道具 举报

 楼主| 发表于 2015-6-16 22:20:31 | 显示全部楼层
请人回答
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-6-16 22:21:51 | 显示全部楼层
求关注  
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-3-29 19:48 , Processed in 0.053733 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表