C-based implementation of the GDI+ API
Перейти к файлу
Jo Shields 94a4987548 Bump dev version 2021-11-03 15:59:28 -04:00
.vscode Update gitignore and settings.json (#582) 2019-08-05 12:42:56 +02:00
docs Some minimal documentation about using valgrind to debug libgdiplus and about the different implementations to support regions 2006-03-23 15:31:01 +00:00
external Update googletest to v1.10 (#621) 2020-01-13 17:17:41 +01:00
src Fix Windows build on CI (#710) 2021-09-02 18:15:38 +02:00
tests Fix remaining memory leaks in tests 2020-04-28 19:43:05 +02:00
.azure-pipelines.yml Fix Windows build on CI (#710) 2021-09-02 18:15:38 +02:00
.gitattributes Override *.inc language classification (#267) 2018-03-31 23:42:25 +02:00
.gitignore Add GoogleTest-based tests (#607) 2019-10-04 15:08:44 +02:00
.gitmodules Stop using git protocol for submodules 2021-09-02 11:06:41 +02:00
AUTHORS - Merged cairo 1.0 branch of GDI+ 2005-08-29 18:11:27 +00:00
CODE-OF-CONDUCT.md Link Code of Conduct (#643) 2020-04-08 11:44:11 +02:00
COPYING Add back COPYING file 2017-09-20 20:31:33 +02:00
ChangeLog Clean up ChangeLog file 2017-09-21 12:50:57 +02:00
INSTALL - Merged cairo 1.0 branch of GDI+ 2005-08-29 18:11:27 +00:00
LICENSE Update LICENSE to match the headers of the source files 2018-07-17 23:24:51 +02:00
Makefile.am Add GoogleTest-based tests (#607) 2019-10-04 15:08:44 +02:00
NEWS Move some items from website into TODO 2017-09-21 12:58:49 +02:00
README.md Cleanup vcpkg steps in readme 2021-09-02 18:19:44 +02:00
TODO Move some items from website into TODO 2017-09-21 12:58:49 +02:00
autogen.sh Fix warnings running autogen.sh (#581) 2019-08-05 20:56:40 +02:00
configure.ac Bump dev version 2021-11-03 15:59:28 -04:00
libgdiplus.pc.in revert this, it breaks for libexif and anyway the new options aren't supported 2007-08-09 14:15:50 +00:00
libgdiplus.sln Initial Visual Studio solution 2017-04-29 21:08:19 +02:00
libgdiplus0.spec.in Fix shell syntax error in configure.ac (#517) 2018-11-26 23:52:39 +01:00
update_submodules.sh Add GoogleTest-based tests (#607) 2019-10-04 15:08:44 +02:00
winconfig.h.in Fix Windows VS build 2017-09-21 13:37:30 +02:00

README.md

libgdiplus: An Open Source implementation of the GDI+ API.

This is part of the Mono project.

Build status:

Build Status

Requirements:

This requires the libraries used by the Cairo vector graphics library to build (freetype2, fontconfig, Xft2 and libpng).

On OSX you can use Homebrew to install the dependencies:

brew install glib cairo libexif libjpeg giflib libtiff autoconf libtool automake pango pkg-config
brew link gettext --force

On Debian-based Linux distributions you can use apt-get to install the dependencies:

sudo apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev

On Windows you can use Vcpkg to install the dependencies. Run the following commands from the root of the repository from an admin command prompt:

bootstrap-vcpkg.bat
vcpkg.exe install giflib libjpeg-turbo libpng cairo glib tiff libexif pango --triplet x86-windows
vcpkg.exe install giflib libjpeg-turbo libpng cairo glib tiff libexif pango --triplet x64-windows
vcpkg.exe integrate install

Build instructions

To build on OSX without X11:

./autogen.sh --without-x11 --prefix=YOUR_PREFIX
make

To build on OSX with X11 (e.g. from XQuartz):

PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig ./autogen.sh --prefix=YOUR_PREFIX
make

To build on Linux:

./autogen.sh --prefix=YOUR_PREFIX
make

To build on Windows, open libgdiplus.sln.

Running the unit tests

Run the following command from the root of the repository:

make check

To run the tests with Clang sanitizers, run the following command from the root of the repository:

./autogen.sh --enable-asan
make check

To run the unit tests with leak sanitizers, run the following command from the root of the repository:

./autogen.sh --enable-asan
export ASAN_OPTIONS=detect_leaks=1:fast_unwind_on_malloc=0
export LSAN_OPTIONS=suppressions=lsansuppressions.txt
make check

Code coverage

Code coverage stats are generated with lcov. You can use Homebrew on OSX to install the dependencies:

brew install lcov

To run the tests with code coverage, run the following commands from the root of the repository:

./autogen.sh --enable-coverage
make check
lcov --capture --directory src --output-file coverage.info
genhtml coverage.info --output-directory coverage

To view the coverage report, navigate to the coverage directory in the root of the repository and open index.html.

Installing libgdiplus

Run the following command from the root of the repository:

make install

Optional build options

--with-pango

This builds libgdiplus using Pango to render (measure and draw) 
all of it's text. This requires Pango version 1.38 (or later).