开发者

Graphic editor opensource project example on c++ underlying composite pattern [closed]

开发者 https://www.devze.com 2023-02-01 23:20 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

Can you tell me where I can see a s开发者_运维问答ome opensource project (only project on C++ language), which is simple graphic editor, сontaining following primitive (for example): an ellipse, a rectangle, a line. And desirable, that to be able to group this primitive in one primitive (for example, Word Grouping -> Group). Composite pattern use is desirable in this project. I want to see how to organize classes, but more serious for me is to see how organize grouping operation.

I searched for it on codeproject.com codeproject.com, codeplex.com, but not found this.

I have already some source http://pastebin.com/xe4JF5PW

But in my opinion, this code is dirty and ugly. Therefore, I want to see some opensource project for example. Thanks!

Graphic editor opensource project example on c++ underlying composite pattern [closed]


In the GoF book "Design Patterns : Elements of Reusable Object-Oriented Software", there is a Case-Study that shows how to employ the patterns. They namely describe the way to use the Composite design pattern for graphical purpose. (Using Glyphs, a glyphs being a graphical component).

They base their case-study on a real text/graphical editor called Lexi.

Unluckily for you, the code is in DELPHI, not C++. But the code is here: LEXI.

However, it is explained among the thourough explanations of the Gang of Four book. You should take a look at the book if the site explanations aren't clear enough.


Inkscape might be what your searching for, it is a popular open source vector graphics editor written (mostly) in c++.

https://code.edge.launchpad.net/~inkscape.dev

0

精彩评论

暂无评论...
验证码 换一张
取 消