[vwnc] Reading SVG

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Reading SVG

Annick
Hi,

I am interested in vector graphics, and I tried to run the CairoDemo  
from Cincom repository to display SVG files, but the example is  
missing the wrapper for the LIBRSVG library.
Where can I find it ?

Annick Fron

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Maarten Mostert-2

If you loaded Cairo you're supposed to have a class named SVGSurface containing

initPath: aFilepath pointWidth: aWidthInPoints pointHeight: aHeightInPoints

@+Maarten,


> Message du 15/09/08 11:49

> De : "Annick Fron"
> A : "VW NC"
> Copie à :
> Objet : [vwnc] Reading SVG
>
>
> Hi,
>
> I am interested in vector graphics, and I tried to run the CairoDemo
> from Cincom repository to display SVG files, but the example is
> missing the wrapper for the LIBRSVG library.
> Where can I find it ?
>
> Annick Fron
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Annick
In reply to this post by Annick
Hi,

This is what I did, but I get a memory error in the following code :

View>>draw: cairoGC
| surface |

        "LibRSVG rsvg_init." "? not needed ?"
  filename isNil ifTrue: [ filename := FileDialog
                                requestFileName: 'Select an SVG file'
                                default: '*.svg'
                                version: #mustBeOld
                                ifFail: []
                                for: nil].
        filename notNil ifTrue: [
        surface :=SVGSurface path: filename pointWidth: self bounds width  
pointHeight: self bounds height .

       
                cairoGC
                sourceSurface: surface;
                paint]

Best regards


Le 15 sept. 08 à 14:47, Maarten MOSTERT a écrit :

> If you Cairo loaded you're supposed to have a class named  
> SVGSurface containing
>
> initPath: aFilepath pointWidth: aWidthInPoints pointHeight:  
> aHeightInPoints
>
>
> @+Maarten,
>
> > Message du 15/09/08 11:49
> > De : "Annick Fron"
> > A : "VW NC"
> > Copie à :
> > Objet : [vwnc] Reading SVG
> >
> >
> > Hi,
> >
> > I am interested in vector graphics, and I tried to run the CairoDemo
> > from Cincom repository to display SVG files, but the example is
> > missing the wrapper for the LIBRSVG library.
> > Where can I find it ?
> >
> > Annick Fron
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> >
> >



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Maarten Mostert-2
Hi Annick,

Oh yes Cairo gives you lot of scaring memory messages.
My experience is that you can safely ignore these at least on Windows.
The Mac howver goes down when using text and many many many contexts.
Try modifing the notifier not to raise and see if it breaks.

Regards,

@+Maarten,


Annick Fron a écrit :

>
> Hi,
>
> This is what I did, but I get a memory error in the following code :
>
> View>>draw: cairoGC
> | surface |
>
>     "LibRSVG rsvg_init." "? not needed ?"
>  filename isNil ifTrue: [    filename := FileDialog
>                 requestFileName: 'Select an SVG file'
>                 default: '*.svg'
>                 version: #mustBeOld
>                 ifFail: []
>                 for: nil].
>     filename notNil ifTrue: [
>     surface :=SVGSurface path: filename pointWidth: self bounds width
> pointHeight: self bounds height .
>
>    
>         cairoGC
>         sourceSurface: surface;
>         paint]
>
> Best regards
>
>
> Le 15 sept. 08 à 14:47, Maarten MOSTERT a écrit :
>
>> If you Cairo loaded you're supposed to have a class named SVGSurface
>> containing
>>
>> initPath: aFilepath pointWidth: aWidthInPoints pointHeight:
>> aHeightInPoints
>>
>>
>> @+Maarten,
>>
>> > Message du 15/09/08 11:49
>> > De : "Annick Fron"
>> > A : "VW NC"
>> > Copie à :
>> > Objet : [vwnc] Reading SVG
>> >
>> >
>> > Hi,
>> >
>> > I am interested in vector graphics, and I tried to run the CairoDemo
>> > from Cincom repository to display SVG files, but the example is
>> > missing the wrapper for the LIBRSVG library.
>> > Where can I find it ?
>> >
>> > Annick Fron
>> >
>> > _______________________________________________
>> > vwnc mailing list
>> > [hidden email]
>> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>> >
>> >
>
>
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Annick
Looking into cairo doc, I think the problem is to match the sizes of  
the cairo graphics context.

The svg surface has its own and the window also, so how can I match  
them ?

Le 15 sept. 08 à 22:20, Maarten Mostert a écrit :

> Hi Annick,
>
> Oh yes Cairo gives you lot of scaring memory messages. My  
> experience is that you can safely ignore these at least on Windows.
> The Mac howver goes down when using text and many many many contexts.
> Try modifing the notifier not to raise and see if it breaks.
>
> Regards,
>
> @+Maarten,
>
>
> Annick Fron a écrit :
>>
>> Hi,
>>
>> This is what I did, but I get a memory error in the following code :
>>
>> View>>draw: cairoGC
>> | surface |
>>
>>     "LibRSVG rsvg_init." "? not needed ?"
>>  filename isNil ifTrue: [    filename := FileDialog
>>                 requestFileName: 'Select an SVG file'
>>                 default: '*.svg'
>>                 version: #mustBeOld
>>                 ifFail: []
>>                 for: nil].
>>     filename notNil ifTrue: [
>>     surface :=SVGSurface path: filename pointWidth: self bounds  
>> width pointHeight: self bounds height .
>>
>>             cairoGC
>>         sourceSurface: surface;
>>         paint]
>>
>> Best regards
>>
>>
>> Le 15 sept. 08 à 14:47, Maarten MOSTERT a écrit :
>>
>>> If you Cairo loaded you're supposed to have a class named  
>>> SVGSurface containing
>>>
>>> initPath: aFilepath pointWidth: aWidthInPoints pointHeight:  
>>> aHeightInPoints
>>>
>>>
>>> @+Maarten,
>>>
>>> > Message du 15/09/08 11:49
>>> > De : "Annick Fron"
>>> > A : "VW NC"
>>> > Copie à :
>>> > Objet : [vwnc] Reading SVG
>>> >
>>> >
>>> > Hi,
>>> >
>>> > I am interested in vector graphics, and I tried to run the  
>>> CairoDemo
>>> > from Cincom repository to display SVG files, but the example is
>>> > missing the wrapper for the LIBRSVG library.
>>> > Where can I find it ?
>>> >
>>> > Annick Fron
>>> >
>>> > _______________________________________________
>>> > vwnc mailing list
>>> > [hidden email]
>>> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>> >
>>> >
>>
>>
>>
>
>
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Travis Griggs-3
In reply to this post by Annick
On Sep 15, 2008, at 2:09 AM, Annick Fron wrote:

> Hi,
>
> I am interested in vector graphics, and I tried to run the CairoDemo
> from Cincom repository to display SVG files, but the example is
> missing the wrapper for the LIBRSVG library.
> Where can I find it ?


The Cairo libraries have the ability to _create_ SVG files. One  
creates an SVGSurface and the draws to it. By sending #finish to the  
surface I believe, the file is fully flushed to disk.

Cairo does NOT have the ability to read in and display SVG files. It  
has most of the requirements required to render SVG content (blurring  
being the only exception I'm aware of). But it has no API for the  
actual interpretation itself. The current position, is that that  
functionality does not belong in the core of Cairo.

This can be confusing looking at some of the old samples out there,  
because for a short time, they entertained integrating what would  
eventually become librsvg. This was not to be (for good reasons) though.

I have started work on an SVG renderer that renders an SVG DOM on a  
Cairo surface. It's very much in its infancy. Others have done similar  
things in other language bindings.

--
Travis Griggs
Objologist
"You A students, you'll be back soon teaching here with me. You B  
students, you'll actually go on to be real engineers. You C students,  
you'll go into management and tell the A and B students what to do." -  
My Fluid Dynamics Professor whom I have yet to disprove


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Steffen Märcker
Hi Travis,

that's interesting, because two years ago I've developed a prototype  
application that uses svg for its graphical components. Therefore I have  
implemented a very basic SVG reader mapping the SVG functions I've needed  
to Visual Works graphic objects.
How far has your effort come?

Regards,
Steffen



> I have started work on an SVG renderer that renders an SVG DOM on a
> Cairo surface. It's very much in its infancy. Others have done similar
> things in other language bindings.
>
> --
> Travis Griggs
> Objologist
> "You A students, you'll be back soon teaching here with me. You B
> students, you'll actually go on to be real engineers. You C students,
> you'll go into management and tell the A and B students what to do." -
> My Fluid Dynamics Professor whom I have yet to disprove
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Robin Barendregt
FWIW, I've done a bit of work on an SVG renderer some time ago, as a hobby project. I had given up at a certain point because of VW's lacking graphical capabilities, but started on a Cairo-based renderer when Travis began the Cairo binding. It can render shapes, paths, gradients and some very rudimentary text.
I could publish it to the public repository, if it interests anyone.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steffen Märcker
Sent: donderdag 18 september 2008 18:33
To: Travis Griggs; VW NC
Subject: Re: [vwnc] Reading SVG

Hi Travis,

that's interesting, because two years ago I've developed a prototype  
application that uses svg for its graphical components. Therefore I have  
implemented a very basic SVG reader mapping the SVG functions I've needed  
to Visual Works graphic objects.
How far has your effort come?

Regards,
Steffen



> I have started work on an SVG renderer that renders an SVG DOM on a
> Cairo surface. It's very much in its infancy. Others have done similar
> things in other language bindings.
>
> --
> Travis Griggs
> Objologist
> "You A students, you'll be back soon teaching here with me. You B
> students, you'll actually go on to be real engineers. You C students,
> you'll go into management and tell the A and B students what to do." -
> My Fluid Dynamics Professor whom I have yet to disprove
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Steffen Märcker
Oh yes, I am very interested to see what you've done. Perhaps this gets  
even more attention and a living project evolves which I can contribute to.

Cheers!
Steffen

Am 18.09.2008, 20:06 Uhr, schrieb Robin Barendregt  
<[hidden email]>:

> FWIW, I've done a bit of work on an SVG renderer some time ago, as a  
> hobby project. I had given up at a certain point because of VW's lacking  
> graphical capabilities, but started on a Cairo-based renderer when  
> Travis began the Cairo binding. It can render shapes, paths, gradients  
> and some very rudimentary text.
> I could publish it to the public repository, if it interests anyone.
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On  
> Behalf Of Steffen Märcker
> Sent: donderdag 18 september 2008 18:33
> To: Travis Griggs; VW NC
> Subject: Re: [vwnc] Reading SVG
>
> Hi Travis,
>
> that's interesting, because two years ago I've developed a prototype
> application that uses svg for its graphical components. Therefore I have
> implemented a very basic SVG reader mapping the SVG functions I've needed
> to Visual Works graphic objects.
> How far has your effort come?
>
> Regards,
> Steffen
>
>
>
>> I have started work on an SVG renderer that renders an SVG DOM on a
>> Cairo surface. It's very much in its infancy. Others have done similar
>> things in other language bindings.
>>
>> --
>> Travis Griggs
>> Objologist
>> "You A students, you'll be back soon teaching here with me. You B
>> students, you'll actually go on to be real engineers. You C students,
>> you'll go into management and tell the A and B students what to do." -
>> My Fluid Dynamics Professor whom I have yet to disprove
>>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Annick
I would also be interested
Annick
Le 19 sept. 08 à 19:39, Steffen Märcker a écrit :

> Oh yes, I am very interested to see what you've done. Perhaps this  
> gets
> even more attention and a living project evolves which I can  
> contribute to.
>
> Cheers!
> Steffen
>
> Am 18.09.2008, 20:06 Uhr, schrieb Robin Barendregt
> <[hidden email]>:
>
>> FWIW, I've done a bit of work on an SVG renderer some time ago, as a
>> hobby project. I had given up at a certain point because of VW's  
>> lacking
>> graphical capabilities, but started on a Cairo-based renderer when
>> Travis began the Cairo binding. It can render shapes, paths,  
>> gradients
>> and some very rudimentary text.
>> I could publish it to the public repository, if it interests anyone.
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On
>> Behalf Of Steffen Märcker
>> Sent: donderdag 18 september 2008 18:33
>> To: Travis Griggs; VW NC
>> Subject: Re: [vwnc] Reading SVG
>>
>> Hi Travis,
>>
>> that's interesting, because two years ago I've developed a prototype
>> application that uses svg for its graphical components. Therefore  
>> I have
>> implemented a very basic SVG reader mapping the SVG functions I've  
>> needed
>> to Visual Works graphic objects.
>> How far has your effort come?
>>
>> Regards,
>> Steffen
>>
>>
>>
>>> I have started work on an SVG renderer that renders an SVG DOM on a
>>> Cairo surface. It's very much in its infancy. Others have done  
>>> similar
>>> things in other language bindings.
>>>
>>> --
>>> Travis Griggs
>>> Objologist
>>> "You A students, you'll be back soon teaching here with me. You B
>>> students, you'll actually go on to be real engineers. You C  
>>> students,
>>> you'll go into management and tell the A and B students what to  
>>> do." -
>>> My Fluid Dynamics Professor whom I have yet to disprove
>>>
>>>
>>> _______________________________________________
>>> vwnc mailing list
>>> [hidden email]
>>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Robin Barendregt
In reply to this post by Steffen Märcker
I've published a bundle called SVG, containing the modeling part, and a package called Scarab which is a simple, Widgetry-based, renderer.

Don't hesitate to contact me if you experience problems or have questions.

Cheers, Robin

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steffen Märcker
Sent: vrijdag 19 september 2008 19:39
To: Travis Griggs; VW NC
Subject: Re: [vwnc] Reading SVG

Oh yes, I am very interested to see what you've done. Perhaps this gets  
even more attention and a living project evolves which I can contribute to.

Cheers!
Steffen

Am 18.09.2008, 20:06 Uhr, schrieb Robin Barendregt  
<[hidden email]>:

> FWIW, I've done a bit of work on an SVG renderer some time ago, as a  
> hobby project. I had given up at a certain point because of VW's lacking  
> graphical capabilities, but started on a Cairo-based renderer when  
> Travis began the Cairo binding. It can render shapes, paths, gradients  
> and some very rudimentary text.
> I could publish it to the public repository, if it interests anyone.
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On  
> Behalf Of Steffen Märcker
> Sent: donderdag 18 september 2008 18:33
> To: Travis Griggs; VW NC
> Subject: Re: [vwnc] Reading SVG
>
> Hi Travis,
>
> that's interesting, because two years ago I've developed a prototype
> application that uses svg for its graphical components. Therefore I have
> implemented a very basic SVG reader mapping the SVG functions I've needed
> to Visual Works graphic objects.
> How far has your effort come?
>
> Regards,
> Steffen
>
>
>
>> I have started work on an SVG renderer that renders an SVG DOM on a
>> Cairo surface. It's very much in its infancy. Others have done similar
>> things in other language bindings.
>>
>> --
>> Travis Griggs
>> Objologist
>> "You A students, you'll be back soon teaching here with me. You B
>> students, you'll actually go on to be real engineers. You C students,
>> you'll go into management and tell the A and B students what to do." -
>> My Fluid Dynamics Professor whom I have yet to disprove
>>
>>
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Robin Barendregt
I guess Scarab does not run in 7.6.
Opening the interface gives an exception and will lock your image.
7.5 should work fine, at least it does for me.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Robin Barendregt
Sent: maandag 22 september 2008 22:32
To: Steffen Märcker; Travis Griggs; VW NC
Subject: Re: [vwnc] Reading SVG

I've published a bundle called SVG, containing the modeling part, and a package called Scarab which is a simple, Widgetry-based, renderer.

Don't hesitate to contact me if you experience problems or have questions.

Cheers, Robin



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Mike Hales
If it uses Widgetry (as I infer from above) the problem is probably the fly-by-help issue discussed on the VWDev list earlier this year.  Load the parcel Tools-FlyByHelp from obsolete directory, and it should work under 7.6.  The symptoms of this were that the Widgetry window would open and paint, but when you click in it, the whole image would lock and you would have to kill the process from the OS.

Mike

On Mon, Sep 22, 2008 at 3:22 PM, Robin Barendregt <[hidden email]> wrote:
I guess Scarab does not run in 7.6.
Opening the interface gives an exception and will lock your image.
7.5 should work fine, at least it does for me.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Robin Barendregt
Sent: maandag 22 september 2008 22:32
To: Steffen Märcker; Travis Griggs; VW NC
Subject: Re: [vwnc] Reading SVG

I've published a bundle called SVG, containing the modeling part, and a package called Scarab which is a simple, Widgetry-based, renderer.

Don't hesitate to contact me if you experience problems or have questions.

Cheers, Robin



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Reading SVG

Robin Barendregt
Yup, that did it. I published another version with the added prereq. Also fixed some prereqs on the SVG bundle.
Thanks Mike!


From: Mike Hales
Sent: Tue 9/23/2008 17:38
To: Robin Barendregt
Cc: VW NC
Subject: Re: [vwnc] Reading SVG

If it uses Widgetry (as I infer from above) the problem is probably the fly-by-help issue discussed on the VWDev list earlier this year.  Load the parcel Tools-FlyByHelp from obsolete directory, and it should work under 7.6.  The symptoms of this were that the Widgetry window would open and paint, but when you click in it, the whole image would lock and you would have to kill the process from the OS.

Mike

On Mon, Sep 22, 2008 at 3:22 PM, Robin Barendregt <[hidden email]> wrote:
I guess Scarab does not run in 7.6.
Opening the interface gives an exception and will lock your image.
7.5 should work fine, at least it does for me.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Robin Barendregt
Sent: maandag 22 september 2008 22:32
To: Steffen Märcker; Travis Griggs; VW NC
Subject: Re: [vwnc] Reading SVG

I've published a bundle called SVG, containing the modeling part, and a package called Scarab which is a simple, Widgetry-based, renderer.

Don't hesitate to contact me if you experience problems or have questions.

Cheers, Robin



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
Mike Hales
Engineering Manager
KnowledgeScape
http://www.kscape.com/

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc