problem about cairo-Collection of common programming errors


  • gautirao
    cairo
    I have scourged google and SO for hours together but having no luck, hence posting it here.I am trying to use cairo graphics library on windows and have the GTK runtime installed. Could any one help me write a simple java program in eclipse ide using cairo libraries?.I will find my way around the api from there ( hopefully 🙂 )Thanks , Goutham

  • Computer Linguist
    asp.net multithreading mono cairo imaging
    The Mono.Cairo Homepage says “Don’t try to use Cairo in threads other than the main (Gdk) thread.”This would seem to imply that there is an issue using Cairo from multiple threads, such as in an ASP.NET application. I would like to know if Cairo and Mono.Cairo can safely be used from multiple threads simultaneously as long as there is no shared data involved. (each thread has its own context/surface, etc). If there is global locking, I would like to know about that as well. (System.Drawing.Grap

  • Flyear
    mono cairo
    sometimes the Cairo.Context.Arc method throw follow exception, 10/23/2013 10:14:29 Application Runtime Terminated| 10/23/2013 10:14:29 UnhandledException: {0}|System.ExecutionEngineException: SIGILLat Cairo.Context.Arc (Double xc, Double yc, Double radius, Double angle1, Double angle2) [0x00000] in :0

  • reisner
    gnuplot cairo
    I’m having the same problem as this question. I tried installing the libcairo library with the commandsudo yum install cairo-develAfter that, I removed and installed gnuplot through yum. I still get the same error. What else do I need to do to get gnuplot to let me use pngcairo?I also installed pango through yum.When I try installing gnuplot from source I get these messages in my config.log:configure:11776: checking for CAIROPANGO configure:11784: $PKG_CONFIG –exists –print-errors “cairo >=

  • al92
    gtk cairo gtk3
    I’m trying to do some basic drawing and am following this tutorial. The code compiles fine, but I receive this error at runtime:GLib-GObject-WARNING **: /build/buildd/glib2.0-2.34.1/./gobject/gsignal.c:2459: signal ‘draw’ is invalid for instance ‘0x1073ee0’Based off what I’ve read on forums, the export-event signal was replaced with draw in one of the newer versions of GTK, which confused me since GTK3 is the Ubuntu repo (running Mint).Any ideas? Using export-event leads to a segfault.

  • pHorniCaiTe
    python windows cairo
    Alright, I’ve been coming here for help for years, and now I finally have a question that isn’t covered. I’m trying to take a .txt file from my AS/400 print queue(no problems here), and output each “page” as a PDF(the next step is merging them into one file). Ive got the formatting part down, and I can create a single page document correctly with no issues.I’ve taken the code that generates the single pages, and expanded it to handle files that contain multiple pages when “printed” with adobe wr

  • enthusiasticgeek
    c++ gtk cairo gtkmm
    I am using gtkmm2.4 on Ubuntu 10.04. (Hence my example contains on_expose_event() routine instead of on_draw()). It seems that the window is not present in VBox referring to get_window() in on_expose_event(). Do I have to add it?Original code http://developer.gnome.org/gtkmm-tutorial/2.22/gtkmm-tutorial.html#sec-drawing-clock-exampleMy code is test.h#ifndef TEST_H #define TEST_H#include <gtkmm.h>class TEST : public virtual Gtk::Window {private:public:TEST();virtual ~TEST();protected:Gtk::V

  • dwjohnston
    gtk cairo
    I’m going out of my mind a bit here. I’m trying to draw some simple graphics on my GTK form using cairo. #include <stdio.h> #include <gtk/gtk.h> #include <cairo.h>GtkWidget* window; GtkWidget* darea; int main(int argc, char **argv) {gtk_init(&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);gtk_window_set_default_size(GTK_WINDOW(window), 390, 240);darea = gtk_drawing_area_new();gtk_container_add(GTK_CONTAINER(window), darea); cairo_t *cr; cr = gdk_cairo_c

  • liberforce
    gtk mingw cairo gtk2 pixmap
    I have copied and compiled the source code available in the section titled “Full Source”.http://cairographics.org/threaded_animation_with_cairo/I adapted this code to a project that I’m working on only to find that the app would crash when I made the window too big. Going back to the original example code, it too crashes when the window is too big (> 1000×1000 or so).I narrowed down in the example that this line appears to be responsible:pixmap = gdk_pixmap_new(window->window,500,500,-1);Where

  • ishuah
    python django cairo mapnik
    I’m using mapnik to render maps in PDF format and I’ve run into a messy problem.def writeFile(m, mapId):response = HttpResponse(content_type=’application/pdf’)response[‘Content-Disposition’] = ‘attachment; filename=test.pdf’map_surface = cairo.PDFSurface(response, 1200, 700)map_ctx = cairo.Context(map_surface)mapnik.render(m, map_ctx)legend = createLegend(map_ctx, mapId)map_surface.finish()return responseWe’re using Django. The above function work fine on my co-developer’s computer but crashes o

  • user1669243
    libxml2 cairo librsvg
    I’m looking to support rendering SVG images as Bitmaps, I’m using librsvg. So far it works well and draws using Cairo, hooray! However I’ve run into an issue:We have a control that is similar to Windows Explorer, e.g. it creates thumbnail-sized images of files in a directory, so the product would be extended to generate thumbnails of SVG’s.It uses background threads to generate the thumbnail images so the UI isn’t frozen as it’s working. The code has been in production for a long time so no p

  • Mike Insch
    c# mono gtk# cairo framebuffer
    I’m starting to write a small application for Linux under the Mono framework, the application will essentially be a small kiosk front-end with very minimal user interaction. This is to replace a previous version of the same application which was 100% text / console based.As this will run on a Raspberry Pi, I want to avoid running X and have my application talk to the Framebuffer directly. I’m set on using the Mono framework and C# as my development language since I know C# very well. Portabil

  • Tushar Gupta
    speech-recognition cairo
    I am trying to set up the Cairo-0.3 project and my rserver.sh, receiver.sh and transmitter.sh are successfully running but when i try to run execute the demo-recog.sh (A demo program in cairo) i get : Received an unhandled SIP response status code (ignoring it): 183 : Session progress2012-07-16 18:01:31,931 INFO {main} org.speechforge.cairo.demo.recog.RecognitionClientReceived the SIP Response. 2012-07-16 18:01:31,931 INFO {main} org.speechforge.cairo.demo.recog.RecognitionClient invite : o

  • Michoel
    android android-ndk cairo pango pangocairo
    I found someone who ported over Pango Cairo for Android NDK (blog post, source code). However I have not been succesfull in compiling his example project. Has anyone managed to do so and can tell me what I am doing wrong?This is what I have tried so far:git clone –recursive http://dev.laptop.org/git/users/cscott/android-libs/ git couldn’t find pixman for some reason, so did git clone http://cgit.freedesktop.org/pixman/, and moved to android-libs/jni/pixman copied contents of android-libs/jni/ t

  • user1005954
    gcc compilation include cairo
    I am trying to test out a few simple Cairo programs, but I am having trouble figuring how to include the source files. I have installed the Cairo library – it’s just a question of how to let gcc know…I have the .h files (including cairo.h) installed in /usr/local/include/cairo I have the .dylib files installed in /usr/local/lib and /usr/local/lib/cairoAre there any other components of the installation I should be aware of? (I just did ‘make install’ to install the library)I am trying to compi

  • John S Gruber
    compiling c++ cairo
    I’m new in Ubuntu and trying to compile a C++ code on it. The code uses 2 dependencies (Cairographics and FFTW3). I have installed both of them using ./configure, make and make install in directory $HOME/prefix/ (following the instruction given here How to install Cairo 1.8.10 )Now I have in this directory 4 folders, namely bin, include, lib and shareThe make file of the code requires specifying the dependencies’ directory. Like thatINC := -I$HOME/prefic/include LIB := -L$HOME/prefic/libWhen I

  • Oswald
    c++ gtk gtkmm cairo gdk
    I have written the following code to set the cursor of a Gtk::Window from a Cairo::Context. When I run the program and move the cursor into the window, the cursor changes to a horizontal black line at the top, followed by some undefinable white shape at the bottom. I was expecting the cursor to change into a black 16×16 square. Why doesn’t the cursor assume the shape I intended?#include <gtkmm.h>const int size = 16, hotspot = 0;class Window : public Gtk::Window {public:void change_cursor()

  • kloffy
    build make mingw cairo libpng
    I’m trying to build cairo on Windows using MinGW (and MSYS). I am following the instrucions on Compiling GTK+ 2.16.4 for Windows, except that I’m using the latest versions whenever possible, i.e:zlib-1.2.3 libpng-1.2.42 pixman-0.17.4 cairo-1.8.8This works pretty well up until when I try to build the actual cairo. The configuration succeeds, but during make cairo seems to have problems linking to my build of libpng. After a little while I get a long list of errors such as this:.libs/cairo-png.o:

  • Dason
    r cairo
    I’m working on cairo devices. I’m generating cairo_pdf and getting error message shown below. cairo_pdf(“DATA”) Warning messages: 1: In cairo_pdf(“DATA”) :unable to load shared object ‘/usr/local/lib64/R/library/grDevices/libs//cairo.so’:/usr/local/lib64/R/library/grDevices/libs//cairo.so: undefined symbol: png_set_longjmp_fn 2: In cairo_pdf(“DATA”) : failed to load cairo DLLHow can I fix this?

  • Paul Hiemstra
    r cairo
    I searched and could not really find an answer for this. I have a CentOS server that does not have and RHN connectivity. I need to install cairo and libcairo2 to make rapache work. I did find the cairo tar file, and installed it sucessfully. When I attempted to install R cairo package, it failed with this error:R CMD INSTALL -l /usr/local/lib64/R/library Cairo_1.5-1.tar.gzerror: checking whether Cairo programs can be compiled… configure: error: Cannot compile a simple Cairo program. See confi

  • user1981275
    r install cairo
    I am working on a headless ubuntu machine with most of the cairo requirements preinstalled, but I am stumbling on getting R to use Cairo. Does anyone know what flags or additional packages I need to set/install in order to have install.packages build Cairo correctly with the existing installs of its dependencies? The tricks: I cannot use sudo commands or apt-get, and additional software must involve <50Mb of memory. Is this possible? It looks like most everything I need is present, if I ca

  • bwarren2
    r cairo
    I have built and installed libcairo2-dev from source on a machine without apt-get or sudo, but cannot get R to see the Cairo header files (for install.packages(‘Cairo’) to work). My end goal is R working with Cairo, and building this way and linking Cairo to R is the best route I see. Thoughts on how to get R to see my built Cairo?R encounters the error below from install.packages(‘Cairo’), but I see the required file in the flag requested by the error message.configure: CAIRO_CFLAGS=-L/app/ve

  • dilettant
    windows haskell cairo
    I have problem with ghci+cairo on windows. When I try to load, for example like this “ghci -package cairo” it fails with the following error:Loading package random-1.0.0.2 … linking … done. Loading package haskell98 … linking … done. Loading package syb-0.1.0.2 … linking … done. Loading package base-3.0.3.2 … linking … done. Loading package mtl-1.1.0.2 … linking … done. : C:\Users\alexeys\AppData\Roaming\cabal\cairo-0.12.0\ghc-6.12.3\HScairo-0.12.0.o: unknown symbol `_cairo_s

  • Narcisse Doudieu Siewe
    gtk cairo
    I try to make a simple rounded_rectangle with cairo and gtk+-3.6.1 on windows but something goes wrong. think that somithings goes wrong with this version of gtk+-3.6.1 on windows taken from http://www.tarnyko.net/en/. Here are some errors from my code::blocks IDE main.c (file);#include <stdlib.h> #include <gtk/gtk.h> #include “roundedrectangle.h”int main(int argc, char *argv[]) {gtk_init(&argc, &argv);GtkWidget *win = gtk_window_new(GTK_WINDOW_TOPLEVEL);//cairo_surface_t *s

  • sbaechler
    python distutils cairo py2app pycairo
    I just fixed a bug in a two year old python program and now I’m having big trouble getting it to compile again. I simply cannot get Python, Cairo, wx and distutils to work together.On OSX I managed to get Python 2.7 to import Cairo and WX but py2app does not work. The error is something about unknown architecture.On Windows 7 I have not been able to successfully import cairo. I installed py2cairo and put the libcairo-2.dll in Windows/System32 but still get an import error. I even copied msvcr90.

  • Gooberpatrol66
    opengl cairo msys
    I’m building Cairo 1.12.14 with MSYS on Windows.Successfully configured with –enable-gl=yes, however, when I run make, I get the following error:make all-recursive make[1]: Entering directory `/c/Users/Nathan/BuildCairo/cairo’ Making all in src make[2]: Entering directory `/c/Users/Nathan/BuildCairo/cairo/src’ make all-am make[3]: Entering directory `/c/Users/Nathan/BuildCairo/cairo/src’CC cairo-png.loCC cairo-gl-composite.lo In file included from cairo-gl-composite.c:48:0: cairo-gl-p

Web site is in building