[gtkada] Cairo Context 0x0

bertus.dries at planet.nl bertus.dries at planet.nl
Fri Jul 22 09:11:20 CEST 2016


I have been searching further and found in the comment of cairo.ads that I 
must connect to the "expose-event". That gave again problems until  on the 
internet I found that expose-event did not exist anymore and was replaced by 
your "draw" event. The question that remains is how to create a "draw" event 
so that I can retrieve the context to create lines with the functions that 
need the Context?

Once more I don't uncerstand why such a big change was necessary between 
GtkAda 2015 and 2016 and why it was carried out without extensive 
documentation  and examples/tutorials of how the differences must be 
handled?

-----Oorspronkelijk bericht----- 
From: bertus.dries at planet.nl
Sent: Thursday, July 21, 2016 3:59 PM
To: Emmanuel Briot
Cc: Gtkada groep
Subject: Re: [gtkada] Cairo Context 0x0

In the 2015 version of Gtkada from AdaCore I could create The Cairo context
before I even connected to On_Area_Draw

-----Oorspronkelijk bericht----- 
From: bertus.dries at planet.nl
Sent: Thursday, July 21, 2016 2:16 PM
To: Emmanuel Briot
Cc: Gtkada groep
Subject: Re: [gtkada] Cairo Context 0x0

Now put the draw routine within the On_Area_Draw bit before I can create any
interactive action I have to draw something So now I have to use
On_Area_Draw(null) and again the segmentation fault occurred.
I need to have the cairo context, I see no other way,
So

Again: How do I do that???

-----Oorspronkelijk bericht----- 
From: Emmanuel Briot
Sent: Thursday, July 21, 2016 12:54 PM
To: bertus.dries at planet.nl
Subject: Re: [gtkada] Cairo Context 0x0

> In the initiation proces of the drawing area I  am connecting  the "draw" 
> event to a handler and want to start drawing my starting figures
> with:
> Event_Cb.Connect (MainWindow.DrawingArea, "draw",
>                 Event_Cb.To_Marshaller (On_Area_Draw'Access));
>
> The first thing is setting the line thickness with:  Set_Line_Width(CR, 
> 3.0); . I have commented the Save(CR) out. The segmentation  fault has 
> transferred to this point. I need the context there. How do I get it?


Again:
you do everything in On_Area_Draw, nowhere else.

-----
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 2016.0.7688 / Virusdatabase: 4627/12651 - datum van uitgifte:
07/21/16

_______________________________________________
gtkada mailing list
gtkada at lists.adacore.com
http://lists.adacore.com/mailman/listinfo/gtkada


-----
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 2016.0.7688 / Virusdatabase: 4627/12651 - datum van uitgifte:
07/21/16

_______________________________________________
gtkada mailing list
gtkada at lists.adacore.com
http://lists.adacore.com/mailman/listinfo/gtkada


-----
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 2016.0.7688 / Virusdatabase: 4627/12651 - datum van uitgifte: 
07/21/16 



More information about the gtkada mailing list