Questions tagged [drawingarea]

DrawingArea is a GTK widget for custom user interface elements.

41 questions
1
vote
1 answer

How to display a GStreamer pipeline inside a Gtk window with a specific size?

I'm working on a Python script that creates a GStreamer pipeline and displays the video output inside a Gtk window. The current code opens two windows: one with the title "Video Window" but with no content, and another one with the GStreamer…
Aninano
  • 83
  • 1
  • 9
1
vote
0 answers

Python - GTK Show Tooltip on DrawingArea Shapes

I have two rectangles on a drawing area. I need to show different tooltips on the rectangles. For example: Tooltip1: Rectangle1, Tooltip2: Rectangle2. Are there any ways to do it (maybe by using mouse location on the widget or by using shape on the…
demirod
  • 81
  • 15
1
vote
1 answer

PyGtk3 scaling GdkPixbuf makes Gtk.DrawingArea drawing slower

I've got the following hierarchy: ScrolledWindow ViewPort DrawingArea I've implemented a Zoom tool which basically scales a GdkPixbuf that I draw in my DrawingArea. Originally, the image is 1280x1040. When moving the scrolls, the Draw callback…
deko
  • 463
  • 1
  • 6
  • 17
1
vote
2 answers

In GTK3, how do I get a DrawingArea to respond keyboard events?

In GTK3, how do I get a DrawingArea to respond keyboard events? Should I connect the DrawingArea with a signal or is it more compicated? I'm using GTK3 with the C language.
user7948550
1
vote
1 answer

Transparent background of gtk.DrawingArea in python

I got a problem to set the transparent background of drawing area. The reason what I want this is that I have a main window where is background def draw_pixbuf(self,widget, event): path = 'test.jpg' pixbuf =…
Petr Pražák
  • 191
  • 2
  • 10
1
vote
1 answer

Failing to draw on a Gtk.DrawingArea

I'm not able to draw, i've already read tutorials, i can't find the problem. I simply have a correct UI drawed by Glade. Then i want to draw, for example 50 drawing areas. So i create a Grid with 50 cells; for each cell there is a vertical box (with…
FrancescoN
  • 2,146
  • 12
  • 34
  • 45
1
vote
1 answer

Retaining drawings in gtkmm using queue_draw

I want to draw multiple entities in drawing area. The background is painted every time queue_draw function is called. bool DrawingArea::on_draw(const Cairo::RefPtr& cr) { cr->set_source_rgb(1.0, 1.0, 1.0); // white…
Gurjot Bhatti
  • 977
  • 1
  • 10
  • 24
1
vote
0 answers

Painting a point in drawing area in gtkmm

I have created a drawing area using the following code in gtkmm: bool DrawingArea::on_draw(const Cairo::RefPtr& cr) { cr->set_source_rgb(1.0, 1.0, 1.0); // white…
Kamalpreet Grewal
  • 822
  • 1
  • 13
  • 28
1
vote
1 answer

GTK# Widget in front of another widget

How to bring a widget to the front of another widget? I want to put the timeLeft Label in front of the box DrawingArea My Code : box.SetSizeRequest((int)Math.Floor(size*2.5), size); box.ExposeEvent += boxExpose; theMainWindow.winFix.Put(box, x,…
Charlie
  • 148
  • 1
  • 16
1
vote
2 answers

GTK+ Drawing_Area Image Redraw with Expose Event

I have a program in C that basically reads an image into a char buffer, performs some manipulation to its pixels before displaying the image back to the screen. So far, the image displays fine; but I encountered the two issues below: When I…
0
votes
1 answer

GtkSharp: Scrolled DrawingArea not rendering correctly with IdentityMatrix

The following minimal examples puts a DrawingArea inside a ScrolledWindow. In the Drawn event reaction a (partial) disk is drawn. When the line args.Cr.IdentityMatrix(); is used, the drawing does not work correctly, although one should expect no…
0
votes
0 answers

gtkmm drawing area on raspberry pi armhf not showing

There are some examples for programming with gtkmm 3.0, which can be found here: Gtk::DrawingArea example from upmf-grenoble When I compile this example on my pc (amd64), I get the expected Gtk::DrawingArea. When I compile this exact same example on…
bejo
  • 71
  • 7
0
votes
1 answer

How to draw_area with cairo

i am trying to 'update' lgi (lua gtk binding) examples, which are for gtk3 purpose is to draw geocentric view of solar system, in 2d, for start app has top row for input, below are 2 x 2 panned widget group - 1 x vertical layout, inside are 2 x…
aum hren
  • 13
  • 6
0
votes
1 answer

How to trigger on_draw method in gtkmm 3.0 for a DrawingArea object

Using gtkmm 3.0, in a Gtk::Window object I have an object of a self defined class derived from the Gtk::DrawingArea named Anzeige. #include class Anzeige : public Gtk::DrawingArea { public: Anzeige(); virtual ~Anzeige(); …
bejo
  • 71
  • 7
0
votes
1 answer

How to Print Text to DrawingArea in Gnome-Shell-Extension

I'm doing my first gnome-shell extension (gnome shell 41.3) and I seem to encounter the most common problems, finding the right manual for that... What I try to achive is... A Widget shown (above everything) on the desktop... Draw something into…
Zappo-II
  • 21
  • 5