Skip to content

jkriege2/cairoQPaintDevice

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

cairoQPaintDevice

library for Qt: QPaintDevice implementation that uses Cairo Graphics Library as a backend (e.g. for high-quality PDF/EPS/PNG/SVG output!). This library works and was tested with Qt >=4.7, but possibly works with all versions since Qt 4.0!

License & Previous projects

This project is licensed under the terms of the GNU General Public License >=3.0.

Parts of this project are based on ideas from the cairo4qt project by ""zgchan...@gmail.com"": https://code.google.com/p/cairo4qt/

Usage

Using this project is simple:

  1. compile the four project-files into your project:

SOURCES += qcairopaintdevice.cpp
qcairopaintengine.cpp

HEADERS += qcairopaintdevice.h
qcairopaintengine.h 2. link your project agains cairo:qmake INCLUDEPATH += cairo pixman-1 LIBS += -lcairo -lpixman-1 -lz -lpng win32:LIBS += -lgdi32 3. use the newly available QPaintDevice:c++ // include cairoQPaintDevice header #include "qcairopaintdevice.h"

// ...

// create paint device to draw to test.pdf, 200x100mm QCairoPaintDevice * cairoPDF=new QCairoPaintDevice(QSize(200,100), "test.pdf", QCairoPaintDevice::cftPDF);

// paint onto paint device { QPainter p; if (p.begin(cairoPDF)) { paint(p); } p.end(); }

// delete paint device and close/finalize file. delete cairoPDF; ```

About

library for Qt: QPaintDevice implementation that uses Cairo as a backend (e.g. for high-quality PDF/EPS/PNG/SVG output!)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published