feedback
This commit is contained in:
parent
0d65dffccc
commit
bb0d44c23e
1 changed files with 5 additions and 2 deletions
|
@ -33,6 +33,9 @@ proc newContext*(image: Image): Context =
|
|||
result.fillStyle = Paint(kind: pkSolid, color: rgbx(0, 0, 0, 255))
|
||||
result.strokeStyle = Paint(kind: pkSolid, color: rgbx(0, 0, 0, 255))
|
||||
|
||||
proc newContext*(width, height: int): Context {.inline.} =
|
||||
newContext(newImage(width, height))
|
||||
|
||||
proc beginPath*(ctx: Context) {.inline.} =
|
||||
ctx.path = Path()
|
||||
|
||||
|
@ -144,7 +147,7 @@ proc fillText*(ctx: Context, text: string, at: Vec2) =
|
|||
ctx.image.fillText(
|
||||
ctx.font,
|
||||
text,
|
||||
at,
|
||||
ctx.mat * translate(at),
|
||||
hAlign = ctx.textAlign
|
||||
)
|
||||
|
||||
|
@ -163,7 +166,7 @@ proc strokeText*(ctx: Context, text: string, at: Vec2) =
|
|||
ctx.image.strokeText(
|
||||
ctx.font,
|
||||
text,
|
||||
at,
|
||||
ctx.mat * translate(at),
|
||||
ctx.lineWidth,
|
||||
hAlign = ctx.textAlign,
|
||||
lineCap = ctx.lineCap,
|
||||
|
|
Loading…
Reference in a new issue