Giter Club home page Giter Club logo

libgdiplus's Introduction

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).

libgdiplus's People

Contributors

hughbe avatar akoeplinger avatar migueldeicaza avatar filipnavara avatar gonzalop avatar qmfrederik avatar preferlinux avatar directhex avatar kumpera avatar jstedfast avatar ranma42 avatar illupus avatar ermshiperete avatar uweigand avatar stephenmcconnel avatar spouliot avatar vargaz avatar harinath avatar dickp avatar knocte avatar nattynarwhal avatar n432sean avatar markusbeth avatar shibaev avatar mhosken avatar wtfrank avatar duncanmak avatar mailaender avatar nealef avatar neilmayhew avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.