comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Gtk3 Cairo Context 0x0
Date: Thu, 21 Jul 2016 16:42:41 +0200
Date: 2016-07-21T16:42:41+02:00	[thread overview]
Message-ID: <5790df74$0$32235$e4fe514c@news.kpn.nl> (raw)

I am creating a new Drawing_Area.
I have packed the drawing Area in a Viewport which is packed in a scrolled 
window.
Now have the program line:
CR := Create(Get_Window (MainWindow.DrawingArea));
where MainWindow.DrawingArea is type Gtk_Drawing_Area with the value 
0x4694f98 (meaning the value is no null)
created with Gtk_New (MainWindow.DrawingArea);
The Cairo context CR has however a value 0x0 which finally results when 
using Save(CR);
in:
Program received signal SIGSEGV, Segmentation fault.
cairo_save (cr=0x0) at ../../src/src/cairo.c:409
409 ../../src/src/cairo.c: No such file or directory.
Current language: auto
The current source language is "auto; currently c".

In the version 2015 of GtkAda from AdaCore the create function  worked and 
was positioned after the creation of the Drawing Area but before the 
connection to the "draw" event.
On the Gtkada group I do get only the answer that only in the handler I can 
get the context but that means that I cannot create a framework within the 
area before any work with on the area because therefore I need the cairo 
context f.i. to set s line color.

What must I do to retrieve a valid CR?

Bertus


             reply	other threads:[~2016-07-21 14:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 14:42 ldries46 [this message]
2016-07-22  6:01 ` Gtk3 Cairo Context 0x0 Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox