Author Topic: Apparent bug in SVG implementation  (Read 2585 times)

Snarky

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Apparent bug in SVG implementation
« on: November 29, 2013, 04:34:29 am »
Please excuse my stupidity, I could not find how to get registered with Mantis.

I started trying Scribus couple days ago and found the following

<!-- PLEASE IMPORT THIS SVG TO 1.4.3-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">

<!-- The following renders as red -->
<path d="M20 80 l40 40 l40 -40 l-40 -40 Z" stroke="red" stroke-width="1" fill="none"/>

<!-- and this looks black -->
<path d="M100 60 l40 40 l40 -40 l-40 -40 Z" stroke="rgb(256,0,0)" stroke-width="1" fill="none"/>

</svg>


samps

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
  • Code monkey with an artistic streak...
Re: Apparent bug in SVG implementation
« Reply #1 on: November 29, 2013, 05:44:38 am »
I think the error is caused by the value for 'red' in the rgb(xxx,yyy,zzz) is out of range and has 'rolled over' to 0:

try rgb(255,0,0) instead (works in 1.5.0SVN anyway)


Samps

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Apparent bug in SVG implementation
« Reply #2 on: November 29, 2013, 02:40:02 pm »
Snarky, try loading the SVG into Inkscape and saving a new copy before importing into Scribus. That usually works for me when I have an SVG that isn't playing ball.

Note that Scribus can't handle all of the latest SVG functionality. For example, transparencies on gradients don't work.

P.S. The registration screen on Mantis went missing a while back - even the direct link to it from the Wiki doesn't work anymore - and the problem has been reported (by a.l.e. I think, but I can't be sure).

Nermander

  • Hero Member
  • *****
  • Posts: 1236
  • Karma: 16
Re: Apparent bug in SVG implementation
« Reply #3 on: November 29, 2013, 03:02:44 pm »
Wasn't the registration form removed to stop spam accounts?

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Apparent bug in SVG implementation
« Reply #4 on: November 29, 2013, 03:28:57 pm »
Nermander, I've no idea why it was removed but your suggestion sounds about right.

However, not putting something else in its place doesn't give users much confidence in how their problems are handled.

If an email registration path - as there is for the Wiki - was introduced it might help people to report problems and feel less frustrated.

But there's always the argument that problems should be discussed on the forum first and then, when there's a consensus about what the problem actually is - if there is actually a problem - a more complete bug report can be compiled.

Having done some help desk duty in my past I can recommend this option but I'm sure others will argue against it and their reasoning will be sound. It should really depend on what the developers want but most of them probably don't read this forum.

The link on http://wiki.scribus.net/canvas/How_to_file_a_bug_report just takes you to the Mantic home page. I'd say the page needs to be changed until something is done about all this but any change needs to be made "officially" by someone in authority.

Snarky

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Re: Apparent bug in SVG implementation
« Reply #5 on: November 29, 2013, 05:30:23 pm »
I think the error is caused by the value for 'red' in the rgb(xxx,yyy,zzz) is out of range and has 'rolled over' to 0:

try rgb(255,0,0) instead (works in 1.5.0SVN anyway)


Samps

Thank you very much Samps, Yesterday I should have gone to bed instead of messaging your guys. Yes, it was because of 256 instead of 255. I tried this SVG in Firefox, which rendered it as red, that's why I believed something was wrong with Scribus.

Thank you everybody, I actually started exporting from LibreOffice, and it did not look good. And Scribus was handling those pictures sooo slow, I could not believe this was normal. So I looked into LO's SVG code, and wrote a generator producing the simplest possible SVG from text files describing my pictures. I've never written in SVG before (and I don't write programs very often). The actual mistake was in my conversion table.