Python framework for creating and scaling up production of vector graphics assets.

Overview

Board Game Factory

Contributors are welcome here! See the end of readme.

This is a vector-graphics framework intended for creating and scaling up production of reusable assets with vector graphics.

It is a thick wrapper around cairo for vector graphics and pango for fully featured text layout and rendering providing very user-friendly for composing assets.

I've developed it personally to satisfy my need for a solid prototyping engine for board games, but inherently, it is in no way tied to making board games, even though it contains a couple convenience classes for that (such as CardSheet for producing printable card sheets out of lists of components).

Installation

Requires conda and having conda forge in channels (see https://conda-forge.org).

Unfortunately the cairo and pango binary libraries cannot be installed directly with pip.

conda install cairo pango
pip install board-game-factory

Features

  • High quality rendering - BGF is based fully in Vector Graphics, therefore allowing for renders of arbitrary resolution
  • Component Tree structure - similar to making GUIs in Java, you can embed a component inside a component inside a component...
  • Fully extensible components - the best way to use this framework is to create and compose your own components extending base components.
  • Fully dynamic and highly flexible sizing system:
    • Component width/height possible values:
      • INFER - the component decides on its own how large it should be
      • FILL - fill all available remaining space in the parent Container
      • '12.34%' - take up 12.34% of available space
      • 123 - take up 123 pixels
  • Many basic and advanced components are already implemented:
    • Container - base component with a layout manager, you add components into it.
    • Shapes
      • Rectangle
      • RoundedRectangle
      • Circle
      • Line
    • TextUniform - a fully featured text rendering component (exposing most advanced features of pango) for rendering text of a uniform style (all characters have same font, size, color, ...).
    • TextMarkup - advanced text component supporting markup for strings with multiple styles (boldface words, multiple colors, ...)
      • features smart inline laying of icons (any images) for embedding icons directly in text
    • Grid - a special component for creating table structures:
      • each cell can have unique parameters (e.g. layout manager)
      • incredibly flexible row and column definitions (INFER, FILL, %, px)
      • fully featured cell merging
    • just with those few components + LayoutManagers I've made all the samples you can see below in the link on imgur.
  • LayoutManagers
    • Absolute - define pixels
    • HorizontalFlow, VerticalFlow - align automatically to row or column
    • Fully extensible, you can write your own

Usage

For examples of usage see tests.

Things I made with BGF

Samples of prototypes I've made with this framework:

https://imgur.com/a/TS779gR

Issues

Please report any issues and feel free to try and fix them on your own.

Contributors Wanted!

I would love to welcome people on board who would like to extend the project or improve it, if you're interested you can drop in a PR directly or we can first discuss, you can reach me at adam.volny at gmail dot com.

For a hobby project, I think it has a surprisingly high quality of design and code. There are is quite a good test coverage, all tests are performed directly against rendered references. This allowed for controlled development of many of the complex features in this framework (dynamic sizing & positioning is really difficult with this amount of supported features).

It could be extended to do many things (e.g. a gui board game asset builder, coupled with inputs from spreadsheets, ...), I would love to hear Your ideas!

Owner
Adam Volný
Adam Volný
Next-generation of the non-destructive, node-based 2D image graphics editor

Non-destructive, node-based 2D image graphics editor written in Python, focused on simplicity, speed, elegance, and usability

Gimel Studio 238 Dec 30, 2022
3D Reconstruction Software

Meshroom is a free, open-source 3D Reconstruction Software based on the AliceVision Photogrammetric Computer Vision framework. Learn more details abou

AliceVision 8.7k Jan 02, 2023
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
Docbarcodes extracts 1D and 2D barcodes from scanned PDF documents or images. It can be used to automate extraction and processing of all kind of documents.

Intro Barcodes are being used in many documents or forms to enable machine reading capabilities and reduce manual processing effort. Simple 1D barcode

Arlind Nocaj 3 Jun 18, 2022
Optimize/Compress images using python

Image Optimization Using Python steps to run the script run the command to install the required libraries pip install -r requirements.txt create a dir

Shekhar Gupta 1 Oct 15, 2021
QR Code Generator

In this project, we'll be using some libraries to instantly generate authentic QR Codes and export them in various formats

Hassan Shahzad 3 Jun 02, 2022
A tool for making simple-style text posters or wallpapers with high resolution.

PurePoster PurePoster is a fancy tool for making arbitrary-resolution, simple-style posters or wallpapers with text in center. Functionality PurePoste

Renyang Guan 4 Jul 09, 2022
Craft PNG files that appear completely different in Apple software

Ambiguous PNG Packer Craft PNG files that appear completely different in Apple software

David Buchanan 1k Dec 29, 2022
A python script for extracting/removing exif data from images by @AbirHasan2005

Image-Exif A Python script for extracting exif metadata from images. How to use? Using this script you can extract exif data from image and save in .c

Abir Hasan 13 Dec 16, 2022
Image Processing HighPass Filter With Python

Image_Processing_HighPassFilter High Pass Filter take the high frequency and ignore the low frequency High Pass Filter can be use to sharpening an ima

Felix Pratamasan 1 Dec 27, 2021
HyperBlend is a new type of hyperspectral image simulator based on Blender.

HyperBlend version 0.1.0 This is the HyperBlend leaf spectra simulator developed in Spectral Laboratory of University of Jyväskylä. You can use and mo

SILMAE 2 Jun 20, 2022
Deep Illuminator is a data augmentation tool designed for image relighting.

Deep Illuminator Deep Illuminator is a data augmentation tool designed for image relighting. It can be used to easily and efficiently genera

George Chogovadze 52 Nov 29, 2022
A suite of useful tools based on 3D interactivity in napari

napari-threedee A suite of useful tools based on 3D interactivity in napari This napari plugin was generated with Cookiecutter using @napari's cookiec

11 Dec 14, 2022
Python library for ascii graphics

Python library for ascii graphics

Anton 6 Oct 20, 2021
Rotates your images in the spirit of rot13

Image Rotator (imrot10) Its like rot13 but for images. Calling the algorithm imrot10 for im = image, rot = rotation, 10 = default magnitude. Unfortuna

Sarah 2 Dec 10, 2021
Small wrapper around 3dmol.js and html2canvas for creating self-contained HTML files that display a 3D molecular representation.

Description Small wrapper around 3dmol.js and html2canvas for creating self-contained HTML files that display a 3D molecular representation. Double cl

David Meijer 1 Dec 02, 2021
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

1 Dec 18, 2021
Conversion of Image, video, text into ASCII format

asciju Python package that converts image to ascii Free software: MIT license

Aju Tamang 11 Aug 22, 2022
Tweet2Image - Convert tweets to Instagram-friendly images.

Convert tweets to Instagram-friendly images. How to use If you want to use this repository as a submodule, don't forget to put the fonts d

Janu Lingeswaran 1 Mar 11, 2022
A Blender add-on to create interesting meshes using symmetry

Procedural Symmetries This Blender add-on automates the process of iteratively applying a set of reflection planes to a base mesh. The result will con

1 Dec 29, 2021