基于 C 的 GDI+ API 实现
This is part of the Mono project.
Build status:
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 --forceOn 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-devOn 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 installTo build on OSX without X11:
./autogen.sh --without-x11 --prefix=YOUR_PREFIX
makeTo build on OSX with X11 (e.g. from XQuartz):
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig ./autogen.sh --prefix=YOUR_PREFIX
makeTo build on Linux:
./autogen.sh --prefix=YOUR_PREFIX
makeTo build on Windows, open libgdiplus.sln.
Run the following command from the root of the repository:
make checkTo run the tests with Clang sanitizers, run the following command from the root of the repository:
./autogen.sh --enable-asan
make checkTo 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 checkCode coverage stats are generated with lcov. You can use Homebrew on OSX to install the dependencies:
brew install lcovTo 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 coverageTo view the coverage report, navigate to the coverage directory in the root of the repository and open index.html.
Run the following command from the root of the repository:
make install--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).暂无开放 Issues,或尚未同步最近议题。