Merge pull request #199 from guzba/master
circle from bumpy to paths.nim
This commit is contained in:
commit
304e0a5554
2 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -577,6 +577,10 @@ proc circle*(path: var Path, center: Vec2, r: float32) {.inline.} =
|
|||
## Adds a circle.
|
||||
path.ellipse(center.x, center.y, r, r)
|
||||
|
||||
proc circle*(path: var Path, circle: Circle) {.inline.} =
|
||||
## Adds a circle.
|
||||
path.ellipse(circle.pos.x, circle.pos.y, circle.radius, circle.radius)
|
||||
|
||||
proc polygon*(path: var Path, x, y, size: float32, sides: int) =
|
||||
## Adds an n-sided regular polygon at (x, y) with the parameter size.
|
||||
path.moveTo(x + size * cos(0.0), y + size * sin(0.0))
|
||||
|
|
Loading…
Reference in a new issue