Skip to content

immstudios/nxcg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NXCG

This library combines power of PIL (or Pillow), PyCairo and Pango and focuses on 2d graphics for broadcast applications.

Installation

apt install -y python3 python3-pip
apt install -y python3-pil python3-cairo gir1.2-gtk-3.0 python3-gi-cairo
pip3 install nxtools

Usage

Hello world

from nxcg import *

cg = CG(1920, 1080)
cg.text("Hello World!", pos=(100,100), color="#cc0000", font="Sans 36")
cg.save("hello.png")

Color presets

Color Name Color Name Color Name
#807c8b iron #454343 graphite #353333 graphite dark
#536b77 steel #fbb829 gold #00b4ff cyan
#ff6600 orange #cc0000 red #a1c820 green
#025d8c blue #edde45 yellow #ebebeb white
#101010 black #00000099 black glass 60 #000000a6 black glass 65
#000000b3 black glass 70 #000000cc black glass 75 #000000e6 black glass 80
#f5f5f5b3 logo gray #ff6d70 living coral #654ea3 ultra violet
#84BD00 greenery #F2DDDE rose quartz #89ABE3 serenity
#AD655F marsala #B565A7 radiant orchid #009b77 emerald
#dd4124 tangerine #d65076 honeysuckle #45b8ac turquoise
#efc050 mimosa #5b5ea6 blue iris #9b2335 pepper
#dfcfbe sand

Documentation

Code is quite self-documenting see nxcg/core.py for build-ins and plugins/test_plugin.py to see how to write your own plug-ins :-)

See NXTV sources for more advanced usage tips and underlying libraries documentation:

About

Cairo, Pango and PIL based graphics library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages