tyoma / agge Goto Github PK
View Code? Open in Web Editor NEWAnti-Grain Evolution. 2D graphics engine for Speed and Quality in C++.
License: MIT License
Anti-Grain Evolution. 2D graphics engine for Speed and Quality in C++.
License: MIT License
../src/agge/parallel.cpp:21:68: error: arithmetic on a pointer to an incomplete type 'agge::parallel::thread'
../src/agge/parallel.cpp:22:12: error: allocation of incomplete type 'agge::parallel::thread'
../src/agge/parallel.cpp:39:11: error: subscript of pointer to incomplete type 'agge::parallel::thread'
../src/agge/parallel.cpp:40:11: error: subscript of pointer to incomplete type 'agge::parallel::thread'
../src/agge/parallel.cpp:44:11: error: subscript of pointer to incomplete type 'agge::parallel::thread'
../src/agge/parallel.cpp:52:11: error: subscript of pointer to incomplete type 'agge::parallel::thread'
../agge/memory.h:33:11: error: invalid application of 'sizeof' to an incomplete type 'agge::parallel::thread'
../agge.text/font.h:51:16: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
../agge.text/font.h:48:47: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
../agge.text/font.h:51:16: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
../agge.text/font.h:48:47: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
../agge.text/font.h:51:16: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
../agge.text/font.h:48:47: error: implicit instantiation of undefined template 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1991:29: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1996:23: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:2003:16: error: static_cast from 'pointer' (aka 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *> *') to '__next_pointer' (aka 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font> >, void *> *> *'), which are not related by inheritance, is not allowed
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1991:29: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1996:23: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:2003:16: error: static_cast from 'pointer' (aka 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *> *') to '__next_pointer' (aka 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::weak_ptr<agge::font::accessor> >, void *> *> *'), which are not related by inheritance, is not allowed
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1991:29: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:1996:23: error: cannot initialize object parameter of type 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *> *>' with an expression of type 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *>'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__hash_table:2003:16: error: static_cast from 'pointer' (aka 'std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *> *') to '__next_pointer' (aka 'std::__1::__hash_node_base<std::__1::__hash_node<std::__1::__hash_value_type<agge::font::key, std::__1::pair<agge::font *, unsigned int> >, void *> *> *'), which are not related by inheritance, is not allowed
This is using a fairly up to date clang
-suite on MacOS. Might I suggest adding the -Wall -Wextra -Werror
and -std=c++11
(or appropriate standard) flags in your CMakeLists.txt for applicable platforms? It'll help the robustnest of the code.
Hi there!
Great to see this library :) I'm interested to know if you've done any performance comparisons between agg and agge that you'd be willing to share? Very interested to see what your improvements are!
Also, I note that on the surface you have cut down dramatically on the number of source files compared to the original. Is this because you have simplified it, or have you implemented only a subset of the original features?
All the best,
Projectitis
Is support for Apple sillicon planned ? For the moment it won't compile :
[build] /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
[build] #error "This header is only meant to be used on x86 and x64 architecture"
agge::text_engine::render_string shall append ellipsis to a string that is not fully displayed.
The project is nice, but there are 2 libraries strmd and utee, could somebody indicate what utee is and where I can find it?
Can you add cmakelists.txt to the projects under the samples directory?
font_loader.cpp :
#include <strmd/type_traits_ex.h>
I can not insist here. It is your code. So if you want to look into them.
If you agree on some of those updates I could make some smaller issues for myself and PRs.
This issue is way too big to be done all at once.
So what I've noticed.
0. What is target C++ standard for this library?
In example with balls-async there was unique_ptr. So it looks like C++11 at least.
So maybe one could shift code there. As I looked in class dash
I saw C++2003 style.
I understand you migrated it from agg. And probably have no time for being C++11 code idealist.
When I contemplated agg I wanted to make it more expressive and functional style-like.
(Ex. similar to C++20 ranges)
And looks like you also trying to write less types.
The pattern in picture above is piping. So one can just overload binary operator of preference for it to mean "pipe source with generator (decorator?)". So, code above will look like one of examples depending on preference:
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)|dash_style|line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)/dash_style/line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)^dash_style^line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)+dash_style+line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)>>dash_style>>line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)>dash_style>line_style
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)<=dash_style<=line_style
Looking at these now most distinctive is IMO "^".
Operators +-*/% could be in parameters of line, |&% are hard to see.
Shift and comparison may be toooo confusing here.
And ^ stands out in this expression as natural separator making it easy to read.
Or (I like it less) one can add template method named ex .with
:
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale).with(dash_style).with(line_style)
.
Actually template overloading of operators without restrictions is unsafe.
One should use sort of dispatch techniques or concepts. But this can be done right!
GeneratorT &&_generator;
template <typename SourceT, typename GeneratorT>
inline path_generator_adapter<SourceT, GeneratorT>::path_generator_adapter(const SourceT &source, GeneratorT &&generator)
: _source(source), _generator(std::forward<GeneratorT>(generator)), _state(initial)
{ }
and in assist (or operator of preference 😄):
template <typename SourceT, typename GeneratorT>
path_generator_adapter<SourceT, GeneratorT> assist(const SourceT &source, GeneratorT &&generator)
{ return path_generator_adapter<SourceT, GeneratorT>(source, std::forward<GeneratorT>(generator)); }
And default move and copy constructors.
Why bother?
With this you can use on a fly construction like:
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)^create_some_custom_line_style(some_params)
line(19.5f*scale, 300.5f*scale, 319.5f*scale, 300.5f*scale)
^dash().add_dash(1.0f*scale, 1.0f*scale).dash_start(0.5f*scale)
^line_style.width(1.0f*scale).set_cap(caps::butt());
dash::remove_all_dashes()
can be renamed as clear()
when reused.dash().add(1.0f*scale, 1.0f*scale).start(0.5f*scale)
?I see those are public methods and there are "public but actually not for user" methods to generate vertexes.
Will study further.
That's it by now.
BR, Daniel
agge::stroke shall allow setting distinct start and end caps in order to display arrows.
Really happy to see Anti-Grain Evolution !
Thank you for this !
Do you have any plans to use C++17 or at least C++14 for it ?
Asking this because there are bunch of std::auto_ptr in the code and other pre C++11 code.
Hi, Artem,
Thank you for developing this library!
I've always dreamed about backend as agg for plotting.
I was astonished my Maxim's work. (It is still big loss for C++ community that Maxim passed away in 2013).
Unfortunately, I wasn't able to totally grasp his library.
I know python's matplotlib uses agg as backend.
So I was thinking to find something as good in implementation details but with modern C++ interfaces to use as backend.
And I'm glad I've found agge.
In answer to issue question about performance you mentioned you use agge for charts on your main work.
If you already have charts is it possible to share this library in github?
Otherwise, I'd write my own (if I don't burn out 😄) and bombard you with questions in the process.
I also want to implement 3d-line plots in 3d-axes as matplotlib does.
I want this plotting library to be able to render huge time series in almost real time, i.e. as fast as possible.
So agge backend looks very attractive for this matter, too.
Actually, I want to use plotting library in my data visualisation project.
And for GUI I plan to use slint-ui.
They do not have plotting library, and I can render plot in buffer there.
(There is Rust library called plotters I tried to use. But I'm not happy with it's backend.
I'd want different linestyles. I even proposed some ideas there and implemented them by "forking and breaking". But I'm not sure those will be there any tine. And I'm not that good in Rust, I guess.)
And agge go same approach agg did. So agge already has all functionality I need. Backend is floating point, too.
I'm not sure if antialiasing is made. Because I see pixelised saws on knot edges
Maybe, it is already aliased, and I have way too big monitor. And I'm too picky. 😅
To finalize all my wordy essay, I have some questions.
0. Consider opening discussions section, because issues is hard way to contact you.
There Is also show and tell section. I could share some code snippets there.
Thank you for library once again. I'll study it this weekend, definetely.
Best Regards,
Daniel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.