[cairo] Text display tuning question

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

[cairo] Text display tuning question

Mark Plas

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                                            ifTrue:

                                                                                                                                                                                            [x := 0.

                                                                                                                                                                                            y := y + 18]]].

                                                                                              cr paint]]]

 

 

 


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

Re: [cairo] Text display tuning question

Steven Kelly

Mark,

 

we left the text display to be done by VW’s own primitives, rather than Cairo. The rest of the graphics are displayed with Cairo. That’s worked well for us.

 

Cheers,

Steve

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: 7. heinäkuuta 2010 23:15
To: vwnc NC
Subject: [vwnc] [cairo] Text display tuning question

 

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                                            ifTrue:

                                                                                                                                                                                            [x := 0.

                                                                                                                                                                                            y := y + 18]]].

                                                                                              cr paint]]]

 

 

 


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

Re: [cairo] Text display tuning question

Travis Griggs-3
In reply to this post by Mark Plas

On Jul 7, 2010, at 1:14 PM, Mark Plas wrote:

Hi,
 
How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.
 
Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].
 
Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.
 
In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.
 
How can I improve this?


Which OS are you on Mark?

--
Travis Griggs
Objologist
"Dying men never wish they'd spent more time at the office"



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

Re: [cairo] Text display tuning question

Mark Plas
In reply to this post by Steven Kelly

Hi Steve,

 

Thanks for the tip, I may have to resort to something like that.

 

Mark

 

From: Steven Kelly [mailto:[hidden email]]
Sent: donderdag 8 juli 2010 21:32
To: Mark Plas; vwnc NC
Subject: RE: [vwnc] [cairo] Text display tuning question

 

Mark,

 

we left the text display to be done by VW’s own primitives, rather than Cairo. The rest of the graphics are displayed with Cairo. That’s worked well for us.

 

Cheers,

Steve

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: 7. heinäkuuta 2010 23:15
To: vwnc NC
Subject: [vwnc] [cairo] Text display tuning question

 

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                                            ifTrue:

                                                                                                                                                                                            [x := 0.

                                                                                                                                                                                            y := y + 18]]].

                                                                                              cr paint]]]

 

 

 


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

Re: [cairo] Text display tuning question

paul weustink-4
In reply to this post by Mark Plas
Mark,

I've tried your example with GDI+ and direct screen output (so without the pixmap).
These are my results (on a Pentium4 with XP-SP3):

    VW7                     530 ms    (your example without pixmap buffering)
    GDI+                   1093 ms
    GDI+ smooth             880 ms    (anti-alias style font rendering)
    GDI+ cleartype         1120 ms    (clear-type style font rendering)


Better than I expected. This is the code I used:

    | view x y gc graphics interface symbols aTime namePtr fontFamilyPtr fontFamily
      fontPtr font  brushPtr brush stringPtr string rectPtr|

    view := ScheduledControllers activeController view.
    gc := view graphicsContext.
    symbols := ByteSymbol allInstances select: [:each | each size > 1].

    gc medium gdiGraphicsPtrDo: [:graphicsPtr |
        graphics := graphicsPtr contents.
        interface := WinGDIPlusInterface current.
        "interface GdipSetTextRenderingHint: graphics with: 4."        "try 1, 4, or 5"

        aTime := Time millisecondsToRun: [
            10 timesRepeat: [
                x := 0.
                y := 0.

                namePtr := 'Arial' asTwoByteString gcCopyToHeapUnicode.
                fontFamilyPtr := interface GpFontFamily gcMalloc.
                interface GdipCreateFontFamilyFromName: namePtr with: 0 with: fontFamilyPtr.
                fontFamily := fontFamilyPtr contents.
   
                fontPtr := interface GpFont gcMalloc.
                interface GdipCreateFont: fontFamily with: 12 with: 0 with: 0 with: fontPtr.
                font := fontPtr contents.

                brushPtr := interface GpBrush gcMalloc.
                interface GdipCreateSolidFill: 16rFF000000 with: brushPtr.    "ARGB color"
                brush := brushPtr contents.

                1 to: 1300 do: [:i |
                    interface GdipSetClipRectI: graphics with: x with: y with: (view width // 17) with: 18 with: 0.
   
                    string := (symbols at: i) asString asTwoByteString.
                    stringPtr := string gcCopyToHeapUnicode.
                    rectPtr := interface RectF gcCalloc.
                    rectPtr memberAt: #X put: x.
                    rectPtr memberAt: #Y put: y.
                    interface GdipDrawString: graphics with: stringPtr with: string size with: font with: rectPtr  with: 0 with: brush.

                    x := x + (view width // 17).
                    x > view width ifTrue: [
                        x := 0.
                        y := y + 18.
                    ].
                ].
   
                interface GdipDeleteBrush: brush.
                interface GdipDeleteFont: font.
                interface GdipDeleteFontFamily: fontFamily.
            ].
        ].
    ].
    aTime inspect.


Notes:
- GDI+ also introduces classes that wrap the native "flat" Gdip* functions into nice objects.
  I did not port these classes from C++ yet, since they are not needed to use the gdiplus.dll.
- This code works on any Windows platform. If your OS is before XP please download the gdiplus.dll
  from the microsoft site.
- There exists a Mono open-source project that also has an implementation of GDI+ using Cairo,
  perhaps this can be used for Linux and Mac?

Paul Weustink


On 7-7-2010 22:14, Mark Plas wrote:

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                               ;              ifTrue:

                                                                                                                                                               ;                              [x := 0.

                                                                                                                                                               ;                              y := y + 18]]].

                                                                                              cr paint]]]

 

 

 

_______________________________________________ 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] Text display tuning question

Mark Plas

Hi Paul,

 

Where did you get the package containing the gdiplusflat.h api? It's not the WinGDIPlusInterface from the public repository I believe?

 

Mark

 

From: Paul Weustink [mailto:[hidden email]]
Sent: maandag 12 juli 2010 12:26
To: Mark Plas
Cc: VWNC List
Subject: Re: [vwnc] [cairo] Text display tuning question

 

Mark,

I've tried your example with GDI+ and direct screen output (so without the pixmap).
These are my results (on a Pentium4 with XP-SP3):

    VW7                     530 ms    (your example without pixmap buffering)
    GDI+                   1093 ms
    GDI+ smooth             880 ms    (anti-alias style font rendering)
    GDI+ cleartype         1120 ms    (clear-type style font rendering)


Better than I expected. This is the code I used:

    | view x y gc graphics interface symbols aTime namePtr fontFamilyPtr fontFamily
      fontPtr font  brushPtr brush stringPtr string rectPtr|

    view := ScheduledControllers activeController view.
    gc := view graphicsContext.
    symbols := ByteSymbol allInstances select: [:each | each size > 1].

    gc medium gdiGraphicsPtrDo: [:graphicsPtr |
        graphics := graphicsPtr contents.
        interface := WinGDIPlusInterface current.
        "interface GdipSetTextRenderingHint: graphics with: 4."        "try 1, 4, or 5"

        aTime := Time millisecondsToRun: [
            10 timesRepeat: [
                x := 0.
                y := 0.

                namePtr := 'Arial' asTwoByteString gcCopyToHeapUnicode.
                fontFamilyPtr := interface GpFontFamily gcMalloc.
                interface GdipCreateFontFamilyFromName: namePtr with: 0 with: fontFamilyPtr.
                fontFamily := fontFamilyPtr contents.
   
                fontPtr := interface GpFont gcMalloc.
                interface GdipCreateFont: fontFamily with: 12 with: 0 with: 0 with: fontPtr.
                font := fontPtr contents.

                brushPtr := interface GpBrush gcMalloc.
                interface GdipCreateSolidFill: 16rFF000000 with: brushPtr.    "ARGB color"
                brush := brushPtr contents.

                1 to: 1300 do: [:i |
                    interface GdipSetClipRectI: graphics with: x with: y with: (view width // 17) with: 18 with: 0.
   
                    string := (symbols at: i) asString asTwoByteString.
                    stringPtr := string gcCopyToHeapUnicode.
                    rectPtr := interface RectF gcCalloc.
                    rectPtr memberAt: #X put: x.
                    rectPtr memberAt: #Y put: y.
                    interface GdipDrawString: graphics with: stringPtr with: string size with: font with: rectPtr  with: 0 with: brush.

                    x := x + (view width // 17).
                    x > view width ifTrue: [
                        x := 0.
                        y := y + 18.
                    ].
                ].
   
                interface GdipDeleteBrush: brush.
                interface GdipDeleteFont: font.
                interface GdipDeleteFontFamily: fontFamily.
            ].
        ].
    ].
    aTime inspect.


Notes:
- GDI+ also introduces classes that wrap the native "flat" Gdip* functions into nice objects.
  I did not port these classes from C++ yet, since they are not needed to use the gdiplus.dll.
- This code works on any Windows platform. If your OS is before XP please download the gdiplus.dll
  from the microsoft site.
- There exists a Mono open-source project that also has an implementation of GDI+ using Cairo,
  perhaps this can be used for Linux and Mac?

Paul Weustink


On 7-7-2010 22:14, Mark Plas wrote:

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                               ;              ifTrue:

                                                                                                                                                               ;                              [x := 0.

                                                                                                                                                               ;                              y := y + 18]]].

                                                                                              cr paint]]]

 

 

 

 
 
_______________________________________________
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] Text display tuning question

paul weustink-4
Hi Mark,

There is no package , I did start with the WinGDIPlusInterface from the repository. Added the missing Gdip functions by changing the gdiplusflat.h file a bit (basically fixing errors from MS and some typedefs of structs) and parse it with the DLLCC tools.

The nice objects from C++ like Graphics, Pen, Brush, Font, etc are still lacking, but the flat functions work fine.

Perhaps, if someone is interested, we could update the package in the repository with the new stuff?
Actually I asked earlier if someone did some work on GDI+ already, no answers so I wonder who uses it?

Paul

On 12-7-2010 13:54, Mark Plas wrote:

Hi Paul,

 

Where did you get the package containing the gdiplusflat.h api? It's not the WinGDIPlusInterface from the public repository I believe?

 

Mark

 

From: Paul Weustink [[hidden email]]
Sent: maandag 12 juli 2010 12:26
To: Mark Plas
Cc: VWNC List
Subject: Re: [vwnc] [cairo] Text display tuning question

 

Mark,

I've tried your example with GDI+ and direct screen output (so without the pixmap).
These are my results (on a Pentium4 with XP-SP3):

    VW7                     530 ms    (your example without pixmap buffering)
    GDI+                   1093 ms
    GDI+ smooth             880 ms    (anti-alias style font rendering)
    GDI+ cleartype         1120 ms    (clear-type style font rendering)


Better than I expected. This is the code I used:

    | view x y gc graphics interface symbols aTime namePtr fontFamilyPtr fontFamily
      fontPtr font  brushPtr brush stringPtr string rectPtr|

    view := ScheduledControllers activeController view.
    gc := view graphicsContext.
    symbols := ByteSymbol allInstances select: [:each | each size > 1].

    gc medium gdiGraphicsPtrDo: [:graphicsPtr |
        graphics := graphicsPtr contents.
        interface := WinGDIPlusInterface current.
        "interface GdipSetTextRenderingHint: graphics with: 4."        "try 1, 4, or 5"

        aTime := Time millisecondsToRun: [
            10 timesRepeat: [
                x := 0.
                y := 0.

                namePtr := 'Arial' asTwoByteString gcCopyToHeapUnicode.
                fontFamilyPtr := interface GpFontFamily gcMalloc.
                interface GdipCreateFontFamilyFromName: namePtr with: 0 with: fontFamilyPtr.
                fontFamily := fontFamilyPtr contents.
   
                fontPtr := interface GpFont gcMalloc.
                interface GdipCreateFont: fontFamily with: 12 with: 0 with: 0 with: fontPtr.
                font := fontPtr contents.

                brushPtr := interface GpBrush gcMalloc.
                interface GdipCreateSolidFill: 16rFF000000 with: brushPtr.    "ARGB color"
                brush := brushPtr contents.

                1 to: 1300 do: [:i |
                    interface GdipSetClipRectI: graphics with: x with: y with: (view width // 17) with: 18 with: 0.
   
                    string := (symbols at: i) asString asTwoByteString.
                    stringPtr := string gcCopyToHeapUnicode.
                    rectPtr := interface RectF gcCalloc.
                    rectPtr memberAt: #X put: x.
                    rectPtr memberAt: #Y put: y.
                    interface GdipDrawString: graphics with: stringPtr with: string size with: font with: rectPtr  with: 0 with: brush.

                    x := x + (view width // 17).
                    x > view width ifTrue: [
                        x := 0.
                        y := y + 18.
                    ].
                ].
   
                interface GdipDeleteBrush: brush.
                interface GdipDeleteFont: font.
                interface GdipDeleteFontFamily: fontFamily.
            ].
        ].
    ].
    aTime inspect.


Notes:
- GDI+ also introduces classes that wrap the native "flat" Gdip* functions into nice objects.
  I did not port these classes from C++ yet, since they are not needed to use the gdiplus.dll.
- This code works on any Windows platform. If your OS is before XP please download the gdiplus.dll
  from the microsoft site.
- There exists a Mono open-source project that also has an implementation of GDI+ using Cairo,
  perhaps this can be used for Linux and Mac?

Paul Weustink


On 7-7-2010 22:14, Mark Plas wrote:

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                               ; ;              ifTrue:

                                                                                                                                                               ; ;                              [x := 0.

                                                                                                                                                               ; ;                              y := y + 18]]].

                                                                                              cr paint]]]

 

 

 

 
 
_______________________________________________
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] Text display tuning question

Mark Plas

Hi Paul,

 

If you could put this in the public repository that would be great. In the past I already thought of trying some things out with GDI+ but never got to actually doing it. This would be an easy way of doing some experiments with it.

 

Mark

 

From: Paul Weustink [mailto:[hidden email]]
Sent: maandag 12 juli 2010 14:07
To: Mark Plas
Cc: VWNC List
Subject: Re: [vwnc] [cairo] Text display tuning question

 

Hi Mark,

There is no package , I did start with the WinGDIPlusInterface from the repository. Added the missing Gdip functions by changing the gdiplusflat.h file a bit (basically fixing errors from MS and some typedefs of structs) and parse it with the DLLCC tools.

The nice objects from C++ like Graphics, Pen, Brush, Font, etc are still lacking, but the flat functions work fine.

Perhaps, if someone is interested, we could update the package in the repository with the new stuff?
Actually I asked earlier if someone did some work on GDI+ already, no answers so I wonder who uses it?

Paul

On 12-7-2010 13:54, Mark Plas wrote:

Hi Paul,

 

Where did you get the package containing the gdiplusflat.h api? It's not the WinGDIPlusInterface from the public repository I believe?

 

Mark

 

From: Paul Weustink [[hidden email]]
Sent: maandag 12 juli 2010 12:26
To: Mark Plas
Cc: VWNC List
Subject: Re: [vwnc] [cairo] Text display tuning question

 

Mark,

I've tried your example with GDI+ and direct screen output (so without the pixmap).
These are my results (on a Pentium4 with XP-SP3):

    VW7                     530 ms    (your example without pixmap buffering)
    GDI+                   1093 ms
    GDI+ smooth             880 ms    (anti-alias style font rendering)
    GDI+ cleartype         1120 ms    (clear-type style font rendering)


Better than I expected. This is the code I used:

    | view x y gc graphics interface symbols aTime namePtr fontFamilyPtr fontFamily
      fontPtr font  brushPtr brush stringPtr string rectPtr|

    view := ScheduledControllers activeController view.
    gc := view graphicsContext.
    symbols := ByteSymbol allInstances select: [:each | each size > 1].

    gc medium gdiGraphicsPtrDo: [:graphicsPtr |
        graphics := graphicsPtr contents.
        interface := WinGDIPlusInterface current.
        "interface GdipSetTextRenderingHint: graphics with: 4."        "try 1, 4, or 5"

        aTime := Time millisecondsToRun: [
            10 timesRepeat: [
                x := 0.
                y := 0.

                namePtr := 'Arial' asTwoByteString gcCopyToHeapUnicode.
                fontFamilyPtr := interface GpFontFamily gcMalloc.
                interface GdipCreateFontFamilyFromName: namePtr with: 0 with: fontFamilyPtr.
                fontFamily := fontFamilyPtr contents.
   
                fontPtr := interface GpFont gcMalloc.
                interface GdipCreateFont: fontFamily with: 12 with: 0 with: 0 with: fontPtr.
                font := fontPtr contents.

                brushPtr := interface GpBrush gcMalloc.
                interface GdipCreateSolidFill: 16rFF000000 with: brushPtr.    "ARGB color"
                brush := brushPtr contents.

                1 to: 1300 do: [:i |
                    interface GdipSetClipRectI: graphics with: x with: y with: (view width // 17) with: 18 with: 0.
   
                    string := (symbols at: i) asString asTwoByteString.
                    stringPtr := string gcCopyToHeapUnicode.
                    rectPtr := interface RectF gcCalloc.
                    rectPtr memberAt: #X put: x.
                    rectPtr memberAt: #Y put: y.
                    interface GdipDrawString: graphics with: stringPtr with: string size with: font with: rectPtr  with: 0 with: brush.

                    x := x + (view width // 17).
                    x > view width ifTrue: [
                        x := 0.
                        y := y + 18.
                    ].
                ].
   
                interface GdipDeleteBrush: brush.
                interface GdipDeleteFont: font.
                interface GdipDeleteFontFamily: fontFamily.
            ].
        ].
    ].
    aTime inspect.


Notes:
- GDI+ also introduces classes that wrap the native "flat" Gdip* functions into nice objects.
  I did not port these classes from C++ yet, since they are not needed to use the gdiplus.dll.
- This code works on any Windows platform. If your OS is before XP please download the gdiplus.dll
  from the microsoft site.
- There exists a Mono open-source project that also has an implementation of GDI+ using Cairo,
  perhaps this can be used for Linux and Mac?

Paul Weustink


On 7-7-2010 22:14, Mark Plas wrote:

Hi,

 

How can I get the displaying of text in Cairo faster? Compared to displaying text using the standard VW GraphicsContext, Cairo appears to be around 7x slower.

 

Below are two scripts that can be run from a workspace. I first maximize the workspace window and then I run it. The scripts display 1300 strings on screen (1900x1200 pixels in my case) in a gridlike fashion and repeat this 10x. I use double buffering for both versions with the GraphicsContext version drawing on a Pixmap and the Cairo version using #groupWhile: [].

 

Running the GraphicsContext version takes about 290ms on my computer. With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown here) it's about the same performance as Cairo's #showText.

 

In an application that shows lots of data in grid, scrolling page by page through the data really is sluggish when it's being displayed using Cairo.

 

How can I improve this?

 

Thanks,

Mark

 

Here are the scripts:

 

GraphicsContext version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

thePixmap := Pixmap extent: view extent.

gc := thePixmap graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [x := 0.

                                                               y := 0.

                                                               gc font: ((FontDescription new)

                                                                                                              family: 'Arial';

                                                                                                              pixelSize: 12).

                                                               1 to: 1300

                                                                              do:

                                                                                              [:i |

                                                                                              gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                              gc displayString: (symbols at: i) at: x @ y + 16.

                                                                                              x := x + (view width // 17).

                                                                                              x > view width

                                                                                                              ifTrue:

                                                                                                                             [x := 0.

                                                                                                                             y := y + 18]].

                                                               thePixmap displayOn: view graphicsContext.

                                                               view flush]]

 

 

Cairo version:

 

 

| view gc x y |

view := ScheduledControllers activeController view.

gc := view graphicsContext.

symbols := ByteSymbol allInstances select: [:each | each size > 1].

Time millisecondsToRun:

                               [10 timesRepeat:

                                                               [gc newCairoContextWhile:

                                                                                              [:cr |

                                                                                              x := 0.

                                                                                              y := 0.

                                                                                              cr selectFontFace: 'Arial'.

                                                                                              cr fontSize: 10.

                                                                                              cr groupWhile:

                                                                                                                             [1 to: 1300

                                                                                                                                             do:

                                                                                                                                                             [:i |

                                                                                                                                                             cr resetClip.

                                                                                                                                                             cr rectangle: (x @ y extent: (view width // 17) @ 18).

                                                                                                                                                             cr clip.

                                                                                                                                                             cr moveTo: x @ (y + 16).

                                                                                                                                                             cr showText: (symbols at: i).

                                                                                                                                                             x := x + (view width // 17).

                                                                                                                                                             x > view width

                                                                                                                                                               ; ;              ifTrue:

                                                                                                                                                               ; ;                              [x := 0.

                                                                                                                                                               ; ;                              y := y + 18]]].

                                                                                              cr paint]]]

 

 

 

 
 
_______________________________________________
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] Text display tuning question

Maarten Mostert-2
In reply to this post by paul weustink-4
The thing you describe becomes more of a write many times deploy once thing.
Are you using the VW context And the Cairo Context And the GDI+ context ?

When making scaled WYSIWYG pdf documents with Cairo, I allready run into problems when fonts in VW's widgets when do
not match exactly the Cairo fhttp://webmail1g.orange.fr/webmail/fr_FR/write.html#ont widths. So personnally I am
awaiting the day that all can be done within the same API.

The Guys from Cairo however very often discuss performance issues, so if I where you I would first checkout and
verify that it cannot be done in a different Cairo Way.

If I understand the explanations on multi platform font systems, I understand that there are not so many
alternatives to Cairo and Pango.

Regards,

@Maarten,


> Message du 12/07/10 14:27
> De : "Paul Weustink"

> A : "Mark Plas"
> Copie à : "VWNC List"
> Objet : Re: [vwnc] [cairo] Text display tuning question
>
> Hi Mark,
>
> There is no package , I did start with the WinGDIPlusInterface from the
> repository. Added the missing Gdip functions by changing the
> gdiplusflat.h file a bit (basically fixing errors from MS and some
> typedefs of structs) and parse it with the DLLCC tools.
>
> The nice objects from C++ like Graphics, Pen, Brush, Font, etc are still
> lacking, but the flat functions work fine.
>
> Perhaps, if someone is interested, we could update the package in the
> repository with the new stuff?
> Actually I asked earlier if someone did some work on GDI+ already, no
> answers so I wonder who uses it?
>
> Paul
>
> On 12-7-2010 13:54, Mark Plas wrote:
> >
> > Hi Paul,
> >
> > Where did you get the package containing the gdiplusflat.h api? It's
> > not the WinGDIPlusInterface from the public repository I believe?
> >
> > Mark
> >
> > *From:* Paul Weustink [mailto:[hidden email]]
> > *Sent:* maandag 12 juli 2010 12:26
> > *To:* Mark Plas
> > *Cc:* VWNC List
> > *Subject:* Re: [vwnc] [cairo] Text display tuning question
> >
> > Mark,
> >
> > I've tried your example with GDI+ and direct screen output (so without
> > the pixmap).
> > These are my results (on a Pentium4 with XP-SP3):
> >
> > VW7 530 ms (your example without pixmap
> > buffering)
> > GDI+ 1093 ms
> > GDI+ smooth 880 ms (anti-alias style font rendering)
> > GDI+ cleartype 1120 ms (clear-type style font rendering)
> >
> > Better than I expected. This is the code I used:
> >
> > | view x y gc graphics interface symbols aTime namePtr
> > fontFamilyPtr fontFamily
> > fontPtr font brushPtr brush stringPtr string rectPtr|
> >
> > view := ScheduledControllers activeController view.
> > gc := view graphicsContext.
> > symbols := ByteSymbol allInstances select: [:each | each size > 1].
> >
> > gc medium gdiGraphicsPtrDo: [:graphicsPtr |
> > graphics := graphicsPtr contents.
> > interface := WinGDIPlusInterface current.
> > "interface GdipSetTextRenderingHint: graphics with: 4."
> > "try 1, 4, or 5"
> >
> > aTime := Time millisecondsToRun: [
> > 10 timesRepeat: [
> > x := 0.
> > y := 0.
> >
> > namePtr := 'Arial' asTwoByteString gcCopyToHeapUnicode.
> > fontFamilyPtr := interface GpFontFamily gcMalloc.
> > interface GdipCreateFontFamilyFromName: namePtr with:
> > 0 with: fontFamilyPtr.
> > fontFamily := fontFamilyPtr contents.
> >
> > fontPtr := interface GpFont gcMalloc.
> > interface GdipCreateFont: fontFamily with: 12 with: 0
> > with: 0 with: fontPtr.
> > font := fontPtr contents.
> >
> > brushPtr := interface GpBrush gcMalloc.
> > interface GdipCreateSolidFill: 16rFF000000 with:
> > brushPtr. "ARGB color"
> > brush := brushPtr contents.
> >
> > 1 to: 1300 do: [:i |
> > interface GdipSetClipRectI: graphics with: x with:
> > y with: (view width // 17) with: 18 with: 0.
> >
> > string := (symbols at: i) asString asTwoByteString.
> > stringPtr := string gcCopyToHeapUnicode.
> > rectPtr := interface RectF gcCalloc.
> > rectPtr memberAt: #X put: x.
> > rectPtr memberAt: #Y put: y.
> > interface GdipDrawString: graphics with: stringPtr
> > with: string size with: font with: rectPtr with: 0 with: brush.
> >
> > x := x + (view width // 17).
> > x > view width ifTrue: [
> > x := 0.
> > y := y + 18.
> > ].
> > ].
> >
> > interface GdipDeleteBrush: brush.
> > interface GdipDeleteFont: font.
> > interface GdipDeleteFontFamily: fontFamily.
> > ].
> > ].
> > ].
> > aTime inspect.
> >
> > Notes:
> > - GDI+ also introduces classes that wrap the native "flat" Gdip*
> > functions into nice objects.
> > I did not port these classes from C++ yet, since they are not needed
> > to use the gdiplus.dll.
> > - This code works on any Windows platform. If your OS is before XP
> > please download the gdiplus.dll
> > from the microsoft site.
> > - There exists a Mono open-source project that also has an
> > implementation of GDI+ using Cairo,
> > perhaps this can be used for Linux and Mac?
> >
> > Paul Weustink
> >
> >
> > On 7-7-2010 22:14, Mark Plas wrote:
> >
> > Hi,
> >
> > How can I get the displaying of text in Cairo faster? Compared to
> > displaying text using the standard VW GraphicsContext, Cairo appears
> > to be around 7x slower.
> >
> > Below are two scripts that can be run from a workspace. I first
> > maximize the workspace window and then I run it. The scripts display
> > 1300 strings on screen (1900x1200 pixels in my case) in a gridlike
> > fashion and repeat this 10x. I use double buffering for both versions
> > with the GraphicsContext version drawing on a Pixmap and the Cairo
> > version using #groupWhile: [].
> >
> > Running the GraphicsContext version takes about 290ms on my computer.
> > With Cairo it takes 2050ms. That's 7x slower! Using Pango (not shown
> > here) it's about the same performance as Cairo's #showText.
> >
> > In an application that shows lots of data in grid, scrolling page by
> > page through the data really is sluggish when it's being displayed
> > using Cairo.
> >
> > How can I improve this?
> >
> > Thanks,
> >
> > Mark
> >
> > Here are the scripts:
> >
> > GraphicsContext version:
> >
> > | view gc x y |
> >
> > view := ScheduledControllers activeController view.
> >
> > thePixmap := Pixmap extent: view extent.
> >
> > gc := thePixmap graphicsContext.
> >
> > symbols := ByteSymbol allInstances select: [:each | each size > 1].
> >
> > Time millisecondsToRun:
> >
> > [10 timesRepeat:
> >
> > [x := 0.
> >
> > y := 0.
> >
> > gc
> > font: ((FontDescription new)
> >
> >
> > family: 'Arial';
> >
> >
> > pixelSize: 12).
> >
> > 1 to: 1300
> >
> >
> > do:
> >
> >
> > [:i |
> >
> >
> > gc clippingRectangle: (x @ y extent: (view width // 17) @ 18).
> >
> >
> > gc displayString: (symbols at: i) at: x @ y + 16.
> >
> >
> > x := x + (view width // 17).
> >
> >
> > x > view width
> >
> >
> > ifTrue:
> >
> >
> > [x := 0.
> >
> >
> > y := y + 18]].
> >
> >
> > thePixmap displayOn: view graphicsContext.
> >
> > view
> > flush]]
> >
> > Cairo version:
> >
> > | view gc x y |
> >
> > view := ScheduledControllers activeController view.
> >
> > gc := view graphicsContext.
> >
> > symbols := ByteSymbol allInstances select: [:each | each size > 1].
> >
> > Time millisecondsToRun:
> >
> > [10 timesRepeat:
> >
> > [gc
> > newCairoContextWhile:
> >
> >
> > [:cr |
> >
> >
> > x := 0.
> >
> >
> > y := 0.
> >
> >
> > cr selectFontFace: 'Arial'.
> >
> >
> > cr fontSize: 10.
> >
> >
> > cr groupWhile:
> >
> >
> > [1 to: 1300
> >
> >
> > do:
> >
> >
> > [:i |
> >
> >
> > cr resetClip.
> >
> >
> > cr rectangle: (x @ y extent: (view width // 17) @ 18).
> >
> >
> > cr clip.
> >
> >
> > cr moveTo: x @ (y + 16).
> >
> >
> > cr showText: (symbols at: i).
> >
> >
> > x := x + (view width // 17).
> >
> >
> > x > view width
> >
> >
> > ; ifTrue:
> >
> >
> > ; [x := 0.
> >
> >
> > ; y := y + 18]]].
> >
> >
> > cr paint]]]
> >
> >
> >
> > _______________________________________________
> > 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