Use Windows (TTF) font in R graphics
Is it possible to use a TTF font in R? Is the cairo package intended for this task? How would a minimal example look like? ...
Is it possible to use a TTF font in R? Is the cairo package intended for this task? How would a minimal example look like? ...
My program draws circles moving on the window. I think I must be missing some basic gtk/cairo concept because it seems to be running too slowly/stutteringly for what I am doing. Any ideas? Thanks for any help! #!/usr/bin/python import gtk import gtk.gdk as gdk import math import random import gobject # The number of circles and the w...
I need to programmatically add additional graphical elements onto an existing, static PDF book cover. Right now I use pycairo to draw onto a transparent PDFSurface, then merge it into the existing static PDF using pyPdf. This way, the PDFSurface works as an overlay. However, the transparent PDF is exactly the same size as the static PDF...
It seems like given the information in stroke_extents() and the translate(x, y) and scale(x, y) functions, I should be able to take any arbitrary cairo (I'm using pycairo) path and "best fit" it. In other words, center it and expand it to fill the available space. Before drawing the path, I have scaled the canvas such that the origin is...
I use cairo to render a simple text onto a cairo surface. I use a freetype font for that (Vera.ttf if that matters). It works, but sometimes characters disappear from the output. In fact only the numbers. I drew a text 'Demostream 1..' and sometimes the '1' disappears from the output and I have absolutely no idea why. The number is defit...
Hello good people! :) I want to render parts of a svg file by name but for the life of me I cannot figure out how to do so (using python + gtk). Here's the svg file in question: http://david.bellot.free.fr/svg-cards/files/SVG-cards-2.0.1.tar.gz (Update: this file no longer exists, but you can track it down at http://svg-cards.sourcefor...
I'm trying to build OpenSceneGraph's pdf plugin on a win32 box. The plugin is using cmake's PKG_CHECK_MODULES macro to find cairo and poppler libraries. I don't know how to install these in such a way as to help it find them though. ...
I want to draw an image on a window using Cairo. How can I load a bmp or png from disk and create a brush from it? The code below shows where drawing should be made. The expose signal is attached to the window. gboolean OnExpose(GtkWidget *widget, GdkEventExpose *event, gpointer data) { cairo_t *cr; cr = gdk_cairo_create(wi...
Hi, I have a GTK button on my GUI app, however, the hover effects are different for both Linux and Windows: Heres Linux: http://imgur.com/DKAy6 Heres Windows: http://imgur.com/v0FFU I did not do anything fancy to the animations, in fact, the animation is default, how can I make it uniform? Thank you. ...
Hey there, I am trying to install the cairo ruby gem on OSX 10.6. There seems to be a bug in the extconf.rb, which I've patched, but now I don't know how to create a gem, so I can install it... gem build folder won't work because there is no gemspec file or whatever (I've got absolutely no experience with gems^^), and gem install wants ...
I have a bunch of coordinates which are the control points of a clamped uniform cubic B-spline on the 2D plane. I would like to draw this curve using Cairo calls (in Python, using Cairo's Python bindings), but as far as I know, Cairo supports Bézier curves only. I also know that the segments of a B-spline between two control points can b...
I'm getting this error when starting anything that uses the Pango library. I'm using Kubuntu 9.10. I've done 'sudo apt-get --reinstall install' on libgtk* libcairo* libpango* and fontconfig, with no luck. Could someone point me in the right direction? Thanks. ...
I've done this many times on 32 bit CentOS and everything went ok without a hitch. But now, on x64 CentOS, I can't get cairo to find pixman. Pixman 0.18.0 is installed in /usr/local/lib (which I believe is the usual location). Configure for Cairo 1.8.10 can't find it: checking for cairo's image surface backend feature... checking for ...
How do I create shaped windows in Gtkmm. The shape must be defined using cairomm. ...
Hello, I'm searching for a library to get the outline of a glyph in a true type font on a linux system. We are using Pango and Cairo but unfortunatly I didn't find anything. I'm looking for somethig similar to GlyphTypeface.GetGlyphOutline under .NET Any help or hints are appreciated! Thanks in advance ...
After create a Pycairo context and surface (ImageSurface) I get a diferent export results if I get directly from surface buffer surface.get_data() or from PNG export method surface.write_to_png() The context antialias flag is obviously the same and, yes, the get_data method result has antialiasing, but with much poorer quality. Wh...
I want to process the data in the file "output.log" and feed it to graphdata['eth0] I have done this but it process only the first line: logread = open("output.log", "r").readlines() for line in logread: print "line", line i = line.rstrip("\n") b = float(i) colors = [ (0.2, 03, .65), (0.5, 0.7, .1), (.35...
hi, i am using cairoplot, to make graphs, however the file from where i am reading the data is growing huge and its taking a long time to process the graph is there any real-time way to produce cairo graph, or at least store the previous readings..like rrd. -krisdigitx ...
I a drawing a graph using Cairo (pycairo specifically) and I need to know how can I draw text inside a circle without overlapping it, by keeping it inside the bounds of the circle. I have this simple code snippet that draws a letter "a" inside the circle: ''' Created on May 8, 2010 @author: mrios ''' import cairo, math WIDTH, HEIGHT =...
I've got a GTK graphics window showing communcation between various devices, and I'd like to bring up another window giving more detail when the user clicks on one of the devices. I'm using pixbufs for the drawing, and the windows won't be modal. What's the simplest way to bring up more windows that can overlap and be moved around inde...