[导入]Netron研究(一)----初识

    最近一个项目,涉及到一个图形设计器.类似于Visio的设计器,可以直接在窗体上进行某些图形结构的设计,并支持窗体内的拖动,连线等等...于是开始研究一个开源项目Netron Graph Library,争取尽早摸清其实质,改造一个适合我们项目的图形设计器出来.(目前只研究Netron的light版本,因为对于我们设计器的要求,他已经足够强大,并且还算PP:)
    先来看Netron Light的运行效果
    original.aspx
    还算简洁漂亮吧:)虽说没有Visio那么强大,但是支持基本的图形设计,拖动,任意连线,图形大小,颜色设置等等.下面,就从大体上分析一下其设计实现原理.首先,根据其源代码,可以得到下面这张关键的类图:
    original.aspx
    对该类图进行一下简单的说明:
    Netron Light中,有三个关键的实体/类,ShapeBase----Netron中的核心,代表一个图形实体(具体图形对象的基类).Connection----两个图形实体间的连线.Connector----连接点实体(图形实体四周四个白色的小点).这三个类都继承自一个抽象类Entity.另外Netron Light实现了三个类继承自ShapeBase----OvalShpe(椭圆),SimpleRectangle(矩形),TextLabel(文本).这样,我们就可以实现自己的类继承自ShapeBase,以展现更多的图形(比如点图,目前还有个想法,看这个具体的类是否能够显示一张具体的图片,这样就能实现更多灵活的配置,并能得到更好的显示效果,有待深入研究).
    大体上对Netron Light有了一个认识,接下来的随笔将深入其内部,研究其实现.

----2005.12.21 22:43 星期三   

aggbug.aspx?PostID=290
文章来源: http://www.agilelabs.cn/blogs/woody/archive/2005/12/21/290.aspx

转载于:https://www.cnblogs.com/veryverygood/archive/2006/01/16/318055.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
netronlight .net开源流程图类库,类似visio,这个较轻量级版本多出不少东西。支持Group,支持Undo。但有些东西实现的较为啰嗦。不过不失为一个学习和再开发的项目。 Netron Light v2.5 pre-release The final release will be v3.0 around the summer 2006. You can however rely on the current interfaces and base classes, the core is stable. Many things are still missing in this pre-release but I have also stripped many features and things like documentation, unit tests, code comments, ASP.Net features and so on. While all the code is yours you'll have to register (it'll be around $50,-) for the documentation and all the fancy stuff. I hope to complete the 'ultimate guide to diagramming in C#' by the summer which will be accessible to registered users. Support is still kinda of a problem since I have little time. I hope the Netron forum will continue to deliver support and inspire (thanks to all who keep an eye on the forum). I have considered sort of billable consultancy and delivering custom versions of the diagram control(s) but I fear I don't have enough time and quiting my job to work full-time on Netron is an unreachable dream. Thanks to all of you who have donated to Netron and support this project by Email, chat or via the forum. I hope this pre-release will make you happy in the same way I enjoyed creating it. I beleive it contains a lot of stuff to explore and it's a little pearl of design. Thanks for downloading this, Francois [Francois.Vanderseypen@netronproject.com]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值