Skip to content
Samples that use only Blend2D library
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
getting-started Fixed copying resources (CMake) Apr 21, 2019
qt
resources Blend2D Beta Apr 2, 2019
.gitignore
README.md Updated samples, merged with Qt samples and categorized Apr 17, 2019

README.md

Blend2D Samples

This repository contains a collection of samples that use Blend2D rendering engine.

The following cateogires of samples exist:

  • getting-started - The same samples as provided by the Getting Started page
  • qt - Interactive samples that use Qt toolkit for UI and quality/performance comparison

Building

Use the following commands to fetch asmjit, blend2d, and blend2d-samples package:

# Download source packages from Git.
$ git clone --depth=1 https://github.com/asmjit/asmjit --branch next-wip
$ git clone --depth=1 https://github.com/blend2d/blend2d
$ git clone --depth=1 https://github.com/blend2d/blend2d-samples

Each samples category is placed in its own subdirectory that contains an independent CMakeLists.txt, so use the following to build the samples you are interested in:

$ cd blend2d-samples/<category>
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release

Alternatively you can pick a configure script from <category>/tools directory if there is a suitable one for your configuration. Please note that samples were divided into categories so people can build only samples they are interested in. If you want to compile and run Qt samples you would need Qt library installed. CMake should be able to find Qt automatically if it's in your PATH, alternatively set CMAKE_PREFIX_PATH to tell CMake where Qt is installed.

Resources

Some applications require files that are stored in resources directory to work properly. Copying all resources to the build directory should be handled by the build script, but if it fails for whatever reason just copy the content of resources to your build directory. If these files are missing the sample should report an error.

All files within resources should be freely redistributable:

  • resources/texture.jpeg (Public Domain) - downloaded from publicdomainpictures.net
  • resources/NotoSans-Regular.ttf (OFL Version 1.1) - downloaded from Google WebFonts Repo
  • qt/src/bl-qt-tiger.h uses a tiger data extracted from amanithvg's tiger example so this data is not covered by the license

Preview

Demo App Preview Demo App Preview
Demo App Preview Demo App Preview

License

All code samples can be distributed under either Public Domain (UNLICENSE) or Zlib license.

You can’t perform that action at this time.