morepretty
This commit is contained in:
parent
58ccbf025a
commit
8ca46d86e3
|
@ -1,8 +1,7 @@
|
|||
import bumpy, chroma, flatty/binny, os, pixie/blends, pixie/common,
|
||||
pixie/context, pixie/fileformats/bmp, pixie/fileformats/gif,
|
||||
pixie/fileformats/jpg, pixie/fileformats/png, pixie/fileformats/svg,
|
||||
pixie/fonts, pixie/images, pixie/masks, pixie/paints, pixie/paths, strutils,
|
||||
vmath
|
||||
pixie/fonts, pixie/images, pixie/masks, pixie/paints, pixie/paths, strutils, vmath
|
||||
|
||||
export blends, bumpy, chroma, common, context, fonts, images, masks, paints,
|
||||
paths, vmath
|
||||
|
|
|
@ -296,13 +296,13 @@ proc clearRect*(ctx: Context, rect: Rect) =
|
|||
if ctx.layer != nil:
|
||||
ctx.layer.fillPath(
|
||||
path,
|
||||
Paint(kind: pkSolid, color:rgbx(0, 0, 0, 0), blendMode: bmOverwrite),
|
||||
Paint(kind: pkSolid, color: rgbx(0, 0, 0, 0), blendMode: bmOverwrite),
|
||||
ctx.mat
|
||||
)
|
||||
else:
|
||||
ctx.image.fillPath(
|
||||
path,
|
||||
Paint(kind: pkSolid, color:rgbx(0, 0, 0, 0), blendMode: bmOverwrite),
|
||||
Paint(kind: pkSolid, color: rgbx(0, 0, 0, 0), blendMode: bmOverwrite),
|
||||
ctx.mat
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import opengl, pixie, pixie/context
|
||||
import staticglfw except Image
|
||||
export pixie
|
||||
export staticglfw except Image
|
||||
import opengl, pixie, pixie/context, staticglfw except Image
|
||||
|
||||
export pixie, staticglfw except Image
|
||||
|
||||
var
|
||||
dpi: float32 = 1.0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Load SVG files.
|
||||
|
||||
import chroma, pixie/common, pixie/images, pixie/paths, pixie/paints, strutils, vmath,
|
||||
xmlparser, xmltree
|
||||
import chroma, pixie/common, pixie/images, pixie/paints, pixie/paths, strutils,
|
||||
vmath, xmlparser, xmltree
|
||||
|
||||
const
|
||||
xmlSignature* = "<?xml"
|
||||
|
|
|
@ -408,7 +408,6 @@ block:
|
|||
|
||||
ctx.image.writeFile("tests/images/context/clip_1e.png")
|
||||
|
||||
|
||||
block:
|
||||
let ctx = newContext(newImage(300, 150))
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ block:
|
|||
image = newImage(100, 100)
|
||||
pathStr = "M 10 10 L 90 90"
|
||||
color = rgba(255, 0, 0, 255)
|
||||
image.strokePath(pathStr, color, strokeWidth=10)
|
||||
image.strokePath(pathStr, color, strokeWidth = 10)
|
||||
image.writeFile("tests/images/paths/pathStroke1.png")
|
||||
|
||||
block:
|
||||
|
@ -55,7 +55,7 @@ block:
|
|||
image = newImage(100, 100)
|
||||
pathStr = "M 10 10 L 50 60 90 90"
|
||||
color = rgba(255, 0, 0, 255)
|
||||
image.strokePath(pathStr, color, strokeWidth=10)
|
||||
image.strokePath(pathStr, color, strokeWidth = 10)
|
||||
image.writeFile("tests/images/paths/pathStroke2.png")
|
||||
|
||||
block:
|
||||
|
@ -268,12 +268,12 @@ block:
|
|||
|
||||
image.strokePath(
|
||||
path, rgba(0, 0, 0, 255), vec2(5, 25), 10, lcButt, ljBevel,
|
||||
dashes = @[2.float32,2]
|
||||
dashes = @[2.float32, 2]
|
||||
)
|
||||
|
||||
image.strokePath(
|
||||
path, rgba(0, 0, 0, 255), vec2(5, 45), 10, lcButt, ljBevel,
|
||||
dashes = @[4.float32,4]
|
||||
dashes = @[4.float32, 4]
|
||||
)
|
||||
|
||||
image.strokePath(
|
||||
|
|
Loading…
Reference in a new issue