Coder Social home page Coder Social logo

sf-svg's Introduction

sf-svg

SFML-based library to draw .svg files and Bézier Curves.

What it does:

  • SVG images drawing;
  • Loading SVG from files / memory / stream;
  • SVG rasterization;
  • Implements Square- and Cubic Bézier curves;
  • Curves inherit sf::Shape;
  • Provides interface for Bézier curves;
  • Provides debug-friendly features like "helper lines" etc.

What it lacks (yet):

  • n-th level Bézier curves;
  • Better rasterizer.

Documentation

You can find docs here.
Generated using doxygen, It's not good-looking, but I don't have time to change doxygen's .css files.

Usage:

Compilation

$ git clone https://github.com/KoczurekK/sf-svg.git
$ cd sf-svg
$ qmake curves-shared.pro
$ make

Installation & usage

Copy SFC headers to /usr/include/SFC or to any other path supported on your OS. Then copy .so/.dll files wherever you want to and remember to pass linker option -lsfsvg.

sf-svg's People

Contributors

kamirr avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

sf-svg's Issues

SIGABRT after window resize

Hi! I need draw colored (with alpha-channel) svg images in my program. And I want resize window and scale svg to fill window. So, I rasterize svg with needed scale factor to Image, then create Texture from Image, and apply this Texture to RectangleShape. But when I resize window (not always) I get SIGABRT on this line, or this line or this.

I created test project to reproduce this issue (your should pass path to svg in arguments, and press down to set window size 800x450, but this size may not work)

https://github.com/KillWolfVlad/sf-svg-SIGABRT

My environment is Arch Linux GNOME 3 on Xorg (intel modesetting) with latest update from official repo. But I have this issue on Ubuntu 16.04 (in VirtualBox) and Windows (sf-svg compiles only in STATIC mode, and need invoke rasterize before drawing, because resize event is not handled after launch).

I think it is bug in nanosvg, but sf-svg fork is older than upstream.

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.