Cairo & Pango in VW7.7

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

Cairo & Pango in VW7.7

Mark Plas

Hi,

 

I'm having problems getting Pango working in VW7.7.

 

 It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in vw7.7:

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                cr source: ColorValue red.

                cr selectFontFace: 'Arial'.

                cr fontSize: 50.

 layout := cr newLayout.

 layout text: 'Hello word'.

 cr moveToX: 200 y: 600.

  layout showOn: cr].

 

I get exceptions like this:

 

Unhandled exception: exception occured #(3221225477 2009531962)

CairoGraphics.LibCairo class>>externalAccessFailedWith:

CairoGraphics.LibCairo class>>cairo_destroy:

ExternalMethod>>unlinkedCall:arguments:

CairoGraphics.CairoContext>>destroy

CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release

optimized [] in CairoGraphics.Surface>>newCairoContextWhile:

BlockClosure>>valueAsUnwindBlockFrom:

BlockClosure>>ensure:

CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:

optimized [] in ScreenGraphicsContext>>newCairoContextWhile:

optimized [] in DisplaySurface>>newCairoSurfaceWhile:

BlockClosure>>ensure:

ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:

ScreenGraphicsContext>>newCairoContextWhile:

UndefinedObject>>unboundMethod

 

I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the cairo.dll that comes with VW7.7.

 

Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would be great.

 

Thanks,

Mark


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

Cairo & Pango in VW7.7 (contd)

Mark Plas

Hi,

 

I did some more experiments with this.

 

When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:

 

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                               cr source: ColorValue red.

                               layout := cr newLayout. 

                               layout fontDescriptionString: 'Arial, 50'.

                               layout text:  'Hello World'   .

                               cr moveToX: 200 y: 600.

                               layout showOn: cr.

  ].   

 

Then this appears correctly (without the red rectangle):

 

 

When I use the same DLLs in VW7.7, then this appears (without the red rectangle):

 

 

Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't really work either…

 

Any hints?

 

Thanks,

Mark

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: donderdag 29 april 2010 17:00
To: VWNC NC
Subject: [vwnc] Cairo & Pango in VW7.7

 

Hi,

 

I'm having problems getting Pango working in VW7.7.

 

 It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in vw7.7:

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                cr source: ColorValue red.

                cr selectFontFace: 'Arial'.

                cr fontSize: 50.

 layout := cr newLayout.

 layout text: 'Hello word'.

 cr moveToX: 200 y: 600.

  layout showOn: cr].

 

I get exceptions like this:

 

Unhandled exception: exception occured #(3221225477 2009531962)

CairoGraphics.LibCairo class>>externalAccessFailedWith:

CairoGraphics.LibCairo class>>cairo_destroy:

ExternalMethod>>unlinkedCall:arguments:

CairoGraphics.CairoContext>>destroy

CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release

optimized [] in CairoGraphics.Surface>>newCairoContextWhile:

BlockClosure>>valueAsUnwindBlockFrom:

BlockClosure>>ensure:

CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:

optimized [] in ScreenGraphicsContext>>newCairoContextWhile:

optimized [] in DisplaySurface>>newCairoSurfaceWhile:

BlockClosure>>ensure:

ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:

ScreenGraphicsContext>>newCairoContextWhile:

UndefinedObject>>unboundMethod

 

I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the cairo.dll that comes with VW7.7.

 

Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would be great.

 

Thanks,

Mark


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

Re: Cairo & Pango in VW7.7 (contd)

Georg Heeg

Mark,

 

May first guess would be that the difference in the string encoding. While in 7.6 default string encoding to c calls is based upon mscp1252, it is based upon utf16 in 7.7

 

Georg

 

Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812

Tel. +49-3496-214328, Fax +49-3496-214712

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Mark Plas
Gesendet: Freitag, 30. April 2010 09:15
An: VWNC NC
Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)

 

Hi,

 

I did some more experiments with this.

 

When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:

 

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                               cr source: ColorValue red.

                               layout := cr newLayout. 

                               layout fontDescriptionString: 'Arial, 50'.

                               layout text:  'Hello World'   .

                               cr moveToX: 200 y: 600.

                               layout showOn: cr.

  ].   

 

Then this appears correctly (without the red rectangle):

 

 

When I use the same DLLs in VW7.7, then this appears (without the red rectangle):

 

 

Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't really work either…

 

Any hints?

 

Thanks,

Mark

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: donderdag 29 april 2010 17:00
To: VWNC NC
Subject: [vwnc] Cairo & Pango in VW7.7

 

Hi,

 

I'm having problems getting Pango working in VW7.7.

 

 It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in vw7.7:

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                cr source: ColorValue red.

                cr selectFontFace: 'Arial'.

                cr fontSize: 50.

 layout := cr newLayout.

 layout text: 'Hello word'.

 cr moveToX: 200 y: 600.

  layout showOn: cr].

 

I get exceptions like this:

 

Unhandled exception: exception occured #(3221225477 2009531962)

CairoGraphics.LibCairo class>>externalAccessFailedWith:

CairoGraphics.LibCairo class>>cairo_destroy:

ExternalMethod>>unlinkedCall:arguments:

CairoGraphics.CairoContext>>destroy

CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release

optimized [] in CairoGraphics.Surface>>newCairoContextWhile:

BlockClosure>>valueAsUnwindBlockFrom:

BlockClosure>>ensure:

CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:

optimized [] in ScreenGraphicsContext>>newCairoContextWhile:

optimized [] in DisplaySurface>>newCairoSurfaceWhile:

BlockClosure>>ensure:

ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:

ScreenGraphicsContext>>newCairoContextWhile:

UndefinedObject>>unboundMethod

 

I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the cairo.dll that comes with VW7.7.

 

Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would be great.

 

Thanks,

Mark


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

Re: Cairo & Pango in VW7.7 (contd)

Mark Plas

Hi Georg,

 

That thought also crossed my mind, but I'm not sure if that is the problem, because the Cairo 'toy' API for text displaying /does/ work. E.g.:

 

                …

                cr showText: 'Hello World'.

                …

 

will display "Hello World" correctly in VW7.7.

 

And when you look at the C definitions…

 

cairo_show_text: cr with: utf8

                <C: void cairo_show_text(cairo_t * cr, const char * utf8)>

 

pango_layout_set_text: layout with: text with: length

                <C: void pango_layout_set_text(unsigned int layout, const char *text, int length)>

 

…then you see that both the Cairo and Pango method use a pointer to char for their string argument. They look similar. They both expect a utf8 encoded string which is already taken care of by their senders by sending #utf8 to their string arguments.

 

Are you, or ayone else, able to use Pango in vw7.7?

 

Mark

 

From: Georg Heeg [mailto:[hidden email]]
Sent: vrijdag 30 april 2010 9:26
To: Mark Plas; 'VWNC NC'
Subject: AW: [vwnc] Cairo & Pango in VW7.7 (contd)

 

Mark,

 

May first guess would be that the difference in the string encoding. While in 7.6 default string encoding to c calls is based upon mscp1252, it is based upon utf16 in 7.7

 

Georg

 

Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812

Tel. +49-3496-214328, Fax +49-3496-214712

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Mark Plas
Gesendet: Freitag, 30. April 2010 09:15
An: VWNC NC
Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)

 

Hi,

 

I did some more experiments with this.

 

When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:

 

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                               cr source: ColorValue red.

                               layout := cr newLayout. 

                               layout fontDescriptionString: 'Arial, 50'.

                               layout text:  'Hello World'   .

                               cr moveToX: 200 y: 600.

                               layout showOn: cr.

  ].   

 

Then this appears correctly (without the red rectangle):

 

 

When I use the same DLLs in VW7.7, then this appears (without the red rectangle):

 

 

Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't really work either…

 

Any hints?

 

Thanks,

Mark

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: donderdag 29 april 2010 17:00
To: VWNC NC
Subject: [vwnc] Cairo & Pango in VW7.7

 

Hi,

 

I'm having problems getting Pango working in VW7.7.

 

 It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in vw7.7:

 

| view gc |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

gc newCairoContextWhile: [:cr |

                cr source: ColorValue red.

                cr selectFontFace: 'Arial'.

                cr fontSize: 50.

 layout := cr newLayout.

 layout text: 'Hello word'.

 cr moveToX: 200 y: 600.

  layout showOn: cr].

 

I get exceptions like this:

 

Unhandled exception: exception occured #(3221225477 2009531962)

CairoGraphics.LibCairo class>>externalAccessFailedWith:

CairoGraphics.LibCairo class>>cairo_destroy:

ExternalMethod>>unlinkedCall:arguments:

CairoGraphics.CairoContext>>destroy

CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release

optimized [] in CairoGraphics.Surface>>newCairoContextWhile:

BlockClosure>>valueAsUnwindBlockFrom:

BlockClosure>>ensure:

CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:

optimized [] in ScreenGraphicsContext>>newCairoContextWhile:

optimized [] in DisplaySurface>>newCairoSurfaceWhile:

BlockClosure>>ensure:

ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:

ScreenGraphicsContext>>newCairoContextWhile:

UndefinedObject>>unboundMethod

 

I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the cairo.dll that comes with VW7.7.

 

Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would be great.

 

Thanks,

Mark


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

Re: Cairo & Pango in VW7.7 (contd)

Annick
<base href="x-msg://168/">Have you tried using markup in cairo rather than pango ?
Besides, the method windowsLibrary from Libcairo returns the old libcairo2.dll instead of the new cairo.dll provided with the image.

I can't explain that.
Annick Fron
Le 30 avr. 2010 à 10:10, Mark Plas a écrit :

Hi Georg,
 
That thought also crossed my mind, but I'm not sure if that is the problem, because the Cairo 'toy' API for text displaying /does/ work. E.g.:
 
                …
                cr showText: 'Hello World'.
                …
 
will display "Hello World" correctly in VW7.7.
 
And when you look at the C definitions…
 
cairo_show_text: cr with: utf8
                <C: void cairo_show_text(cairo_t * cr, const char * utf8)>
 
pango_layout_set_text: layout with: text with: length
                <C: void pango_layout_set_text(unsigned int layout, const char *text, int length)>
 
…then you see that both the Cairo and Pango method use a pointer to char for their string argument. They look similar. They both expect a utf8 encoded string which is already taken care of by their senders by sending #utf8 to their string arguments.
 
Are you, or ayone else, able to use Pango in vw7.7?
 
Mark
 
From: Georg Heeg [mailto:[hidden email]] 
Sent: vrijdag 30 april 2010 9:26
To: Mark Plas; 'VWNC NC'
Subject: AW: [vwnc] Cairo & Pango in VW7.7 (contd)
 
Mark,
 
May first guess would be that the difference in the string encoding. While in 7.6 default string encoding to c calls is based upon mscp1252, it is based upon utf16 in 7.7
 
Georg
 
Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812
Tel. +49-3496-214328, Fax +49-3496-214712
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Mark Plas
Gesendet: Freitag, 30. April 2010 09:15
An: VWNC NC
Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)
 
Hi,
 
I did some more experiments with this.
 
When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:
 
 
| view gc |
view := ScheduledControllers activeController view.
gc := view graphicsContext.
gc newCairoContextWhile: [:cr |
                               cr source: ColorValue red.
                               layout := cr newLayout. 
                               layout fontDescriptionString: 'Arial, 50'.
                               layout text:  'Hello World'   .
                               cr moveToX: 200 y: 600.
                               layout showOn: cr.
  ].   
 
Then this appears correctly (without the red rectangle):
 
<image001.png>
 
When I use the same DLLs in VW7.7, then this appears (without the red rectangle):
 
<image002.png>
 
Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't really work either…
 
Any hints?
 
Thanks,
Mark
 
From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: donderdag 29 april 2010 17:00
To: VWNC NC
Subject: [vwnc] Cairo & Pango in VW7.7
 
Hi,
 
I'm having problems getting Pango working in VW7.7.
 
 It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in vw7.7:
 
| view gc |
view := ScheduledControllers activeController view.
gc := view graphicsContext.
gc newCairoContextWhile: [:cr |
                cr source: ColorValue red.
                cr selectFontFace: 'Arial'.
                cr fontSize: 50.
 layout := cr newLayout.
 layout text: 'Hello word'.
 cr moveToX: 200 y: 600.
  layout showOn: cr].
 
I get exceptions like this:
 
Unhandled exception: exception occured #(3221225477 2009531962)
CairoGraphics.LibCairo class>>externalAccessFailedWith:
CairoGraphics.LibCairo class>>cairo_destroy:
ExternalMethod>>unlinkedCall:arguments:
CairoGraphics.CairoContext>>destroy
CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release
optimized [] in CairoGraphics.Surface>>newCairoContextWhile:
BlockClosure>>valueAsUnwindBlockFrom:
BlockClosure>>ensure:
CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:
optimized [] in ScreenGraphicsContext>>newCairoContextWhile:
optimized [] in DisplaySurface>>newCairoSurfaceWhile:
BlockClosure>>ensure:
ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:
ScreenGraphicsContext>>newCairoContextWhile:
UndefinedObject>>unboundMethod
 
I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the cairo.dll that comes with VW7.7.
 
Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would be great.
 
Thanks,
Mark
_______________________________________________
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: Cairo & Pango in VW7.7 (contd)

Maarten Mostert-2
Pango works perfectly well in the prerelease versions up to early Nov. 2009. Afterthat it does not (or at least no
on windows to my experience).
The library names seem to be hard wired in the 7.7 VM. And there is one moment that the Pango Library calls the
Cairo library and then things seem to go wrong.

Regards,

@+Maarten,

> Message du 30/04/10 12:08
> De : "Annick Fron"

> A : "Mark Plas"
> Copie à : "vwnc NC"
> Objet : Re: [vwnc] Cairo & Pango in VW7.7 (contd)
>
> Have you tried using markup in cairo rather than pango ?
> Besides, the method windowsLibrary from Libcairo returns the old libcairo2.dll instead of the new cairo.dll
provided with the image.
>
> I can't explain that.
> Annick Fron
> Le 30 avr. 2010 à 10:10, Mark Plas a écrit :
>
> > Hi Georg,
> >
> > That thought also crossed my mind, but I'm not sure if that is the problem, because the Cairo 'toy' API for text
displaying /does/ work. E.g.:

> >
> > …
> > cr showText: 'Hello World'.
> > …
> >
> > will display "Hello World" correctly in VW7.7.
> >
> > And when you look at the C definitions…
> >
> > cairo_show_text: cr with: utf8
> >
> >
> > pango_layout_set_text: layout with: text with: length
> >
> >
> > …then you see that both the Cairo and Pango method use a pointer to char for their string argument. They look
similar. They both expect a utf8 encoded string which is already taken care of by their senders by sending #utf8 to
their string arguments.

> >
> > Are you, or ayone else, able to use Pango in vw7.7?
> >
> > Mark
> >
> > From: Georg Heeg [mailto:[hidden email]]
> > Sent: vrijdag 30 april 2010 9:26
> > To: Mark Plas; 'VWNC NC'
> > Subject: AW: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Mark,
> >
> > May first guess would be that the difference in the string encoding. While in 7.6 default string encoding to c
calls is based upon mscp1252, it is based upon utf16 in 7.7

> >
> > Georg
> >
> > Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812
> > Tel. +49-3496-214328, Fax +49-3496-214712
> > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Mark Plas
> > Gesendet: Freitag, 30. April 2010 09:15
> > An: VWNC NC
> > Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Hi,
> >
> > I did some more experiments with this.
> >
> > When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:
> >
> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > layout := cr newLayout.
> > layout fontDescriptionString: 'Arial, 50'.
> > layout text: 'Hello World' .
> > cr moveToX: 200 y: 600.
> > layout showOn: cr.
> > ].
> >
> > Then this appears correctly (without the red rectangle):
> >
> >
> >
> > When I use the same DLLs in VW7.7, then this appears (without the red rectangle):
> >
> >
> >
> > Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't
really work either…

> >
> > Any hints?
> >
> > Thanks,
> > Mark
> >
> > From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
> > Sent: donderdag 29 april 2010 17:00
> > To: VWNC NC
> > Subject: [vwnc] Cairo & Pango in VW7.7
> >
> > Hi,
> >
> > I'm having problems getting Pango working in VW7.7.
> >
> > It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in
vw7.7:

> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > cr selectFontFace: 'Arial'.
> > cr fontSize: 50.
> > layout := cr newLayout.
> > layout text: 'Hello word'.
> > cr moveToX: 200 y: 600.
> > layout showOn: cr].
> >
> > I get exceptions like this:
> >
> > Unhandled exception: exception occured #(3221225477 2009531962)
> > CairoGraphics.LibCairo class>>externalAccessFailedWith:
> > CairoGraphics.LibCairo class>>cairo_destroy:
> > ExternalMethod>>unlinkedCall:arguments:
> > CairoGraphics.CairoContext>>destroy
> > CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release
> > optimized [] in CairoGraphics.Surface>>newCairoContextWhile:
> > BlockClosure>>valueAsUnwindBlockFrom:
> > BlockClosure>>ensure:
> > CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:
> > optimized [] in ScreenGraphicsContext>>newCairoContextWhile:
> > optimized [] in DisplaySurface>>newCairoSurfaceWhile:
> > BlockClosure>>ensure:
> > ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:
> > ScreenGraphicsContext>>newCairoContextWhile:
> > UndefinedObject>>unboundMethod
> >
> > I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the
cairo.dll that comes with VW7.7.
> >
> > Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would
be great.

> >
> > Thanks,
> > Mark
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> [ (pas de nom de fichier) (0.1 Ko) ]



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

Re: Cairo & Pango in VW7.7 (contd)

Boris Popov, DeepCove Labs (SNN)
Hmm, using CairoGraphics 7.7 - 4 and Pango 23 on 7.7 (using 7.7a VM) on Windows 7 appears to be working for me, see attached sample,

view := ScheduledControllers activeController view.
gc := view graphicsContext.
gc newCairoContextWhile:
                [:cr |
                cr
                        source: ColorValue red;
                        moveToX: 110 y: 47.
                (Pango.Layout text: 'Hello, World! ' , ObjectMemory versionId printString)
                        fontDescriptionString: 'Calibri, 20';
                        showOn: cr]

We're using a set of libraries that you can download here,

   http://dl.dropbox.com/u/6265/visualworks/cairo20100430.zip

You'll need to use attached library lookup definitions on LibCairo and LibPango.

Hope this helps,

-Boris

--
DeepCove Labs Ltd.
+1 (604) 689-0322
4th floor, 595 Howe Street
Vancouver, British Columbia
Canada V6C 2T5
http://tinyurl.com/r7uw4

PacNet Services (Europe) Ltd.
+353 (0)61 714-360
Shannon Airport House, SFZ
County Clare, Ireland
http://tinyurl.com/y952amr

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

Thank you.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Maarten MOSTERT
Sent: 30 April 2010 11:27
To: Annick Fron; Mark Plas
Cc: vwnc NC
Subject: Re: [vwnc] Cairo & Pango in VW7.7 (contd)

Pango works perfectly well in the prerelease versions up to early Nov. 2009. Afterthat it does not (or at least no
on windows to my experience).
The library names seem to be hard wired in the 7.7 VM. And there is one moment that the Pango Library calls the
Cairo library and then things seem to go wrong.

Regards,

@+Maarten,

> Message du 30/04/10 12:08
> De : "Annick Fron"

> A : "Mark Plas"
> Copie à : "vwnc NC"
> Objet : Re: [vwnc] Cairo & Pango in VW7.7 (contd)
>
> Have you tried using markup in cairo rather than pango ?
> Besides, the method windowsLibrary from Libcairo returns the old libcairo2.dll instead of the new cairo.dll
provided with the image.
>
> I can't explain that.
> Annick Fron
> Le 30 avr. 2010 à 10:10, Mark Plas a écrit :
>
> > Hi Georg,
> >
> > That thought also crossed my mind, but I'm not sure if that is the problem, because the Cairo 'toy' API for text
displaying /does/ work. E.g.:

> >
> > …
> > cr showText: 'Hello World'.
> > …
> >
> > will display "Hello World" correctly in VW7.7.
> >
> > And when you look at the C definitions…
> >
> > cairo_show_text: cr with: utf8
> >
> >
> > pango_layout_set_text: layout with: text with: length
> >
> >
> > …then you see that both the Cairo and Pango method use a pointer to char for their string argument. They look
similar. They both expect a utf8 encoded string which is already taken care of by their senders by sending #utf8 to
their string arguments.

> >
> > Are you, or ayone else, able to use Pango in vw7.7?
> >
> > Mark
> >
> > From: Georg Heeg [mailto:[hidden email]]
> > Sent: vrijdag 30 april 2010 9:26
> > To: Mark Plas; 'VWNC NC'
> > Subject: AW: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Mark,
> >
> > May first guess would be that the difference in the string encoding. While in 7.6 default string encoding to c
calls is based upon mscp1252, it is based upon utf16 in 7.7

> >
> > Georg
> >
> > Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812
> > Tel. +49-3496-214328, Fax +49-3496-214712
> > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Mark Plas
> > Gesendet: Freitag, 30. April 2010 09:15
> > An: VWNC NC
> > Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Hi,
> >
> > I did some more experiments with this.
> >
> > When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:
> >
> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > layout := cr newLayout.
> > layout fontDescriptionString: 'Arial, 50'.
> > layout text: 'Hello World' .
> > cr moveToX: 200 y: 600.
> > layout showOn: cr.
> > ].
> >
> > Then this appears correctly (without the red rectangle):
> >
> >
> >
> > When I use the same DLLs in VW7.7, then this appears (without the red rectangle):
> >
> >
> >
> > Cairo drawing works just fine, but there's something wrong in VW7.7. At least it doesn't crash, but it doesn't
really work either…

> >
> > Any hints?
> >
> > Thanks,
> > Mark
> >
> > From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
> > Sent: donderdag 29 april 2010 17:00
> > To: VWNC NC
> > Subject: [vwnc] Cairo & Pango in VW7.7
> >
> > Hi,
> >
> > I'm having problems getting Pango working in VW7.7.
> >
> > It used to work a year or so ago in vw7.6 with some DLLs I dug up somewhere, but when I try to run this code in
vw7.7:

> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > cr selectFontFace: 'Arial'.
> > cr fontSize: 50.
> > layout := cr newLayout.
> > layout text: 'Hello word'.
> > cr moveToX: 200 y: 600.
> > layout showOn: cr].
> >
> > I get exceptions like this:
> >
> > Unhandled exception: exception occured #(3221225477 2009531962)
> > CairoGraphics.LibCairo class>>externalAccessFailedWith:
> > CairoGraphics.LibCairo class>>cairo_destroy:
> > ExternalMethod>>unlinkedCall:arguments:
> > CairoGraphics.CairoContext>>destroy
> > CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release
> > optimized [] in CairoGraphics.Surface>>newCairoContextWhile:
> > BlockClosure>>valueAsUnwindBlockFrom:
> > BlockClosure>>ensure:
> > CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:
> > optimized [] in ScreenGraphicsContext>>newCairoContextWhile:
> > optimized [] in DisplaySurface>>newCairoSurfaceWhile:
> > BlockClosure>>ensure:
> > ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:
> > ScreenGraphicsContext>>newCairoContextWhile:
> > UndefinedObject>>unboundMethod
> >
> > I cannot remember where I got the DLLs last time and I suppose I'll need others that are compatible with the
cairo.dll that comes with VW7.7.
> >
> > Could someone point me to the right DLLs to use? Or if you could mail them to me (in a zip archive) that would
be great.

> >
> > Thanks,
> > Mark
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> [ (pas de nom de fichier) (0.1 Ko) ]


_______________________________________________
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

sample.png (59K) Download Attachment
LibCairo class-windowsLibrary.st (864 bytes) Download Attachment
LibPango class-libs.st (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cairo & Pango in VW7.7 (contd)

Mark Plas
Hi Boris, Maarten & Annick,

Thanks for your replies.

When I use the DLLs Boris supplied everything seems to work fine!

Thanks!

Mark

-----Original Message-----
From: Boris Popov, DeepCove Labs (YVR) [mailto:[hidden email]]
Sent: vrijdag 30 april 2010 12:46
To: Maarten MOSTERT; Annick Fron; Mark Plas
Cc: vwnc NC
Subject: RE: [vwnc] Cairo & Pango in VW7.7 (contd)

Hmm, using CairoGraphics 7.7 - 4 and Pango 23 on 7.7 (using 7.7a VM) on Windows 7 appears to be working for me, see attached sample,

view := ScheduledControllers activeController view.
gc := view graphicsContext.
gc newCairoContextWhile:
                [:cr |
                cr
                        source: ColorValue red;
                        moveToX: 110 y: 47.
                (Pango.Layout text: 'Hello, World! ' , ObjectMemory versionId printString)
                        fontDescriptionString: 'Calibri, 20';
                        showOn: cr]

We're using a set of libraries that you can download here,

   http://dl.dropbox.com/u/6265/visualworks/cairo20100430.zip

You'll need to use attached library lookup definitions on LibCairo and LibPango.

Hope this helps,

-Boris

--
DeepCove Labs Ltd.
+1 (604) 689-0322
4th floor, 595 Howe Street
Vancouver, British Columbia
Canada V6C 2T5
http://tinyurl.com/r7uw4

PacNet Services (Europe) Ltd.
+353 (0)61 714-360
Shannon Airport House, SFZ
County Clare, Ireland
http://tinyurl.com/y952amr

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

Thank you.


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Maarten MOSTERT
Sent: 30 April 2010 11:27
To: Annick Fron; Mark Plas
Cc: vwnc NC
Subject: Re: [vwnc] Cairo & Pango in VW7.7 (contd)

Pango works perfectly well in the prerelease versions up to early Nov. 2009. Afterthat it does not (or at least no on windows to my experience).
The library names seem to be hard wired in the 7.7 VM. And there is one moment that the Pango Library calls the Cairo library and then things seem to go wrong.

Regards,

@+Maarten,

> Message du 30/04/10 12:08
> De : "Annick Fron"

> A : "Mark Plas"
> Copie à : "vwnc NC"
> Objet : Re: [vwnc] Cairo & Pango in VW7.7 (contd)
>
> Have you tried using markup in cairo rather than pango ?
> Besides, the method windowsLibrary from Libcairo returns the old
> libcairo2.dll instead of the new cairo.dll
provided with the image.
>
> I can't explain that.
> Annick Fron
> Le 30 avr. 2010 à 10:10, Mark Plas a écrit :
>
> > Hi Georg,
> >
> > That thought also crossed my mind, but I'm not sure if that is the
> > problem, because the Cairo 'toy' API for text
displaying /does/ work. E.g.:

> >
> > …
> > cr showText: 'Hello World'.
> > …
> >
> > will display "Hello World" correctly in VW7.7.
> >
> > And when you look at the C definitions…
> >
> > cairo_show_text: cr with: utf8
> >
> >
> > pango_layout_set_text: layout with: text with: length
> >
> >
> > …then you see that both the Cairo and Pango method use a pointer to
> > char for their string argument. They look
similar. They both expect a utf8 encoded string which is already taken care of by their senders by sending #utf8 to their string arguments.

> >
> > Are you, or ayone else, able to use Pango in vw7.7?
> >
> > Mark
> >
> > From: Georg Heeg [mailto:[hidden email]]
> > Sent: vrijdag 30 april 2010 9:26
> > To: Mark Plas; 'VWNC NC'
> > Subject: AW: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Mark,
> >
> > May first guess would be that the difference in the string encoding.
> > While in 7.6 default string encoding to c
calls is based upon mscp1252, it is based upon utf16 in 7.7

> >
> > Georg
> >
> > Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812 Tel.
> > +49-3496-214328, Fax +49-3496-214712
> > Von: [hidden email] [mailto:[hidden email]] Im
> > Auftrag von Mark Plas
> > Gesendet: Freitag, 30. April 2010 09:15
> > An: VWNC NC
> > Betreff: [vwnc] Cairo & Pango in VW7.7 (contd)
> >
> > Hi,
> >
> > I did some more experiments with this.
> >
> > When I use vw7.6 with Cairo&Pango DLLs I gathered last year and run the following code:
> >
> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > layout := cr newLayout.
> > layout fontDescriptionString: 'Arial, 50'.
> > layout text: 'Hello World' .
> > cr moveToX: 200 y: 600.
> > layout showOn: cr.
> > ].
> >
> > Then this appears correctly (without the red rectangle):
> >
> >
> >
> > When I use the same DLLs in VW7.7, then this appears (without the red rectangle):
> >
> >
> >
> > Cairo drawing works just fine, but there's something wrong in VW7.7.
> > At least it doesn't crash, but it doesn't
really work either…

> >
> > Any hints?
> >
> > Thanks,
> > Mark
> >
> > From: [hidden email] [mailto:[hidden email]] On
> > Behalf Of Mark Plas
> > Sent: donderdag 29 april 2010 17:00
> > To: VWNC NC
> > Subject: [vwnc] Cairo & Pango in VW7.7
> >
> > Hi,
> >
> > I'm having problems getting Pango working in VW7.7.
> >
> > It used to work a year or so ago in vw7.6 with some DLLs I dug up
> > somewhere, but when I try to run this code in
vw7.7:

> >
> > | view gc |
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > gc newCairoContextWhile: [:cr |
> > cr source: ColorValue red.
> > cr selectFontFace: 'Arial'.
> > cr fontSize: 50.
> > layout := cr newLayout.
> > layout text: 'Hello word'.
> > cr moveToX: 200 y: 600.
> > layout showOn: cr].
> >
> > I get exceptions like this:
> >
> > Unhandled exception: exception occured #(3221225477 2009531962)
> > CairoGraphics.LibCairo class>>externalAccessFailedWith:
> > CairoGraphics.LibCairo class>>cairo_destroy:
> > ExternalMethod>>unlinkedCall:arguments:
> > CairoGraphics.CairoContext>>destroy
> > CairoGraphics.CairoContext(CairoGraphics.ManagedHandle)>>release
> > optimized [] in CairoGraphics.Surface>>newCairoContextWhile:
> > BlockClosure>>valueAsUnwindBlockFrom:
> > BlockClosure>>ensure:
> > CairoGraphics.Win32WindowSurface(CairoGraphics.Surface)>>newCairoContextWhile:
> > optimized [] in ScreenGraphicsContext>>newCairoContextWhile:
> > optimized [] in DisplaySurface>>newCairoSurfaceWhile:
> > BlockClosure>>ensure:
> > ScheduledWindow(DisplaySurface)>>newCairoSurfaceWhile:
> > ScreenGraphicsContext>>newCairoContextWhile:
> > UndefinedObject>>unboundMethod
> >
> > I cannot remember where I got the DLLs last time and I suppose I'll
> > need others that are compatible with the
cairo.dll that comes with VW7.7.
> >
> > Could someone point me to the right DLLs to use? Or if you could
> > mail them to me (in a zip archive) that would
be great.

> >
> > Thanks,
> > Mark
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
>
> [ (pas de nom de fichier) (0.1 Ko) ]



_______________________________________________
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: Cairo & Pango in VW7.7 (contd)

Travis Griggs-3
On Apr 30, 2010, at 4:45 AM, Mark Plas wrote:

> Hi Boris, Maarten & Annick,
>
> Thanks for your replies.
>
> When I use the DLLs Boris supplied everything seems to work fine!


Sorry to show up late to the discussion.

When we provided the prebuilt libraries for 7.7, one of the goals was  
to make it so that it was a standalone DLL. We wanted to keep it to  
one or two files, not a handful of them. And we wanted to avoid DLL  
hell, where it wanted a different version of zlib than you had, and  
you had to do a bunch of dll accessing tuning to get it to work. Or  
where I had built on Vista, and now XP people needed some latest  
libcrt.dll from MS. In short, we wanted a near atomic turnkey "dropin"  
solution. This worked well for Cairo itself.

Unfortunately, the way it was done, makes it so that the Pango  
libraries can't resolve it. It is my hope as we go into feature/code  
freeze, to switch gears and fix that/provide the same for Pango. I  
would like to spend some time really beefing up the Pango Smalltalk  
interface as well, it's not nearly fleshed out like Cairo is.

--
Travis Griggs
Objologist
"An idea, like a ghost, must be spoken to a little before it will  
explain itself." - Charles Dickens

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

Re: Cairo & Pango in VW7.7 (contd)

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Mark Plas
Re: [vwnc] Cairo & Pango in VW7.7 (contd)

How well do Store attachments work? Just exploring options for library delivery when loading versions of Cairo and Pango packages...

-Boris (via BlackBerry)

----- Original Message -----
From: Travis Griggs <[hidden email]>
To: Mark Plas <[hidden email]>; VWNC NC <[hidden email]>
Cc: Boris Popov, DeepCove Labs (YVR); Maarten MOSTERT <[hidden email]>; Annick Fron <[hidden email]>
Sent: Fri Apr 30 13:22:03 2010
Subject: Re: [vwnc] Cairo & Pango in VW7.7 (contd)

On Apr 30, 2010, at 4:45 AM, Mark Plas wrote:

> Hi Boris, Maarten & Annick,
>
> Thanks for your replies.
>
> When I use the DLLs Boris supplied everything seems to work fine!


Sorry to show up late to the discussion.

When we provided the prebuilt libraries for 7.7, one of the goals was 
to make it so that it was a standalone DLL. We wanted to keep it to 
one or two files, not a handful of them. And we wanted to avoid DLL 
hell, where it wanted a different version of zlib than you had, and 
you had to do a bunch of dll accessing tuning to get it to work. Or 
where I had built on Vista, and now XP people needed some latest 
libcrt.dll from MS. In short, we wanted a near atomic turnkey "dropin" 
solution. This worked well for Cairo itself.

Unfortunately, the way it was done, makes it so that the Pango 
libraries can't resolve it. It is my hope as we go into feature/code 
freeze, to switch gears and fix that/provide the same for Pango. I 
would like to spend some time really beefing up the Pango Smalltalk 
interface as well, it's not nearly fleshed out like Cairo is.

--
Travis Griggs
Objologist
"An idea, like a ghost, must be spoken to a little before it will 
explain itself." - Charles Dickens


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