开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
forked from 腾硕软件/vc-client
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
master
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (1)
master
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
master
vc-client
/
vflow
/
WFNode.cpp
vc-client
/
vflow
/
WFNode.cpp
WFNode.cpp 3.28 KB
一键复制 编辑 原始数据 按行查看 历史
腾硕软件 提交于 2015年04月03日 00:42 +08:00 . 初始提交
#include "StdAfx.h"
#include "WFNode.h"
WFNode::WFNode(void)
{
m_selected=FALSE;
m_bgColor=DEFAULT_BGCOLOR;
m_color=DEFAULT_COLOR;
ZeroMemory(m_caption,sizeof(TCHAR)*STRLEN_NORMAL);
ZeroMemory(m_unid,sizeof(TCHAR)*STRLEN_SMALL);
ZeroMemory(m_fontFamily,sizeof(TCHAR)*STRLEN_SMALL);
m_fontSize=DEFAULT_FONT_SIZE;
m_width=0;
m_height=DEFAULT_NODE_HEIGHT;
m_x=0;
m_y=0;
m_pRC=NULL;
m_pRgn=NULL;
m_pPath=NULL;
}
BOOL WFNode::CalcMe(Graphics& graphics){
if(this->m_x<0) this->m_x=0;
if(this->m_y<0) this->m_y=0;
if(this->m_selected){
this->m_bgColor=DEFAULT_BGCOLOR_HOT;
this->m_color=DEFAULT_COLOR_HOT;
}
else{
this->m_bgColor=DEFAULT_BGCOLOR;
this->m_color=DEFAULT_COLOR;
}
if(_tcslen(m_fontFamily)==0) _tcscpy_s(m_fontFamily,L"微软雅黑"); //L"宋体"
FontFamily fontFamily(m_fontFamily);
Font font(&fontFamily, this->m_fontSize, FontStyleRegular, UnitPixel);
//计算文字宽度
PointF origin(0.0f, 0.0f);
RectF boundRect;
graphics.MeasureString(this->m_caption,_tcslen(this->m_caption),&font,origin,&boundRect);
//计算节点实际矩形位置
SAFE_DEL_PTR(m_pRC);
m_pRC=new RectF(boundRect.X+this->m_x,boundRect.Y+this->m_y,boundRect.Width+(TEXTOUT_X_OFFSET*2),boundRect.Height+(TEXTOUT_Y_OFFSET*2)); //节点实际矩形位置
//RectF rc(boundRect.X+this->m_x,boundRect.Y+this->m_y,boundRect.Width+(TEXTOUT_X_OFFSET*2),this->m_height+TEXTOUT_Y_OFFSET); //节点实际矩形位置
//计算节点形状Path
SAFE_DEL_PTR(m_pPath);
m_pPath=new GraphicsPath();
UINT d=10; //圆角直径
m_pPath->AddArc(m_pRC->X,m_pRC->Y, d, d, 180, 90);
m_pPath->AddArc(m_pRC->X + m_pRC->Width - d, m_pRC->Y, d, d, 270, 90);
m_pPath->AddArc(m_pRC->X + m_pRC->Width - d, m_pRC->Y + m_pRC->Height - d, d, d, 0, 90);
m_pPath->AddArc(m_pRC->X,m_pRC->Y + m_pRC->Height - d, d, d, 90, 90);
//path.AddLine(rc.X, rc.Y + rc.Height - d, rc.X, rc.Y + d/2);
m_pPath->CloseFigure();
//计算节点Region
SAFE_DEL_PTR(m_pRgn);
m_pRgn=new Region(m_pPath);
return TRUE;
}
BOOL WFNode::Draw(Graphics& graphics){
this->CalcMe(graphics);
//绘制节点外形
Pen pen(Color(GetRValue(this->m_bgColor),GetGValue(this->m_bgColor),GetBValue(this->m_bgColor)),1);
graphics.DrawPath(&pen,m_pPath);
//填充节点形状
SolidBrush brushBG(Color(GetRValue(this->m_bgColor),GetGValue(this->m_bgColor),GetBValue(this->m_bgColor)));
graphics.FillPath(&brushBG,m_pPath);
//输出文字
if(_tcslen(m_fontFamily)==0) _tcscpy_s(m_fontFamily,L"微软雅黑"); //L"宋体"
FontFamily fontFamily(m_fontFamily);
Font font(&fontFamily, this->m_fontSize, FontStyleRegular, UnitPixel);
SolidBrush brushText(Color(GetRValue(this->m_color),GetGValue(this->m_color),GetBValue(this->m_color)));
StringFormat sf(StringFormatFlagsNoWrap);
graphics.DrawString(this->m_caption, -1, &font,PointF(m_pRC->X+TEXTOUT_X_OFFSET,m_pRC->Y+TEXTOUT_Y_OFFSET), &sf, &brushText);
return TRUE;
}
BOOL WFNode::DrawFiction(Graphics& graphics,Color* color){
this->CalcMe(graphics);
if(this->m_pPath){
Pen pen(color?*color:Color(GetRValue(this->m_bgColor),GetGValue(this->m_bgColor),GetBValue(this->m_bgColor)),1);
pen.SetDashStyle(DashStyleDot);
graphics.DrawPath(&pen,m_pPath);
}
return TRUE;
}
BOOL WFNode::IsInRegion(Point pt,Graphics* graphics){
if(!m_pRgn) return FALSE;
return m_pRgn->IsVisible(pt,graphics);
}
WFNode::~WFNode(void)
{
SAFE_DEL_PTR(m_pRC);
SAFE_DEL_PTR(m_pRgn);
SAFE_DEL_PTR(m_pPath);
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

腾硕云办公平台(discoverx2)客户端组件(办公小助手、低版本IE可视化流程编辑COM控件等)源码。
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/springjava/vc-client.git
git@gitee.com:springjava/vc-client.git
springjava
vc-client
vc-client
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /