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ý
:rocket: A minimalist comic reader

Pynocchio A minimalist comic reader Features | Installation | Contributing | Credits This screenshots contains a page of the webcomic Pepper&Carrot by

Michell Stuttgart 73 Aug 02, 2022
A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for quickly creating new images from the one assigned to the field.

django-versatileimagefield A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for creat

Jonathan Ellenberger 490 Dec 13, 2022
Steganography Image/Data Injector.

Byte Steganography Image/Data Injector. For artists or people to inject their own print/data into their images. TODO Add more file formats to support.

Ori 4 Nov 16, 2022
Open source software for image correlation, distance and analysis

Douglas-Quaid Project Open source software for image correlation, distance and analysis. Strongly related to : Carl-Hauser Problem statement (@CIRCL)

Dominik Dancs 2 May 01, 2022
Sample data for the napari image viewer.

napari-demo-data Sample data for the napari image viewer. This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugi

Genevieve Buckley 1 Nov 08, 2021
🖼️ Draw Images or GIFs in your terminal

Drawitor Draw Images/GIFs in your terminal. Install pip install drawitor CLI Tool drawitor cat_dancing.gif Library The library is written in a simple

Eliaz Bobadilla 7 Dec 15, 2022
Validate arbitrary image uploads from incoming data urls while preserving file integrity but removing EXIF and unwanted artifacts and RCE exploit potential

Validate arbitrary base64-encoded image uploads as incoming data urls while preserving image integrity but removing EXIF and unwanted artifacts and mitigating RCE-exploit potential.

A3R0 1 Jan 10, 2022
Manipulate EXIF and IFD metadata.

Tyf Copyright Distribution Support this project Buy Ѧ and: Send Ѧ to AUahWfkfr5J4tYakugRbfow7RWVTK35GPW Vote arky on Ark blockchain and earn Ѧ weekly

16 Jan 21, 2022
QR-Generator - An awesome QR Generator to create or customize your QR's

QR Generator An awesome QR Generator to create or customize your QR's! Table of

Tristán 1 Jan 28, 2022
MaryJane is a simple MJPEG server written in Python.

MaryJane is a simple MJPEG server written in Python.

bootrino 152 Dec 13, 2022
SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration

SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration

672 Jan 05, 2023
Script that organizes the Google Takeout archive into one big chronological folder

Script that organizes the Google Takeout archive into one big chronological folder

Mateusz Soszyński 1.6k Jan 09, 2023
Napari simpleitk image processing

napari-simpleitk-image-processing (n-SimpleITK) Process images using SimpleITK in napari Usage Filters of this napari plugin can be found in the Tools

Robert Haase 11 Dec 19, 2022
HCaptcha solver using requests and an image recognition package!

HCaptcha solver using requests and an image recognition package! Report Bug · Request Feature Features Image recognition Requests base

dropout 6 Oct 22, 2021
FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it.

FrostedGlass FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it. The effect is drawn on t

Kivy Garden 24 Dec 10, 2022
A scalable implementation of WobblyStitcher for 3D microscopy images

WobblyStitcher Introduction A scalable implementation of WobblyStitcher Dependencies $ python -m pip install numpy scikit-image Visualization ImageJ

CSE Lab, ETH Zurich 7 Jul 25, 2022
A warping based image translation model focusing on upper body synthesis.

Pose2Img Upper body image synthesis from skeleton(Keypoints). Sub module in the ICCV-2021 paper "Speech Drives Templates: Co-Speech Gesture Synthesis

zhiyh 15 Nov 10, 2022
Draw a torus passing through three given points.

PyTorusThreePoints Draw a torus passing through three given points. Usage import numpy as np import pyvista as pv from torus_three_points.main import

2 Nov 19, 2021
Avatar Generator Python

This is a simple avatar generator project which uses your webcam to take pictures and saves five different types of your images into your device including the original image.

Faisal Ahmed 3 Jan 23, 2022
⚡ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

Szabolcs Dombi 133 Dec 17, 2022