Merge pull request #218 from guzba/master

2.0.4 bugfix + improved github actions
This commit is contained in:
treeform 2021-06-03 16:04:30 -07:00 committed by GitHub
commit 759c045568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 25 deletions

View file

@ -1,26 +1,17 @@
name: Run tests
name: Github Actions
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-stable
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-stable
- uses: actions/checkout@v2
- uses: jiro4989/setup-nim-action@v1
- run: nimble test -y
- run: nimble test -d:release -y
- run: nimble test --gc:orc -d:release -y
- run: nim cpp -d:release -r tests/all.nim

View file

@ -8,6 +8,8 @@ This library is being actively developed and we'd be happy for you to use it.
`nimble install pixie`
![Github Actions](https://github.com/treeform/pixie/workflows/Github%20Actions/badge.svg)
Features:
* Typesetting and rasterizing text, including styled rich text via spans.
* Drawing paths, shapes and curves with even-odd and non-zero windings.

View file

@ -1,4 +1,4 @@
version = "2.0.3"
version = "2.0.4"
author = "Andre von Houck and Ryan Oldenburg"
description = "Full-featured 2d graphics library for Nim."
license = "MIT"

View file

@ -1,5 +1,4 @@
import flatty/binny, math, pixie/common, pixie/paths, sets, tables,
unicode, vmath
import flatty/binny, math, pixie/common, pixie/paths, sets, tables, unicode, vmath
## See https://docs.microsoft.com/en-us/typography/opentype/spec/

View file

@ -1562,7 +1562,7 @@ proc fillPath*(
) =
## Fills a path.
if paint.kind == pkSolid:
if paint.color.a > 0:
if paint.color.a > 0 or paint.blendMode == bmOverwrite:
var shapes = parseSomePath(path, transform.pixelScale())
shapes.transform(transform)
image.fillShapes(shapes, paint.color, windingRule, paint.blendMode)
@ -1626,7 +1626,7 @@ proc strokePath*(
) =
## Strokes a path.
if paint.kind == pkSolid:
if paint.color.a > 0:
if paint.color.a > 0 or paint.blendMode == bmOverwrite:
var strokeShapes = strokeShapes(
parseSomePath(path, transform.pixelScale()),
strokeWidth,

2
tests/all.nim Normal file
View file

@ -0,0 +1,2 @@
import test_bmp, test_context, test_fonts, test_gif, test_images,
test_images_draw, test_jpg, test_masks, test_paints, test_paths, test_png, test_svg