Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SVG Support  (Read 3749 times)

0 Members and 1 Guest are viewing this topic.

rhaase

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
SVG Support
« on: September 23, 2014, 01:08:34 am »
The image loading support for SFML with textures and sprites is good, but I would like to target variable size screens with pristine graphics :-)

I looked around and saw some suggestions in past posts for cairo or imagemagik, but it like something in the spirit of SimpleFast... and I think that the rest of the community could benefit as well.

Any ideas?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SVG Support
« Reply #1 on: September 23, 2014, 06:57:24 am »
Any ideas?
Do you have any? :)

There have been discussions about vector graphics in the past, make sure you read all of them. I think some people have even written working extensions.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

rhaase

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: SVG Support
« Reply #2 on: September 25, 2014, 04:41:00 am »
Not an easy idea.  I saw a couple implementations, but nothing super easy or light to drop in.  Asked my friend to help with more research.  I'll ask him to start with researching the forums more.  Thanks for the suggestion.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: SVG Support
« Reply #3 on: September 25, 2014, 09:49:38 pm »
I guess the most tricky part here is most would expect "all or nothing" regarding specifications.

I've looked into this in the past myself, and there are subsets of SVG (like the Tiny spec), which would be more feasible to support for the start, but even then there are quite a few things that would get very tricky (like intersections).

Think having a complete spec would probably against "easy" and/or "light", but at the same time it would be nice being able to load svg graphics, even if we're talking about simple shapes and outlines only.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SVG Support
« Reply #4 on: September 25, 2014, 09:58:26 pm »
Who said we would need to write the rasterizer ourselves? Just looking around I found this which may be a good starting point.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

rhaase

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: SVG Support
« Reply #5 on: September 26, 2014, 12:42:04 am »
that looks super promising.  I'll give it a shot

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: SVG Support
« Reply #6 on: November 17, 2014, 03:01:21 am »
I think since the Android SFML port, SVG is a near-future necessity. Imagine having to provide a 1920x1080 image for a portion of a 2k Android screen, and then proving some smaller images just for the lower powered devices. It's only going to get worse as higher density screens kick in.

 

anything