GithubHelp home page GithubHelp logo

nolwennfournier / sparta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from feenkcom/sparta

0.0 0.0 0.0 3.67 MB

Sparta is a canvas on top of Skia.

Home Page: https://gtoolkit.com

License: MIT License

Smalltalk 90.11% HTML 9.80% PHP 0.06% Shell 0.03%

sparta's Introduction

Sparta

Sparta is an almost stateless vector graphics API for Pharo that provides bindings to the Skia rendering backend.

Install

More detailed installation guide is described in INSTALL.md

Sparta requires an extra Skia vm plugin. The plugin for the current OS and VM (64 bit) is downloaded and installed automatically together with all needed packages.

Metacello new
    baseline: 'Sparta';
    repository: 'github://feenkcom/sparta/src';
    load

Overview

(All images are rendered using Sparta in Glamorous Toolkit)

"Sparta" string rendered with applied neon filter

Backends

Skia, and as result Sparta, has support of native OS graphic engines, as well as cross platform ones.

On all platforms Sparta provides support of Cairo and Skia. Additionally, high performant CoreGraphics and CoreGraphics Accelerated on Mac OS and Direct2D on Windows. In total Sparta supports 5 different rendering backends.

Text

One of the biggest improvements compared to existing graphics engines from Pharo is advanced high quality text rendering with multi-language support.

Multilanguage support in Sparta

The current Pharo text rendering engines draw a piece of text with one concrete font and style. If the font does not have an appropriate character, a stub glyph will be rendered instead. Sparta introduces a notion of font groups that allow us to achieve a smooth fallback font detection based on the selected font style, language and missing glyphs. Fallback font support requires more complex text measurement, as multiple fonts faces are involved to render a single piece of text.

Filters

Since Sparta is based on the Moz2D backend that was designed for web browsers, we can get support for a wide variety of filter primitives. Sparta provides an ability to compose multiple filter primitives to get a single, advanced filter. For example, with the help of ColorMatrix and TableTransfer filters we can simulate some popular Instagram-like filters, for example Nashville, Inkwell or Brannan.

Instagram-like filters implemented with Sparta

Basic drawings

We should not forget that first of all Sparta is a vector graphics engine. It allows developers to create, fill and stroke custom paths and shapes. Together with gaussian blur, we can achieve astonishing results that were not possible before.

Basic vector graphics in Sparta

sparta's People

Contributors

syrel avatar akgrant43 avatar jurajkubelka avatar georgeganea avatar girba avatar chisandrei avatar akgrant avatar maenu avatar nolwennfournier avatar stephaneggermont 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.