From 3eebfdb902e1e9a3a92af8ef95cfc2f3f3bd5a44 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Fri, 20 Nov 2020 23:09:52 -0600 Subject: [PATCH] readme --- README.md | 22 ++++++++++++++-------- src/pixie.nim | 4 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 81aba30..c2fbf2e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,17 @@ -# Full-featured 2d graphics library for Nim. +# Pixie - A full-featured 2D graphics library for Nim -Written in pure nim. Basis for the fidget UI library. +⚠️ WARNING: This library is still in heavy development. ⚠️ -Features: - * images - * paths - * masks +Pixie is a 2D graphics library similar to [Cairo](https://www.cairographics.org/) and [Skia](https://skia.org) written entirely in Nim. -Supported File formats reading and writing: - * BMP (RGBA Only) +Features include: +* Drawing paths, shapes and curves +* Complex masking +* Shadows, glows and effects +* Loading image file formats (PNG, BMP, + more in development) + +This library is being actively developed and is not yet ready for use. Since you've managed to stumble onto it, give it a star and check back soon! + +## Testing + +`nimble test` diff --git a/src/pixie.nim b/src/pixie.nim index 4494f15..aa4a712 100644 --- a/src/pixie.nim +++ b/src/pixie.nim @@ -21,7 +21,7 @@ proc toImage*(mask: Mask): Image = for i in 0 ..< mask.data.len: result.data[i].a = mask.data[i] -proc decodeImage(data: string | seq[uint8]): Image = +proc decodeImage*(data: string | seq[uint8]): Image = ## Loads an image from a memory. if data.len > 8 and cast[array[8, uint8]](data.readUint64(0)) == pngSignature: return decodePng(data) @@ -35,7 +35,7 @@ proc readImage*(filePath: string): Image = ## Loads an image from a file. decodeImage(readFile(filePath)) -proc encodeImage(image: Image, fileFormat: FileFormat): string = +proc encodeImage*(image: Image, fileFormat: FileFormat): string = ## Encodes an image into a memory. case fileFormat: of ffPng: