Eric | 1 May 2007 18:12
Favicon

problem with windows installer

Hi all,

I just (five minutes ago) tried to install in the latest version of 
Gtk2Hs for windows, but the installer crashed complaining about an 
illegal instruction. Do you you know what the problem is?

Regards,

E.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Neil Mitchell | 1 May 2007 18:27
Picon
Gravatar

Re: problem with windows installer

Hi Eric

> I just (five minutes ago) tried to install in the latest version of
> Gtk2Hs for windows, but the installer crashed complaining about an
> illegal instruction. Do you you know what the problem is?

I've used the gtk installer several times without error, try deleting
it, checking for quota/disk space issues, and doing another install -
checking the reported size of the installer matches what you expect.

Thanks

Neil

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Eric | 1 May 2007 19:21
Favicon

Re: problem with windows installer


Neil Mitchell wrote:
>
> I've used the gtk installer several times without error, try deleting
> it, checking for quota/disk space issues, and doing another install -
> checking the reported size of the installer matches what you expect.
OK I tried again and it worked. Thanks!

E.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Toby Allsopp | 3 May 2007 10:52
Picon

Printing

Does gtk2hs provide any way to print (e.g. on paper)?  There seem to
be PDF and PS Cairo backends that are commented out of the build; what
is the status of these?

Toby.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Duncan Coutts | 3 May 2007 12:32
Picon
Picon
Favicon

Re: Printing

On Thu, 2007-05-03 at 20:52 +1200, Toby Allsopp wrote:
> Does gtk2hs provide any way to print (e.g. on paper)?  There seem to
> be PDF and PS Cairo backends that are commented out of the build; what
> is the status of these?

Our cairo binding currently only support cario api version 1.0. It would
be a great self-contained project for someone to update them to the
current 1.4 and get the other backends working.

If I recall correctly, since cairo 1.2 the pd and pdf backends are fully
supported upstream where as in 1.0 they were marked experimental and
usually not enable, which is why they are commented out in our binding.

The other thing that'll help printing is if we bind the GtkPrint stuff
which is new in Gtk+ 2.10. Unfortunately this looks like it needs some
work on the Gtk2Hs code generator. You see at the moment we use some
scripts written by the Gtk# developers to scan the Gtk+ header files and
generate an xml description of the Gtk+ API. We then have a Haskell
program which reads the xml and generates .chs modules. Unfortunately
the Gtk# folk are not very good at keeping up with the latest Gtk+
releases. I think the right thing to do is to switch to use a different
set of scripts that other language bindings (like pygtk and gtkmm) use.
Someone is working on the .def file format parser for that but it'll
take a little while.

So if anyone has any free time we have plenty for you to do! :-) Just
ask, or just get stuck in.

Duncan

(Continue reading)

Malte Milatz | 3 May 2007 16:45
Picon

Cairo.Matrix documentation

I just want to comment on an oddity in the documentation for the Matrix
type in Graphics.Rendering.Cairo.Matrix. Currently it states:

| data Matrix
| 
| Representation of a 2-D affine transformation as a matrix.
| 
| The Matrix type actually represents as 3x3 matrix but with some
| elements are constant and so are not included. 

I think it's a little odd to interpret the Matrix datatype as a 3x3
matrix, only to justify that it includes a translation vector. I would
have written something along the lines:

    data Matrix

    Representation of a 2-D affine transformation.

    The Matrix type represents a 2x2 transformation matrix along with a
    translation vector.

The documentation then goes on:

| Specifically if we assume that our
| coordinates are row vectors then correspondence is:

Aren't column vectors usually used in analytic geometry? I wouldn't have
had to scratch my head several times if the explanation were e. g. as
follows:

(Continue reading)

Eric | 3 May 2007 16:50
Favicon

A little help?

I've written the following program that is supposed to draw a line on 
the screen. Unfortunately when I run the program the line does not 
appear. Can you see what I've done wrong?

 > import Graphics.UI.Gtk
 > import Graphics.UI.Gtk.Windows.Window
 > import Graphics.UI.Gtk.Abstract.Widget
 > import Graphics.UI.Gtk.General.General
 > import Graphics.Rendering.Cairo

 > main = do
 > { initGUI
 > ; wnd <- windowNew
 > ; da <- drawingAreaNew

 > ; onDestroy wnd mainQuit

 > ; onExpose da (drawon da (lineTo 100 100))

 > ; set wnd [containerChild := da]

 > ; widgetShowAll wnd
 > ; mainGUI}

 > drawon :: DrawingArea -> Render() -> Event -> IO Bool
 > drawon da rdr (Expose{}) = do
 > { cnv <- widgetGetDrawWindow da
 > ; renderWithDrawable cnv rdr
 > ; return True}

(Continue reading)

Duncan Coutts | 3 May 2007 17:33
Picon
Picon
Favicon

Re: A little help?

On Thu, 2007-05-03 at 15:50 +0100, Eric wrote:
> I've written the following program that is supposed to draw a line on 
> the screen. Unfortunately when I run the program the line does not 
> appear. Can you see what I've done wrong?
> 
>  > import Graphics.UI.Gtk
>  > import Graphics.UI.Gtk.Windows.Window
>  > import Graphics.UI.Gtk.Abstract.Widget
>  > import Graphics.UI.Gtk.General.General
>  > import Graphics.Rendering.Cairo
> 
>  > main = do
>  > { initGUI
>  > ; wnd <- windowNew
>  > ; da <- drawingAreaNew
> 
>  > ; onDestroy wnd mainQuit
> 
>  > ; onExpose da (drawon da (lineTo 100 100))

This should be:

onExpose da (drawon da (lineTo 100 100 >> stroke))

The way cairo works is that you declare a bunch of paths, curves etc,
and you can set line fill colours and patterns etc. Nothing actually
happens yet though. When you're happy with all the settings then you can
either 'stroke' the current path, or 'fill' it (considering the path as
the outline of a shape to be filled).

(Continue reading)

Duncan Coutts | 3 May 2007 17:36
Picon
Picon
Favicon

Re: Cairo.Matrix documentation

On Thu, 2007-05-03 at 16:45 +0200, Malte Milatz wrote:
> I just want to comment on an oddity in the documentation for the Matrix
> type in Graphics.Rendering.Cairo.Matrix.

This all sounds sensible. If you send us a darcs patch with your changes
that'd be fantastic. You'd be looking at the haddock markup in
gtk2hs/cairo/Graphics/Rendering/Cairo/Matrix.chs

Duncan

>  Currently it states:
> 
> | data Matrix
> | 
> | Representation of a 2-D affine transformation as a matrix.
> | 
> | The Matrix type actually represents as 3x3 matrix but with some
> | elements are constant and so are not included. 
> 
> I think it's a little odd to interpret the Matrix datatype as a 3x3
> matrix, only to justify that it includes a translation vector. I would
> have written something along the lines:
> 
>     data Matrix
> 
>     Representation of a 2-D affine transformation.
> 
>     The Matrix type represents a 2x2 transformation matrix along with a
>     translation vector.
> 
(Continue reading)

Eric | 3 May 2007 18:32
Favicon

Re: A little help?

Thanks, it works now!

E.

Duncan Coutts wrote:
> On Thu, 2007-05-03 at 15:50 +0100, Eric wrote:
>   
>> I've written the following program that is supposed to draw a line on 
>> the screen. Unfortunately when I run the program the line does not 
>> appear. Can you see what I've done wrong?
>>
>>  > import Graphics.UI.Gtk
>>  > import Graphics.UI.Gtk.Windows.Window
>>  > import Graphics.UI.Gtk.Abstract.Widget
>>  > import Graphics.UI.Gtk.General.General
>>  > import Graphics.Rendering.Cairo
>>
>>  > main = do
>>  > { initGUI
>>  > ; wnd <- windowNew
>>  > ; da <- drawingAreaNew
>>
>>  > ; onDestroy wnd mainQuit
>>
>>  > ; onExpose da (drawon da (lineTo 100 100))
>>     
>
> This should be:
>
> onExpose da (drawon da (lineTo 100 100 >> stroke))
(Continue reading)


Gmane