GithubHelp home page GithubHelp logo

libcg's People

Contributors

jianjunjiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcg's Issues

绘制时未调用cg_move_to会导致崩溃问题

执行如下代码,当注释掉cg_move_to(ctx, 0, 0);时程序运行会崩溃
`static void crash_test(const char* filename)
{
struct cg_surface_t* surface = cg_surface_create(256, 256);
struct cg_ctx_t* ctx = cg_create(surface);

//cg_move_to(ctx, 0, 0);
cg_line_to(ctx, 256.0, 256.0);

cg_set_line_width(ctx, 10.0);
cg_stroke(ctx);

cg_surface_write_to_png(surface, filename);
cg_destroy(ctx);
cg_surface_destroy(surface);

}
`

build on macOS not possible -> error: aliases are not supported on darwin

tried to build on macOS on Ventura (13.6.1 (22G213))

$ gcc --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

and get the error message:
error: aliases are not supported on darwin.
Same for clang.

Confusion

I am confused with some of the syntax and wondered if you could help me out.

(I am new to this library and programming in c)

Here is my code

Screenshot 2024-01-04 10 39 25 AM
Screenshot 2024-01-04 10 40 09 AM
Screenshot 2024-01-04 10 40 16 AM

conflicting main.c files

In the examples folder there is a file called main.c.

When using this library, that file conflicts with the main.c file used in the actual project.

To fix this I had to delete both the screenshots folder and the examples folder in the project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.