Coder Social home page Coder Social logo

Comments (4)

djhoese avatar djhoese commented on June 8, 2024 1

This is not the answer you are looking for, but I don't think I (one of the maintainers of this project) know exactly. I've done the bare minimum to keep this library available, but don't actually know how to do most things with it. Here are the methods you can call from the Draw object:

aggdraw/aggdraw.cxx

Lines 1735 to 1750 in bd751fc

{"line", (PyCFunction) draw_line, METH_VARARGS, draw_line_doc},
{"polygon", (PyCFunction) draw_polygon, METH_VARARGS, draw_polygon_doc},
{"rectangle", (PyCFunction) draw_rectangle, METH_VARARGS, draw_rectangle_doc},
#if defined(HAVE_FREETYPE2)
{"text", (PyCFunction) draw_text, METH_VARARGS, draw_text_doc},
{"textsize", (PyCFunction) draw_textsize, METH_VARARGS, draw_textsize_doc},
#endif
{"path", (PyCFunction) draw_path, METH_VARARGS, draw_path_doc},
{"symbol", (PyCFunction) draw_symbol, METH_VARARGS, draw_symbol_doc},
{"arc", (PyCFunction) draw_arc, METH_VARARGS, draw_arc_doc},
{"chord", (PyCFunction) draw_chord, METH_VARARGS, draw_chord_doc},
{"ellipse", (PyCFunction) draw_ellipse, METH_VARARGS, draw_ellipse_doc},
{"pieslice", (PyCFunction) draw_pieslice, METH_VARARGS, draw_pieslice_doc},

So you can create a rectangle directly from this or you could use a Symbol to define an SVG element: https://aggdraw.readthedocs.io/en/latest/#aggdraw.Symbol
You could also look at the various Pen options for how the line joins should be done:
https://aggdraw.readthedocs.io/en/latest/#aggdraw.Pen

Last resort, you can define the exact line paths yourself.

Side note: I don't remember why, but the Draw methods aren't showing up in the docs, sorry.

from aggdraw.

djhoese avatar djhoese commented on June 8, 2024

Do you have more details on your question? For example...what is a squircle?

from aggdraw.

ahmed4end avatar ahmed4end commented on June 8, 2024

@djhoese squircle is a rectangle with rounded edges

from aggdraw.

ahmed4end avatar ahmed4end commented on June 8, 2024

@djhoese cool, i will mess around with funcs to create it, thanks for keeping the awesome lib alive ♥

from aggdraw.

Related Issues (20)

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.