Coder Social home page Coder Social logo

pyro's Introduction

Pyro graphics library

Build and test

Graphics library used for generation of images

This library is made for use in my own artistic practise, and comes with no guarnatees of quality. It is heavly influenced by Processing, but at the time has no functionality for real time graphics and no 3D graphics functionality.

It's primary use is for generating still images with 2D graphics, and functionality is implemented as I need it.

The state of the whole thing is not really userfriendly at the moment, but hopefully that will improve in the future.

Dependencies

Library Version License
Cairo 1.14.x LGPL/MPL
Freetype 2 2.10.1 Freetype project License
SDL 2.x zlib
libjpeg-turbo 2.0.3
libpng 1.6.37 PNG Reference Library License version 2
Catch2 2.13.7-1 BSL-1.0

Building

Using Meson

meson build
ninja -C build

Install

ninja -C build install

Run tests

ninja -C build test

Build an example

make ./examples/graphics/piechart

Usage

A very simple example

#include <pyro/pyro.h>

using namespace Pyro

int main(int argc, char **argv) {
    size(1920, 1080);
    translate(width / 2, height / 2);
    ellipse(0, 0, 50, 50);
    save("test.png");
}

Save as mytest.cpp, do a make mytest, and you should have an executable.

Tests

Some tests have been implemented using Catch2

Installing

If you run make install at the moment, it is just doing some dumb stuff to get it installed on Mac. You can then compile and link a file with something like: g++ -MMD -MP -lpyro -std=c++17 somefile.cpp

Todo

  • Write a better install target
  • Make a configure script?
  • Write some abstraction to make possible different backends for rendering

Included resources

fonts/Orkney *.otf is used under the OFL license.

tests/alley.jpg and tests/ducks.jpg is copyrighted by Greger Stolt Nilsen, used with permission as test data for this library, and can only be distributed as such.

pyro's People

Contributors

gregersn avatar

Stargazers

Anders Lassen avatar Xhark avatar

Watchers

James Cloos avatar  avatar

pyro's Issues

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.