cairo

Using Cairo on iPhone?

I'm doing some work on a potentially cross-platform C++ application and for Windows and OS X it seems that Cairo will meet most of my needs for 2D graphics and allow me to share a lot of code between platforms. In an ideal world I'd really like to be able to use the same (or very similar) drawing code in iPhone/iPad apps. I realise tha...

Transforming verticies with center point and scale factor?

My application is a vector drawing application. It works with OpenGL. I will be modifying it to instead use the Cairo 2D graphics library. The issue is with zooming. With openGL camera and scale factor sort of work like this: float scalediv = Current_Scene().camera.ScaleFactor / 2.0f; float cameraX = GetCameraX(); float cameraY = Get...

Cairo Matrix equivillant of GlOrtho Matrix?

Given that I do something like this: void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble nearVal, GLdouble farVal); and the result is: http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xmlw could I achieve a matrix like this: http://cairographics.org/manual...

Cairo error message on exit

I'm currently doing some tests using Cairo to replace some existing GDI/GDI+ code in Visual C++ 2010 and it seems to be working fine, but I'm getting an error message each time I close down my application : "First-chance exception at 0x68e629dc in CairoTest.exe: 0xC0000005: Access violation reading location 0xabababa7" This error only ...

create cairo context without a present window object

Hi there, I am currently using libcairomm for graphic stuff in my program. All the internet examples use code like Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context(); But I am using cairo to pass a svg texture to OpenGL Is there a kind of constructor working without that window ? Thank you for the answers :) ...

How to use an SVG file as input for drawing with Cairo in a pyGTK application (python)?

I am writing a small python GTK application in which I have a drawing area that I am trying to "populate" using Cairo, which is a library I never used before (so bare with me if the answer is obvious and I did not see due to inexperience). What I am trying to achieve is using an SVG image as part of my drawing (if I got Cairo naming rig...

How to create cairo surface in guile

I have this code guile> (cairo-pdf-surface-create "foo.pdf" 100.0 100.0) ; and get this error standard input:29:1: In procedure cairo-pdf-surface-create in expression (cairo-pdf-surface-create "foo.pdf" 100.0 ...): standard input:29:1: Wrong type (expecting string): 100.0 ABORT: (wrong-type-arg) and when I use strings as width and hei...

Image memory in gtk+

I'm new in the field of gtk+. My question is that is there a way to render images very fast in gtk??? I mean is there a way to directly alter the image data in frame buffer or video ram or something like that? Do pixbufs do the same thing?? I need to apply this for a scrolling example. Is cairo good for fast rendering of images? ...

Font smoothing using cairo

I am trying to smooth text rendering using anti-aliasing. But it's not anti-aliased. See the picture http://tinypic.com/r/2h7dy1i/4 First line is a png image created using pango and cairo. Second line is just an html <span> tag. It's in firefox, Ubuntu with Gnome DE. The difference can be better understood if you compare "W" and "v" ...

How is the Mono.Cairo performance like?

I was thinking of using Mono.Cairo as the foundation for a light weight CAD system. But wasn't sure what the performance was like. CAD systems produce a lot of redraws and can have a lot of data in them, with a ton of text. If not Cairo then any other suggestions is welcomed. I want the app to run on Windows, Mac and Linux. ...

How to create a window using cairo on mac os x (as simple as possible)

I want to draw using cairo to a window on the mac. I want to use just C (not objective-c) with as little as possible infrastructure. I also don't want to use a event loop (I understand that cuts out interaction, redrawing by moving etc). In essence, I really just want to draw to the screen (window) as I would to a image file. Can someo...

AS3: Any chance using cairo graphics lib from as3? Through Alchemy?

I haven't seen any port of the cairo graphics library to AS3. Would it be possible to implement cairo solutions through Alchemy? Other possibilities? ...