break on digits
This commit is contained in:
parent
7523c13758
commit
1d7394a381
|
@ -7,28 +7,28 @@ proc pixie_take_error*(): cstring {.raises: [], cdecl, exportc, dynlib.} =
|
|||
type SeqFloat32* = ref object
|
||||
s: seq[float32]
|
||||
|
||||
proc pixie_new_seq_float32*(): SeqFloat32 {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_new_seq_float_32*(): SeqFloat32 {.raises: [], cdecl, exportc, dynlib.} =
|
||||
SeqFloat32()
|
||||
|
||||
proc pixie_seq_float32_len*(s: SeqFloat32): int {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_len*(s: SeqFloat32): int {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s.len
|
||||
|
||||
proc pixie_seq_float32_add*(s: SeqFloat32, v: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_add*(s: SeqFloat32, v: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s.add(v)
|
||||
|
||||
proc pixie_seq_float32_get*(s: SeqFloat32, i: int): float32 {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_get*(s: SeqFloat32, i: int): float32 {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s[i]
|
||||
|
||||
proc pixie_seq_float32_set*(s: SeqFloat32, i: int, v: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_set*(s: SeqFloat32, i: int, v: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s[i] = v
|
||||
|
||||
proc pixie_seq_float32_remove*(s: SeqFloat32, i: int) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_remove*(s: SeqFloat32, i: int) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s.delete(i)
|
||||
|
||||
proc pixie_seq_float32_clear*(s: SeqFloat32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_clear*(s: SeqFloat32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
s.s.setLen(0)
|
||||
|
||||
proc pixie_seq_float32_unref*(s: SeqFloat32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_seq_float_32_unref*(s: SeqFloat32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
GC_unref(s)
|
||||
|
||||
type SeqSpan* = ref object
|
||||
|
@ -115,13 +115,13 @@ proc pixie_image_sub_image*(image: Image, x: int, y: int, w: int, h: int): Image
|
|||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_image_minify_by2*(image: Image, power: int): Image {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_image_minify_by_2*(image: Image, power: int): Image {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
result = minifyBy2(image, power)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_image_magnify_by2*(image: Image, power: int): Image {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_image_magnify_by_2*(image: Image, power: int): Image {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
result = magnifyBy2(image, power)
|
||||
except PixieError as e:
|
||||
|
@ -259,7 +259,7 @@ proc pixie_mask_set_value*(mask: Mask, x: int, y: int, value: uint8) {.raises: [
|
|||
proc pixie_mask_fill*(mask: Mask, value: uint8) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
fill(mask, value)
|
||||
|
||||
proc pixie_mask_minify_by2*(mask: Mask, power: int): Mask {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_mask_minify_by_2*(mask: Mask, power: int): Mask {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
result = minifyBy2(mask, power)
|
||||
except PixieError as e:
|
||||
|
@ -454,24 +454,24 @@ proc pixie_path_move_to*(path: Path, x: float32, y: float32) {.raises: [], cdecl
|
|||
proc pixie_path_line_to*(path: Path, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
lineTo(path, x, y)
|
||||
|
||||
proc pixie_path_bezier_curve_to*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, x3: float32, y3: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
bezierCurveTo(path, x1, y1, x2, y2, x3, y3)
|
||||
proc pixie_path_bezier_curve_to*(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32, x_3: float32, y_3: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
bezierCurveTo(path, x_1, y_1, x_2, y_2, x_3, y_3)
|
||||
|
||||
proc pixie_path_quadratic_curve_to*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
quadraticCurveTo(path, x1, y1, x2, y2)
|
||||
proc pixie_path_quadratic_curve_to*(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
quadraticCurveTo(path, x_1, y_1, x_2, y_2)
|
||||
|
||||
proc pixie_path_elliptical_arc_to*(path: Path, rx: float32, ry: float32, x_axis_rotation: float32, large_arc_flag: bool, sweep_flag: bool, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
ellipticalArcTo(path, rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, x, y)
|
||||
|
||||
proc pixie_path_arc*(path: Path, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_path_arc*(path: Path, x: float32, y: float32, r: float32, a_0: float32, a_1: float32, ccw: bool) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
arc(path, x, y, r, a0, a1, ccw)
|
||||
arc(path, x, y, r, a_0, a_1, ccw)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_path_arc_to*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, r: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_path_arc_to*(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32, r: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
arcTo(path, x1, y1, x2, y2, r)
|
||||
arcTo(path, x_1, y_1, x_2, y_2, r)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
|
@ -787,19 +787,19 @@ proc pixie_context_transform*(ctx: Context, transform: Mat3) {.raises: [], cdecl
|
|||
proc pixie_context_reset_transform*(ctx: Context) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
resetTransform(ctx)
|
||||
|
||||
proc pixie_context_draw_image1*(ctx: Context, image: Image, dx: float32, dy: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_context_draw_image_1*(ctx: Context, image: Image, dx: float32, dy: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
drawImage1(ctx, image, dx, dy)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_context_draw_image2*(ctx: Context, image: Image, dx: float32, dy: float32, d_width: float32, d_height: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_context_draw_image_2*(ctx: Context, image: Image, dx: float32, dy: float32, d_width: float32, d_height: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
drawImage2(ctx, image, dx, dy, d_width, d_height)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_context_draw_image3*(ctx: Context, image: Image, sx: float32, sy: float32, s_width: float32, s_height: float32, dx: float32, dy: float32, d_width: float32, d_height: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_context_draw_image_3*(ctx: Context, image: Image, sx: float32, sy: float32, s_width: float32, s_height: float32, dx: float32, dy: float32, d_width: float32, d_height: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
drawImage3(ctx, image, sx, sy, s_width, s_height, dx, dy, d_width, d_height)
|
||||
except PixieError as e:
|
||||
|
@ -811,21 +811,21 @@ proc pixie_context_move_to*(ctx: Context, x: float32, y: float32) {.raises: [],
|
|||
proc pixie_context_line_to*(ctx: Context, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
lineTo(ctx, x, y)
|
||||
|
||||
proc pixie_context_bezier_curve_to*(ctx: Context, cp1x: float32, cp1y: float32, cp2x: float32, cp2y: float32, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
bezierCurveTo(ctx, cp1x, cp1y, cp2x, cp2y, x, y)
|
||||
proc pixie_context_bezier_curve_to*(ctx: Context, cp_1x: float32, cp_1y: float32, cp_2x: float32, cp_2y: float32, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
bezierCurveTo(ctx, cp_1x, cp_1y, cp_2x, cp_2y, x, y)
|
||||
|
||||
proc pixie_context_quadratic_curve_to*(ctx: Context, cpx: float32, cpy: float32, x: float32, y: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
quadraticCurveTo(ctx, cpx, cpy, x, y)
|
||||
|
||||
proc pixie_context_arc*(ctx: Context, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_context_arc*(ctx: Context, x: float32, y: float32, r: float32, a_0: float32, a_1: float32, ccw: bool) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
arc(ctx, x, y, r, a0, a1, ccw)
|
||||
arc(ctx, x, y, r, a_0, a_1, ccw)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
proc pixie_context_arc_to*(ctx: Context, x1: float32, y1: float32, x2: float32, y2: float32, radius: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
proc pixie_context_arc_to*(ctx: Context, x_1: float32, y_1: float32, x_2: float32, y_2: float32, radius: float32) {.raises: [], cdecl, exportc, dynlib.} =
|
||||
try:
|
||||
arcTo(ctx, x1, y1, x2, y2, radius)
|
||||
arcTo(ctx, x_1, y_1, x_2, y_2, radius)
|
||||
except PixieError as e:
|
||||
lastError = e
|
||||
|
||||
|
|
|
@ -88,10 +88,10 @@ type TextMetrics* = object
|
|||
type SeqFloat32* = object
|
||||
reference: pointer
|
||||
|
||||
proc pixie_seq_float32_unref*(x: SeqFloat32) {.importc: "pixie_seq_float32_unref", cdecl.}
|
||||
proc pixie_seq_float_32_unref*(x: SeqFloat32) {.importc: "pixie_seq_float_32_unref", cdecl.}
|
||||
|
||||
proc `=destroy`(x: var SeqFloat32) =
|
||||
pixie_seq_float32_unref(x)
|
||||
pixie_seq_float_32_unref(x)
|
||||
|
||||
type SeqSpan* = object
|
||||
reference: pointer
|
||||
|
@ -183,22 +183,22 @@ proc pixie_take_error(): cstring {.importc: "pixie_take_error", cdecl.}
|
|||
proc takeError*(): cstring {.inline.} =
|
||||
result = pixie_take_error()
|
||||
|
||||
proc pixie_seq_float32_len(s: SeqFloat32): int {.importc: "pixie_seq_float32_len", cdecl.}
|
||||
proc pixie_seq_float_32_len(s: SeqFloat32): int {.importc: "pixie_seq_float_32_len", cdecl.}
|
||||
|
||||
proc pixie_seq_float32_add(s: SeqFloat32, v: float32) {.importc: "pixie_seq_float32_add", cdecl.}
|
||||
proc pixie_seq_float_32_add(s: SeqFloat32, v: float32) {.importc: "pixie_seq_float_32_add", cdecl.}
|
||||
|
||||
proc pixie_seq_float32_get(s: SeqFloat32, i: int): float32 {.importc: "pixie_seq_float32_get", cdecl.}
|
||||
proc pixie_seq_float_32_get(s: SeqFloat32, i: int): float32 {.importc: "pixie_seq_float_32_get", cdecl.}
|
||||
|
||||
proc pixie_seq_float32_set(s: SeqFloat32, i: int, v: float32) {.importc: "pixie_seq_float32_set", cdecl.}
|
||||
proc pixie_seq_float_32_set(s: SeqFloat32, i: int, v: float32) {.importc: "pixie_seq_float_32_set", cdecl.}
|
||||
|
||||
proc pixie_seq_float32_remove(s: SeqFloat32, i: int) {.importc: "pixie_seq_float32_remove", cdecl.}
|
||||
proc pixie_seq_float_32_remove(s: SeqFloat32, i: int) {.importc: "pixie_seq_float_32_remove", cdecl.}
|
||||
|
||||
proc pixie_seq_float32_clear(s: SeqFloat32) {.importc: "pixie_seq_float32_clear", cdecl.}
|
||||
proc pixie_seq_float_32_clear(s: SeqFloat32) {.importc: "pixie_seq_float_32_clear", cdecl.}
|
||||
|
||||
proc pixie_new_seq_float32*(): SeqFloat32 {.importc: "pixie_new_seq_float32", cdecl.}
|
||||
proc pixie_new_seq_float_32*(): SeqFloat32 {.importc: "pixie_new_seq_float_32", cdecl.}
|
||||
|
||||
proc newSeqFloat32*(): SeqFloat32 =
|
||||
pixie_new_seq_float32()
|
||||
pixie_new_seq_float_32()
|
||||
|
||||
proc pixie_seq_span_len(s: SeqSpan): int {.importc: "pixie_seq_span_len", cdecl.}
|
||||
|
||||
|
@ -298,17 +298,17 @@ proc subImage*(image: Image, x: int, y: int, w: int, h: int): Image {.inline.} =
|
|||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_image_minify_by2(image: Image, power: int): Image {.importc: "pixie_image_minify_by2", cdecl.}
|
||||
proc pixie_image_minify_by_2(image: Image, power: int): Image {.importc: "pixie_image_minify_by_2", cdecl.}
|
||||
|
||||
proc minifyBy2*(image: Image, power: int): Image {.inline.} =
|
||||
result = pixie_image_minify_by2(image, power)
|
||||
result = pixie_image_minify_by_2(image, power)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_image_magnify_by2(image: Image, power: int): Image {.importc: "pixie_image_magnify_by2", cdecl.}
|
||||
proc pixie_image_magnify_by_2(image: Image, power: int): Image {.importc: "pixie_image_magnify_by_2", cdecl.}
|
||||
|
||||
proc magnifyBy2*(image: Image, power: int): Image {.inline.} =
|
||||
result = pixie_image_magnify_by2(image, power)
|
||||
result = pixie_image_magnify_by_2(image, power)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
|
@ -479,10 +479,10 @@ proc pixie_mask_fill(mask: Mask, value: uint8) {.importc: "pixie_mask_fill", cde
|
|||
proc fill*(mask: Mask, value: uint8) {.inline.} =
|
||||
pixie_mask_fill(mask, value)
|
||||
|
||||
proc pixie_mask_minify_by2(mask: Mask, power: int): Mask {.importc: "pixie_mask_minify_by2", cdecl.}
|
||||
proc pixie_mask_minify_by_2(mask: Mask, power: int): Mask {.importc: "pixie_mask_minify_by_2", cdecl.}
|
||||
|
||||
proc minifyBy2*(mask: Mask, power: int): Mask {.inline.} =
|
||||
result = pixie_mask_minify_by2(mask, power)
|
||||
result = pixie_mask_minify_by_2(mask, power)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
|
@ -713,12 +713,12 @@ proc pixie_path_line_to(path: Path, x: float32, y: float32) {.importc: "pixie_pa
|
|||
proc lineTo*(path: Path, x: float32, y: float32) {.inline.} =
|
||||
pixie_path_line_to(path, x, y)
|
||||
|
||||
proc pixie_path_bezier_curve_to(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, x3: float32, y3: float32) {.importc: "pixie_path_bezier_curve_to", cdecl.}
|
||||
proc pixie_path_bezier_curve_to(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32, x_3: float32, y_3: float32) {.importc: "pixie_path_bezier_curve_to", cdecl.}
|
||||
|
||||
proc bezierCurveTo*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, x3: float32, y3: float32) {.inline.} =
|
||||
pixie_path_bezier_curve_to(path, x1, y1, x2, y2, x3, y3)
|
||||
|
||||
proc pixie_path_quadratic_curve_to(path: Path, x1: float32, y1: float32, x2: float32, y2: float32) {.importc: "pixie_path_quadratic_curve_to", cdecl.}
|
||||
proc pixie_path_quadratic_curve_to(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32) {.importc: "pixie_path_quadratic_curve_to", cdecl.}
|
||||
|
||||
proc quadraticCurveTo*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32) {.inline.} =
|
||||
pixie_path_quadratic_curve_to(path, x1, y1, x2, y2)
|
||||
|
@ -728,14 +728,14 @@ proc pixie_path_elliptical_arc_to(path: Path, rx: float32, ry: float32, x_axis_r
|
|||
proc ellipticalArcTo*(path: Path, rx: float32, ry: float32, xAxisRotation: float32, largeArcFlag: bool, sweepFlag: bool, x: float32, y: float32) {.inline.} =
|
||||
pixie_path_elliptical_arc_to(path, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y)
|
||||
|
||||
proc pixie_path_arc(path: Path, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.importc: "pixie_path_arc", cdecl.}
|
||||
proc pixie_path_arc(path: Path, x: float32, y: float32, r: float32, a_0: float32, a_1: float32, ccw: bool) {.importc: "pixie_path_arc", cdecl.}
|
||||
|
||||
proc arc*(path: Path, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.inline.} =
|
||||
pixie_path_arc(path, x, y, r, a0, a1, ccw)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_path_arc_to(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, r: float32) {.importc: "pixie_path_arc_to", cdecl.}
|
||||
proc pixie_path_arc_to(path: Path, x_1: float32, y_1: float32, x_2: float32, y_2: float32, r: float32) {.importc: "pixie_path_arc_to", cdecl.}
|
||||
|
||||
proc arcTo*(path: Path, x1: float32, y1: float32, x2: float32, y2: float32, r: float32) {.inline.} =
|
||||
pixie_path_arc_to(path, x1, y1, x2, y2, r)
|
||||
|
@ -1168,24 +1168,24 @@ proc pixie_context_reset_transform(ctx: Context) {.importc: "pixie_context_reset
|
|||
proc resetTransform*(ctx: Context) {.inline.} =
|
||||
pixie_context_reset_transform(ctx)
|
||||
|
||||
proc pixie_context_draw_image1(ctx: Context, image: Image, dx: float32, dy: float32) {.importc: "pixie_context_draw_image1", cdecl.}
|
||||
proc pixie_context_draw_image_1(ctx: Context, image: Image, dx: float32, dy: float32) {.importc: "pixie_context_draw_image_1", cdecl.}
|
||||
|
||||
proc drawImage1*(ctx: Context, image: Image, dx: float32, dy: float32) {.inline.} =
|
||||
pixie_context_draw_image1(ctx, image, dx, dy)
|
||||
pixie_context_draw_image_1(ctx, image, dx, dy)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_context_draw_image2(ctx: Context, image: Image, dx: float32, dy: float32, d_width: float32, d_height: float32) {.importc: "pixie_context_draw_image2", cdecl.}
|
||||
proc pixie_context_draw_image_2(ctx: Context, image: Image, dx: float32, dy: float32, d_width: float32, d_height: float32) {.importc: "pixie_context_draw_image_2", cdecl.}
|
||||
|
||||
proc drawImage2*(ctx: Context, image: Image, dx: float32, dy: float32, dWidth: float32, dHeight: float32) {.inline.} =
|
||||
pixie_context_draw_image2(ctx, image, dx, dy, dWidth, dHeight)
|
||||
pixie_context_draw_image_2(ctx, image, dx, dy, dWidth, dHeight)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_context_draw_image3(ctx: Context, image: Image, sx: float32, sy: float32, s_width: float32, s_height: float32, dx: float32, dy: float32, d_width: float32, d_height: float32) {.importc: "pixie_context_draw_image3", cdecl.}
|
||||
proc pixie_context_draw_image_3(ctx: Context, image: Image, sx: float32, sy: float32, s_width: float32, s_height: float32, dx: float32, dy: float32, d_width: float32, d_height: float32) {.importc: "pixie_context_draw_image_3", cdecl.}
|
||||
|
||||
proc drawImage3*(ctx: Context, image: Image, sx: float32, sy: float32, sWidth: float32, sHeight: float32, dx: float32, dy: float32, dWidth: float32, dHeight: float32) {.inline.} =
|
||||
pixie_context_draw_image3(ctx, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight)
|
||||
pixie_context_draw_image_3(ctx, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
|
@ -1199,7 +1199,7 @@ proc pixie_context_line_to(ctx: Context, x: float32, y: float32) {.importc: "pix
|
|||
proc lineTo*(ctx: Context, x: float32, y: float32) {.inline.} =
|
||||
pixie_context_line_to(ctx, x, y)
|
||||
|
||||
proc pixie_context_bezier_curve_to(ctx: Context, cp1x: float32, cp1y: float32, cp2x: float32, cp2y: float32, x: float32, y: float32) {.importc: "pixie_context_bezier_curve_to", cdecl.}
|
||||
proc pixie_context_bezier_curve_to(ctx: Context, cp_1x: float32, cp_1y: float32, cp_2x: float32, cp_2y: float32, x: float32, y: float32) {.importc: "pixie_context_bezier_curve_to", cdecl.}
|
||||
|
||||
proc bezierCurveTo*(ctx: Context, cp1x: float32, cp1y: float32, cp2x: float32, cp2y: float32, x: float32, y: float32) {.inline.} =
|
||||
pixie_context_bezier_curve_to(ctx, cp1x, cp1y, cp2x, cp2y, x, y)
|
||||
|
@ -1209,14 +1209,14 @@ proc pixie_context_quadratic_curve_to(ctx: Context, cpx: float32, cpy: float32,
|
|||
proc quadraticCurveTo*(ctx: Context, cpx: float32, cpy: float32, x: float32, y: float32) {.inline.} =
|
||||
pixie_context_quadratic_curve_to(ctx, cpx, cpy, x, y)
|
||||
|
||||
proc pixie_context_arc(ctx: Context, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.importc: "pixie_context_arc", cdecl.}
|
||||
proc pixie_context_arc(ctx: Context, x: float32, y: float32, r: float32, a_0: float32, a_1: float32, ccw: bool) {.importc: "pixie_context_arc", cdecl.}
|
||||
|
||||
proc arc*(ctx: Context, x: float32, y: float32, r: float32, a0: float32, a1: float32, ccw: bool) {.inline.} =
|
||||
pixie_context_arc(ctx, x, y, r, a0, a1, ccw)
|
||||
if checkError():
|
||||
raise newException(PixieError, $takeError())
|
||||
|
||||
proc pixie_context_arc_to(ctx: Context, x1: float32, y1: float32, x2: float32, y2: float32, radius: float32) {.importc: "pixie_context_arc_to", cdecl.}
|
||||
proc pixie_context_arc_to(ctx: Context, x_1: float32, y_1: float32, x_2: float32, y_2: float32, radius: float32) {.importc: "pixie_context_arc_to", cdecl.}
|
||||
|
||||
proc arcTo*(ctx: Context, x1: float32, y1: float32, x2: float32, y2: float32, radius: float32) {.inline.} =
|
||||
pixie_context_arc_to(ctx, x1, y1, x2, y2, radius)
|
||||
|
|
|
@ -187,25 +187,25 @@ class SeqFloat32(Structure):
|
|||
self.ref == obj.ref
|
||||
|
||||
def __del__(self):
|
||||
dll.pixie_seq_float32_unref(self)
|
||||
dll.pixie_seq_float_32_unref(self)
|
||||
|
||||
def __len__(self):
|
||||
dll.seq_float32_len(self)
|
||||
dll.seq_float_32_len(self)
|
||||
|
||||
def __getitem__(self, index):
|
||||
dll.seq_float32_get(self, index)
|
||||
dll.seq_float_32_get(self, index)
|
||||
|
||||
def __setitem__(self, index, value):
|
||||
dll.seq_float32_set(self, index, value)
|
||||
dll.seq_float_32_set(self, index, value)
|
||||
|
||||
def __delitem__(self, index):
|
||||
dll.seq_float32_remove(self, index)
|
||||
dll.seq_float_32_remove(self, index)
|
||||
|
||||
def append(self, value):
|
||||
dll.seq_float32_add(self, value)
|
||||
dll.seq_float_32_add(self, value)
|
||||
|
||||
def clear(self):
|
||||
dll.seq_float32_clear(self)
|
||||
dll.seq_float_32_clear(self)
|
||||
|
||||
class SeqSpan(Structure):
|
||||
_fields_ = [("ref", c_ulonglong)]
|
||||
|
@ -310,14 +310,14 @@ class Image(Structure):
|
|||
raise PixieError(take_error())
|
||||
return result
|
||||
|
||||
def minify_by2(self, power):
|
||||
result = dll.pixie_image_minify_by2(self, power)
|
||||
def minify_by_2(self, power):
|
||||
result = dll.pixie_image_minify_by_2(self, power)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
return result
|
||||
|
||||
def magnify_by2(self, power):
|
||||
result = dll.pixie_image_magnify_by2(self, power)
|
||||
def magnify_by_2(self, power):
|
||||
result = dll.pixie_image_magnify_by_2(self, power)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
return result
|
||||
|
@ -459,8 +459,8 @@ class Mask(Structure):
|
|||
def fill(self, value):
|
||||
dll.pixie_mask_fill(self, value)
|
||||
|
||||
def minify_by2(self, power):
|
||||
result = dll.pixie_mask_minify_by2(self, power)
|
||||
def minify_by_2(self, power):
|
||||
result = dll.pixie_mask_minify_by_2(self, power)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
return result
|
||||
|
@ -639,22 +639,22 @@ class Path(Structure):
|
|||
def line_to(self, x, y):
|
||||
dll.pixie_path_line_to(self, x, y)
|
||||
|
||||
def bezier_curve_to(self, x1, y1, x2, y2, x3, y3):
|
||||
dll.pixie_path_bezier_curve_to(self, x1, y1, x2, y2, x3, y3)
|
||||
def bezier_curve_to(self, x_1, y_1, x_2, y_2, x_3, y_3):
|
||||
dll.pixie_path_bezier_curve_to(self, x_1, y_1, x_2, y_2, x_3, y_3)
|
||||
|
||||
def quadratic_curve_to(self, x1, y1, x2, y2):
|
||||
dll.pixie_path_quadratic_curve_to(self, x1, y1, x2, y2)
|
||||
def quadratic_curve_to(self, x_1, y_1, x_2, y_2):
|
||||
dll.pixie_path_quadratic_curve_to(self, x_1, y_1, x_2, y_2)
|
||||
|
||||
def elliptical_arc_to(self, rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, x, y):
|
||||
dll.pixie_path_elliptical_arc_to(self, rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, x, y)
|
||||
|
||||
def arc(self, x, y, r, a0, a1, ccw):
|
||||
dll.pixie_path_arc(self, x, y, r, a0, a1, ccw)
|
||||
def arc(self, x, y, r, a_0, a_1, ccw):
|
||||
dll.pixie_path_arc(self, x, y, r, a_0, a_1, ccw)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
def arc_to(self, x1, y1, x2, y2, r):
|
||||
dll.pixie_path_arc_to(self, x1, y1, x2, y2, r)
|
||||
def arc_to(self, x_1, y_1, x_2, y_2, r):
|
||||
dll.pixie_path_arc_to(self, x_1, y_1, x_2, y_2, r)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
|
@ -1025,18 +1025,18 @@ class Context(Structure):
|
|||
def reset_transform(self):
|
||||
dll.pixie_context_reset_transform(self)
|
||||
|
||||
def draw_image1(self, image, dx, dy):
|
||||
dll.pixie_context_draw_image1(self, image, dx, dy)
|
||||
def draw_image_1(self, image, dx, dy):
|
||||
dll.pixie_context_draw_image_1(self, image, dx, dy)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
def draw_image2(self, image, dx, dy, d_width, d_height):
|
||||
dll.pixie_context_draw_image2(self, image, dx, dy, d_width, d_height)
|
||||
def draw_image_2(self, image, dx, dy, d_width, d_height):
|
||||
dll.pixie_context_draw_image_2(self, image, dx, dy, d_width, d_height)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
def draw_image3(self, image, sx, sy, s_width, s_height, dx, dy, d_width, d_height):
|
||||
dll.pixie_context_draw_image3(self, image, sx, sy, s_width, s_height, dx, dy, d_width, d_height)
|
||||
def draw_image_3(self, image, sx, sy, s_width, s_height, dx, dy, d_width, d_height):
|
||||
dll.pixie_context_draw_image_3(self, image, sx, sy, s_width, s_height, dx, dy, d_width, d_height)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
|
@ -1046,19 +1046,19 @@ class Context(Structure):
|
|||
def line_to(self, x, y):
|
||||
dll.pixie_context_line_to(self, x, y)
|
||||
|
||||
def bezier_curve_to(self, cp1x, cp1y, cp2x, cp2y, x, y):
|
||||
dll.pixie_context_bezier_curve_to(self, cp1x, cp1y, cp2x, cp2y, x, y)
|
||||
def bezier_curve_to(self, cp_1x, cp_1y, cp_2x, cp_2y, x, y):
|
||||
dll.pixie_context_bezier_curve_to(self, cp_1x, cp_1y, cp_2x, cp_2y, x, y)
|
||||
|
||||
def quadratic_curve_to(self, cpx, cpy, x, y):
|
||||
dll.pixie_context_quadratic_curve_to(self, cpx, cpy, x, y)
|
||||
|
||||
def arc(self, x, y, r, a0, a1, ccw):
|
||||
dll.pixie_context_arc(self, x, y, r, a0, a1, ccw)
|
||||
def arc(self, x, y, r, a_0, a_1, ccw):
|
||||
dll.pixie_context_arc(self, x, y, r, a_0, a_1, ccw)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
def arc_to(self, x1, y1, x2, y2, radius):
|
||||
dll.pixie_context_arc_to(self, x1, y1, x2, y2, radius)
|
||||
def arc_to(self, x_1, y_1, x_2, y_2, radius):
|
||||
dll.pixie_context_arc_to(self, x_1, y_1, x_2, y_2, radius)
|
||||
if check_error():
|
||||
raise PixieError(take_error())
|
||||
|
||||
|
@ -1197,26 +1197,26 @@ dll.pixie_check_error.restype = c_bool
|
|||
dll.pixie_take_error.argtypes = []
|
||||
dll.pixie_take_error.restype = c_char_p
|
||||
|
||||
dll.pixie_seq_float32_unref.argtypes = [SeqFloat32]
|
||||
dll.pixie_seq_float32_unref.restype = None
|
||||
dll.pixie_seq_float_32_unref.argtypes = [SeqFloat32]
|
||||
dll.pixie_seq_float_32_unref.restype = None
|
||||
|
||||
dll.seq_float32_len.argtypes = [SeqFloat32]
|
||||
dll.seq_float32_len.restype = None
|
||||
dll.seq_float_32_len.argtypes = [SeqFloat32]
|
||||
dll.seq_float_32_len.restype = None
|
||||
|
||||
dll.seq_float32_get.argtypes = [SeqFloat32, c_longlong]
|
||||
dll.seq_float32_get.restype = SeqFloat32
|
||||
dll.seq_float_32_get.argtypes = [SeqFloat32, c_longlong]
|
||||
dll.seq_float_32_get.restype = SeqFloat32
|
||||
|
||||
dll.seq_float32_set.argtypes = [SeqFloat32, c_longlong, c_float]
|
||||
dll.seq_float32_set.restype = None
|
||||
dll.seq_float_32_set.argtypes = [SeqFloat32, c_longlong, c_float]
|
||||
dll.seq_float_32_set.restype = None
|
||||
|
||||
dll.seq_float32_remove.argtypes = [SeqFloat32, c_longlong]
|
||||
dll.seq_float32_remove.restype = None
|
||||
dll.seq_float_32_remove.argtypes = [SeqFloat32, c_longlong]
|
||||
dll.seq_float_32_remove.restype = None
|
||||
|
||||
dll.seq_float32_add.argtypes = [SeqFloat32, c_float]
|
||||
dll.seq_float32_add.restype = None
|
||||
dll.seq_float_32_add.argtypes = [SeqFloat32, c_float]
|
||||
dll.seq_float_32_add.restype = None
|
||||
|
||||
dll.seq_float32_clear.argtypes = [SeqFloat32]
|
||||
dll.seq_float32_clear.restype = None
|
||||
dll.seq_float_32_clear.argtypes = [SeqFloat32]
|
||||
dll.seq_float_32_clear.restype = None
|
||||
|
||||
dll.pixie_seq_span_unref.argtypes = [SeqSpan]
|
||||
dll.pixie_seq_span_unref.restype = None
|
||||
|
@ -1287,11 +1287,11 @@ dll.pixie_image_flip_vertical.restype = None
|
|||
dll.pixie_image_sub_image.argtypes = [Image, c_longlong, c_longlong, c_longlong, c_longlong]
|
||||
dll.pixie_image_sub_image.restype = Image
|
||||
|
||||
dll.pixie_image_minify_by2.argtypes = [Image, c_longlong]
|
||||
dll.pixie_image_minify_by2.restype = Image
|
||||
dll.pixie_image_minify_by_2.argtypes = [Image, c_longlong]
|
||||
dll.pixie_image_minify_by_2.restype = Image
|
||||
|
||||
dll.pixie_image_magnify_by2.argtypes = [Image, c_longlong]
|
||||
dll.pixie_image_magnify_by2.restype = Image
|
||||
dll.pixie_image_magnify_by_2.argtypes = [Image, c_longlong]
|
||||
dll.pixie_image_magnify_by_2.restype = Image
|
||||
|
||||
dll.pixie_image_apply_opacity.argtypes = [Image, c_float]
|
||||
dll.pixie_image_apply_opacity.restype = None
|
||||
|
@ -1377,8 +1377,8 @@ dll.pixie_mask_set_value.restype = None
|
|||
dll.pixie_mask_fill.argtypes = [Mask, c_ubyte]
|
||||
dll.pixie_mask_fill.restype = None
|
||||
|
||||
dll.pixie_mask_minify_by2.argtypes = [Mask, c_longlong]
|
||||
dll.pixie_mask_minify_by2.restype = Mask
|
||||
dll.pixie_mask_minify_by_2.argtypes = [Mask, c_longlong]
|
||||
dll.pixie_mask_minify_by_2.restype = Mask
|
||||
|
||||
dll.pixie_mask_spread.argtypes = [Mask, c_float]
|
||||
dll.pixie_mask_spread.restype = None
|
||||
|
@ -1749,14 +1749,14 @@ dll.pixie_context_transform.restype = None
|
|||
dll.pixie_context_reset_transform.argtypes = [Context]
|
||||
dll.pixie_context_reset_transform.restype = None
|
||||
|
||||
dll.pixie_context_draw_image1.argtypes = [Context, Image, c_float, c_float]
|
||||
dll.pixie_context_draw_image1.restype = None
|
||||
dll.pixie_context_draw_image_1.argtypes = [Context, Image, c_float, c_float]
|
||||
dll.pixie_context_draw_image_1.restype = None
|
||||
|
||||
dll.pixie_context_draw_image2.argtypes = [Context, Image, c_float, c_float, c_float, c_float]
|
||||
dll.pixie_context_draw_image2.restype = None
|
||||
dll.pixie_context_draw_image_2.argtypes = [Context, Image, c_float, c_float, c_float, c_float]
|
||||
dll.pixie_context_draw_image_2.restype = None
|
||||
|
||||
dll.pixie_context_draw_image3.argtypes = [Context, Image, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float]
|
||||
dll.pixie_context_draw_image3.restype = None
|
||||
dll.pixie_context_draw_image_3.argtypes = [Context, Image, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float]
|
||||
dll.pixie_context_draw_image_3.restype = None
|
||||
|
||||
dll.pixie_context_move_to.argtypes = [Context, c_float, c_float]
|
||||
dll.pixie_context_move_to.restype = None
|
||||
|
|
Loading…
Reference in a new issue