Git Product home page Git Product logo

lib2geom's Introduction

2Geom: easy 2D graphics library

What is this?

2Geom is a C++ 2D geometry library geared towards robust processing of computational geometry data associated with vector graphics. The primary design consideration is ease of use and clarity. It is dual-licensed under LGPL 2.1 and MPL 1.1.

The library is descended from a set of geometric routines present in Inkscape, a vector graphics editor based around the Scalable Vector Graphics format, the most widespread vector graphics interchange format on the Web and a W3C Recommendation. Due to this legacy, not all parts of the API form a coherent whole (yet).

Rendering is outside the scope of this library, and it is assumed something like libcairo or similar is employed for this. 2geom concentrates on higher level algorithms and geometric computations.

Features List

  • C++ 11
  • Functional programming style.
  • Points
  • Efficient affine transformations
  • Rectangles
  • Convex Hulls
  • Bounded error
  • General purpose paths:
    • Exact elliptical arcs
    • Area
    • Centroid and bending moments
  • Path Locations:
    • Determination of special spots (e.g. maximum curvature)
    • Splitting
    • Point, tangent, curvature at location
    • Efficient arc length and inverse arc length
  • Path algebra:
    • Computations such as offset curves can be written with their mathematical definition and still get a bounded error, efficient curve. (preliminary trials indicate offset done this way out performs the method used in Inkscape)
  • Arbitrary distortion (with bounded error):
    • Mesh distorts
    • Computational distorts such as the GIMP's 'vortex' plugin
    • 3d mapping (perspective, flag, sphere)
  • Exact boolean ops (elliptic arcs remain elliptic arcs)
  • Efficient 2d database
  • Implicit function plotting
  • NURBs input and output
  • Tunable path simplification
  • PDoF constraint system for CAD/CAGD

Dependencies

To build 2Geom, you will need:

Building

2Geom uses CMake as the build and configuration system. To build, type:

cmake .
make

To run tests:

make test

Also check out some of the interactive programs in src/toys.

Documentation is generated from source comments using Doxygen. Run doxygen in the project root to generate documentation in doc/html.

API / ABI Stability

Version 1.0 of 2Geom marks its first official release. With this release the library's API/ABI is considered stable:

  • All public APIs will not be renamed or have their parameters changed without providing backwards-compatible aliases.

  • New functionality added to these APIs will not change their meaning or fundamental behaviors.

  • If an API needs to be removed or replaced, it will be declared deprecated but will remain in the API until the next major version. Warnings will be issued when the deprecated method is called.

  • We'll only break backwards compatibility of these APIs if a bug or security hole makes it completely unavoidable.

Improvements that would break the API/ABI will be noted in our bug tracker, for a future Version 2.0 release.

Further information

Communications related to 2Geom development happen on a SourceForge mailing list.

The primary user of 2Geom is Inkscape. API-breaking changes to 2Geom will require corresponding changes to Inkscape.

lib2geom's People

Contributors

njhurst avatar mgsloan avatar tweenk avatar acspike avatar mcecchetti avatar verbalshadow avatar maxalbert avatar jpulmann avatar ede123 avatar bryceharrington avatar alvinpenner avatar mjwybrow avatar dvlierop avatar kdgussem avatar tgdwyer avatar caryoscelus avatar luzpaz avatar objarni avatar mclegrand avatar scislac avatar engelmarkus avatar vbarrielle avatar abrock avatar liamwhite avatar pfh avatar tavmjong avatar jabiertxof avatar

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.