Merge pull request #218 from guzba/master
2.0.4 bugfix + improved github actions
This commit is contained in:
commit
759c045568
6 changed files with 19 additions and 25 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
@ -1,26 +1,17 @@
|
||||||
name: Run tests
|
name: Github Actions
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- 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: jiro4989/setup-nim-action@v1
|
- uses: jiro4989/setup-nim-action@v1
|
||||||
|
- run: nimble test -d:release -y
|
||||||
- run: nimble test -y
|
- run: nimble test --gc:orc -d:release -y
|
||||||
|
- run: nim cpp -d:release -r tests/all.nim
|
||||||
|
|
|
@ -8,6 +8,8 @@ This library is being actively developed and we'd be happy for you to use it.
|
||||||
|
|
||||||
`nimble install pixie`
|
`nimble install pixie`
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
* Typesetting and rasterizing text, including styled rich text via spans.
|
* Typesetting and rasterizing text, including styled rich text via spans.
|
||||||
* Drawing paths, shapes and curves with even-odd and non-zero windings.
|
* Drawing paths, shapes and curves with even-odd and non-zero windings.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version = "2.0.3"
|
version = "2.0.4"
|
||||||
author = "Andre von Houck and Ryan Oldenburg"
|
author = "Andre von Houck and Ryan Oldenburg"
|
||||||
description = "Full-featured 2d graphics library for Nim."
|
description = "Full-featured 2d graphics library for Nim."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import flatty/binny, math, pixie/common, pixie/paths, sets, tables,
|
import flatty/binny, math, pixie/common, pixie/paths, sets, tables, unicode, vmath
|
||||||
unicode, vmath
|
|
||||||
|
|
||||||
## See https://docs.microsoft.com/en-us/typography/opentype/spec/
|
## See https://docs.microsoft.com/en-us/typography/opentype/spec/
|
||||||
|
|
||||||
|
|
|
@ -1562,7 +1562,7 @@ proc fillPath*(
|
||||||
) =
|
) =
|
||||||
## Fills a path.
|
## Fills a path.
|
||||||
if paint.kind == pkSolid:
|
if paint.kind == pkSolid:
|
||||||
if paint.color.a > 0:
|
if paint.color.a > 0 or paint.blendMode == bmOverwrite:
|
||||||
var shapes = parseSomePath(path, transform.pixelScale())
|
var shapes = parseSomePath(path, transform.pixelScale())
|
||||||
shapes.transform(transform)
|
shapes.transform(transform)
|
||||||
image.fillShapes(shapes, paint.color, windingRule, paint.blendMode)
|
image.fillShapes(shapes, paint.color, windingRule, paint.blendMode)
|
||||||
|
@ -1626,7 +1626,7 @@ proc strokePath*(
|
||||||
) =
|
) =
|
||||||
## Strokes a path.
|
## Strokes a path.
|
||||||
if paint.kind == pkSolid:
|
if paint.kind == pkSolid:
|
||||||
if paint.color.a > 0:
|
if paint.color.a > 0 or paint.blendMode == bmOverwrite:
|
||||||
var strokeShapes = strokeShapes(
|
var strokeShapes = strokeShapes(
|
||||||
parseSomePath(path, transform.pixelScale()),
|
parseSomePath(path, transform.pixelScale()),
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
|
|
2
tests/all.nim
Normal file
2
tests/all.nim
Normal 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
|
Loading…
Reference in a new issue