From cce44af08f42be19b22a51d64050d8aab0a0204c Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 24 Aug 2021 23:29:40 -0500 Subject: [PATCH 1/7] add py bindings --- bindings/generated/pixie.nim | 1 + bindings/generated/pixie.py | 1862 ++++++++++++++++++++++++++++++++++ 2 files changed, 1863 insertions(+) create mode 100644 bindings/generated/pixie.py diff --git a/bindings/generated/pixie.nim b/bindings/generated/pixie.nim index 489a3f3..d977ac4 100644 --- a/bindings/generated/pixie.nim +++ b/bindings/generated/pixie.nim @@ -1392,3 +1392,4 @@ proc pixie_angle_to_miter_limit(angle: float32): float32 {.importc: "pixie_angle proc angleToMiterLimit*(angle: float32): float32 {.inline.} = result = pixie_angle_to_miter_limit(angle) + diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py new file mode 100644 index 0000000..0b9c1e0 --- /dev/null +++ b/bindings/generated/pixie.py @@ -0,0 +1,1862 @@ +from ctypes import * + +dll = cdll.LoadLibrary("bindings/generated/pixie.dll") + +class PixieError(Exception): + pass + +FileFormat = c_byte +FF_PNG = 0 +FF_BMP = 1 +FF_JPG = 2 +FF_GIF = 3 + +BlendMode = c_byte +BM_NORMAL = 0 +BM_DARKEN = 1 +BM_MULTIPLY = 2 +BM_COLOR_BURN = 3 +BM_LIGHTEN = 4 +BM_SCREEN = 5 +BM_COLOR_DODGE = 6 +BM_OVERLAY = 7 +BM_SOFT_LIGHT = 8 +BM_HARD_LIGHT = 9 +BM_DIFFERENCE = 10 +BM_EXCLUSION = 11 +BM_HUE = 12 +BM_SATURATION = 13 +BM_COLOR = 14 +BM_LUMINOSITY = 15 +BM_MASK = 16 +BM_OVERWRITE = 17 +BM_SUBTRACT_MASK = 18 +BM_EXCLUDE_MASK = 19 + +PaintKind = c_byte +PK_SOLID = 0 +PK_IMAGE = 1 +PK_IMAGE_TILED = 2 +PK_GRADIENT_LINEAR = 3 +PK_GRADIENT_RADIAL = 4 +PK_GRADIENT_ANGULAR = 5 + +WindingRule = c_byte +WR_NON_ZERO = 0 +WR_EVEN_ODD = 1 + +LineCap = c_byte +LC_BUTT = 0 +LC_ROUND = 1 +LC_SQUARE = 2 + +LineJoin = c_byte +LJ_MITER = 0 +LJ_ROUND = 1 +LJ_BEVEL = 2 + +HorizontalAlignment = c_byte +HA_LEFT = 0 +HA_CENTER = 1 +HA_RIGHT = 2 + +VerticalAlignment = c_byte +VA_TOP = 0 +VA_MIDDLE = 1 +VA_BOTTOM = 2 + +TextCase = c_byte +TC_NORMAL = 0 +TC_UPPER = 1 +TC_LOWER = 2 +TC_TITLE = 3 + +class Vector2 (Structure): + _fields_ = [ + ("x", c_float), + ("y", c_float), + ] + + def __init__(self, x, y): + self.x = x + self.y = y + + def __eq__(self, obj): + self.x == obj.x and self.y == obj.y + +class Matrix3 (Structure): + _fields_ = [ + ("a", c_float), + ("b", c_float), + ("c", c_float), + ("d", c_float), + ("e", c_float), + ("f", c_float), + ("g", c_float), + ("h", c_float), + ("i", c_float), + ] + + def __init__(self, a, b, c, d, e, f, g, h, i): + self.a = a + self.b = b + self.c = c + self.d = d + self.e = e + self.f = f + self.g = g + self.h = h + self.i = i + + def __eq__(self, obj): + self.a == obj.a and self.b == obj.b and self.c == obj.c and self.d == obj.d and self.e == obj.e and self.f == obj.f and self.g == obj.g and self.h == obj.h and self.i == obj.i + +class Rect (Structure): + _fields_ = [ + ("x", c_float), + ("y", c_float), + ("w", c_float), + ("h", c_float), + ] + + def __init__(self, x, y, w, h): + self.x = x + self.y = y + self.w = w + self.h = h + + def __eq__(self, obj): + self.x == obj.x and self.y == obj.y and self.w == obj.w and self.h == obj.h + +class Color (Structure): + _fields_ = [ + ("r", c_float), + ("g", c_float), + ("b", c_float), + ("a", c_float), + ] + + def __init__(self, r, g, b, a): + self.r = r + self.g = g + self.b = b + self.a = a + + def __eq__(self, obj): + self.r == obj.r and self.g == obj.g and self.b == obj.b and self.a == obj.a + +class ColorStop (Structure): + _fields_ = [ + ("color", Color), + ("position", c_float), + ] + + def __init__(self, color, position): + self.color = color + self.position = position + + def __eq__(self, obj): + self.color == obj.color and self.position == obj.position + +class TextMetrics (Structure): + _fields_ = [ + ("width", c_float), + ] + + def __init__(self, width): + self.width = width + + def __eq__(self, obj): + self.width == obj.width + +def pixie_check_error(): + result = dll.pixie_check_error() + return result + +def pixie_take_error(): + result = dll.pixie_take_error().decode("utf8") + return result + +class SeqFloat32 (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_seq_float32_unref(self) + + def __len__(self): + dll.pixie_seq_float32_len(self) + + def __getitem__(self, index): + dll.pixie_seq_float32_get(self, index) + + def __setitem__(self, index, value): + dll.pixie_seq_float32_set(self, index, value) + + def __delitem__(self, index): + dll.pixie_seq_float32_remove(self, index) + + def append(self, value): + dll.pixie_seq_float32_add(self, value) + + def clear(self): + dll.pixie_seq_float32_clear(self) + +class SeqSpan (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_seq_span_unref(self) + + def __len__(self): + dll.pixie_seq_span_len(self) + + def __getitem__(self, index): + dll.pixie_seq_span_get(self, index) + + def __setitem__(self, index, value): + dll.pixie_seq_span_set(self, index, value) + + def __delitem__(self, index): + dll.pixie_seq_span_remove(self, index) + + def append(self, value): + dll.pixie_seq_span_add(self, value) + + def clear(self): + dll.pixie_seq_span_clear(self) + + def typeset(self, bounds, hAlign, vAlign, wrap): + result = dll.pixie_seq_span_typeset(self, bounds, hAlign, vAlign, wrap) + return result + + def compute_bounds(self): + result = dll.pixie_seq_span_compute_bounds(self) + return result + +class Image (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_image_unref(self) + + @property + def width(self): + dll.pixie_image_get_width(self) + + @width.setter + def width(self, width): + dll.pixie_image_set_width(self, width) + + @property + def height(self): + dll.pixie_image_get_height(self) + + @height.setter + def height(self, height): + dll.pixie_image_set_height(self, height) + + def write_file(self, filePath): + dll.pixie_image_write_file(self, filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def wh(self): + result = dll.pixie_image_wh(self) + return result + + def copy(self): + result = dll.pixie_image_copy(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def get_color(self, x, y): + result = dll.pixie_image_get_color(self, x, y) + return result + + def set_color(self, x, y, color): + dll.pixie_image_set_color(self, x, y, color) + + def fill(self, color): + dll.pixie_image_fill(self, color) + + def flip_horizontal(self): + dll.pixie_image_flip_horizontal(self) + + def flip_vertical(self): + dll.pixie_image_flip_vertical(self) + + def sub_image(self, x, y, w, h): + result = dll.pixie_image_sub_image(self, x, y, w, h) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def minify_by2(self, power): + result = dll.pixie_image_minify_by2(self, power) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def magnify_by2(self, power): + result = dll.pixie_image_magnify_by2(self, power) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def apply_opacity(self, opacity): + dll.pixie_image_apply_opacity(self, opacity) + + def invert(self): + dll.pixie_image_invert(self) + + def blur(self, radius, outOfBounds): + dll.pixie_image_blur(self, radius, outOfBounds) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def new_mask(self): + result = dll.pixie_image_new_mask(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def resize(self, width, height): + result = dll.pixie_image_resize(self, width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def shadow(self, offset, spread, blur, color): + result = dll.pixie_image_shadow(self, offset, spread, blur, color) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def super_image(self, x, y, w, h): + result = dll.pixie_image_super_image(self, x, y, w, h) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def draw(self, mask, transform, blendMode): + dll.pixie_image_mask_draw(self, mask, transform, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def draw(self, b, transform, blendMode): + dll.pixie_image_image_draw(self, b, transform, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_gradient(self, paint): + dll.pixie_image_fill_gradient(self, paint) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_text(self, arrangement, transform): + dll.pixie_image_arrangement_fill_text(self, arrangement, transform) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_text(self, font, text, transform, bounds, hAlign, vAlign): + dll.pixie_image_font_fill_text(self, font, text.encode("utf8"), transform, bounds, hAlign, vAlign) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): + dll.pixie_image_arrangement_stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_text(self, font, text, transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes): + dll.pixie_image_font_stroke_text(self, font, text.encode("utf8"), transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_path(self, path, paint, transform, windingRule): + dll.pixie_image_fill_path(self, path, paint, transform, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_path(self, path, paint, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): + dll.pixie_image_stroke_path(self, path, paint, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def new_context(self): + result = dll.pixie_image_new_context(self) + return result + +class Mask (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_mask_unref(self) + + @property + def width(self): + dll.pixie_mask_get_width(self) + + @width.setter + def width(self, width): + dll.pixie_mask_set_width(self, width) + + @property + def height(self): + dll.pixie_mask_get_height(self) + + @height.setter + def height(self, height): + dll.pixie_mask_set_height(self, height) + + def write_file(self, filePath): + dll.pixie_mask_write_file(self, filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def wh(self): + result = dll.pixie_mask_wh(self) + return result + + def copy(self): + result = dll.pixie_mask_copy(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def get_value(self, x, y): + result = dll.pixie_mask_get_value(self, x, y) + return result + + def set_value(self, x, y, value): + dll.pixie_mask_set_value(self, x, y, value) + + def fill(self, value): + dll.pixie_mask_fill(self, value) + + def minify_by2(self, power): + result = dll.pixie_mask_minify_by2(self, power) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def spread(self, spread): + dll.pixie_mask_spread(self, spread) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def ceil(self): + dll.pixie_mask_ceil(self) + + def new_image(self): + result = dll.pixie_mask_new_image(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def apply_opacity(self, opacity): + dll.pixie_mask_apply_opacity(self, opacity) + + def invert(self): + dll.pixie_mask_invert(self) + + def blur(self, radius, outOfBounds): + dll.pixie_mask_blur(self, radius, outOfBounds) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def draw(self, b, transform, blendMode): + dll.pixie_mask_mask_draw(self, b, transform, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def draw(self, image, transform, blendMode): + dll.pixie_mask_image_draw(self, image, transform, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_text(self, arrangement, transform): + dll.pixie_mask_arrangement_fill_text(self, arrangement, transform) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_text(self, font, text, transform, bounds, hAlign, vAlign): + dll.pixie_mask_font_fill_text(self, font, text.encode("utf8"), transform, bounds, hAlign, vAlign) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): + dll.pixie_mask_arrangement_stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_text(self, font, text, transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes): + dll.pixie_mask_font_stroke_text(self, font, text.encode("utf8"), transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_path(self, path, transform, windingRule, blendMode): + dll.pixie_mask_fill_path(self, path, transform, windingRule, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_path(self, path, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes, blendMode): + dll.pixie_mask_stroke_path(self, path, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes, blendMode) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + +class Paint (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_paint_unref(self) + + @property + def kind(self): + dll.pixie_paint_get_kind(self) + + @kind.setter + def kind(self, kind): + dll.pixie_paint_set_kind(self, kind) + + @property + def blend_mode(self): + dll.pixie_paint_get_blend_mode(self) + + @blend_mode.setter + def blend_mode(self, blend_mode): + dll.pixie_paint_set_blend_mode(self, blend_mode) + + @property + def opacity(self): + dll.pixie_paint_get_opacity(self) + + @opacity.setter + def opacity(self, opacity): + dll.pixie_paint_set_opacity(self, opacity) + + @property + def color(self): + dll.pixie_paint_get_color(self) + + @color.setter + def color(self, color): + dll.pixie_paint_set_color(self, color) + + @property + def image(self): + dll.pixie_paint_get_image(self) + + @image.setter + def image(self, image): + dll.pixie_paint_set_image(self, image) + + @property + def image_mat(self): + dll.pixie_paint_get_image_mat(self) + + @image_mat.setter + def image_mat(self, image_mat): + dll.pixie_paint_set_image_mat(self, image_mat) + + def new_paint(self): + result = dll.pixie_paint_new_paint(self) + return result + +class Path (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_path_unref(self) + + def transform(self, mat): + dll.pixie_path_transform(self, mat) + + def add_path(self, other): + dll.pixie_path_add_path(self, other) + + def close_path(self): + dll.pixie_path_close_path(self) + + def compute_bounds(self, transform): + result = dll.pixie_path_compute_bounds(self, transform) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def fill_overlaps(self, test, transform, windingRule): + result = dll.pixie_path_fill_overlaps(self, test, transform, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def stroke_overlaps(self, test, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): + result = dll.pixie_path_stroke_overlaps(self, test, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def move_to(self, x, y): + dll.pixie_path_move_to(self, x, y) + + 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 quadratic_curve_to(self, x1, y1, x2, y2): + dll.pixie_path_quadratic_curve_to(self, x1, y1, x2, y2) + + def elliptical_arc_to(self, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y): + dll.pixie_path_elliptical_arc_to(self, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) + + def arc(self, x, y, r, a0, a1, ccw): + dll.pixie_path_arc(self, x, y, r, a0, a1, ccw) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def arc_to(self, x1, y1, x2, y2, r): + dll.pixie_path_arc_to(self, x1, y1, x2, y2, r) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def rect(self, x, y, w, h, clockwise): + dll.pixie_path_rect(self, x, y, w, h, clockwise) + + def rounded_rect(self, x, y, w, h, nw, ne, se, sw, clockwise): + dll.pixie_path_rounded_rect(self, x, y, w, h, nw, ne, se, sw, clockwise) + + def ellipse(self, cx, cy, rx, ry): + dll.pixie_path_ellipse(self, cx, cy, rx, ry) + + def circle(self, cx, cy, r): + dll.pixie_path_circle(self, cx, cy, r) + + def polygon(self, x, y, size, sides): + dll.pixie_path_polygon(self, x, y, size, sides) + +class Typeface (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_typeface_unref(self) + + @property + def file_path(self): + dll.pixie_typeface_get_file_path(self).decode("utf8") + + @file_path.setter + def file_path(self, file_path): + dll.pixie_typeface_set_file_path(self, file_path.encode("utf8")) + + def ascent(self): + result = dll.pixie_typeface_ascent(self) + return result + + def descent(self): + result = dll.pixie_typeface_descent(self) + return result + + def line_gap(self): + result = dll.pixie_typeface_line_gap(self) + return result + + def line_height(self): + result = dll.pixie_typeface_line_height(self) + return result + + def get_glyph_path(self, rune): + result = dll.pixie_typeface_get_glyph_path(self, rune) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def get_advance(self, rune): + result = dll.pixie_typeface_get_advance(self, rune) + return result + + def get_kerning_adjustment(self, left, right): + result = dll.pixie_typeface_get_kerning_adjustment(self, left, right) + return result + + def new_font(self): + result = dll.pixie_typeface_new_font(self) + return result + +class Font (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_font_unref(self) + + @property + def typeface(self): + dll.pixie_font_get_typeface(self) + + @typeface.setter + def typeface(self, typeface): + dll.pixie_font_set_typeface(self, typeface) + + @property + def size(self): + dll.pixie_font_get_size(self) + + @size.setter + def size(self, size): + dll.pixie_font_set_size(self, size) + + @property + def line_height(self): + dll.pixie_font_get_line_height(self) + + @line_height.setter + def line_height(self, line_height): + dll.pixie_font_set_line_height(self, line_height) + + @property + def text_case(self): + dll.pixie_font_get_text_case(self) + + @text_case.setter + def text_case(self, text_case): + dll.pixie_font_set_text_case(self, text_case) + + @property + def underline(self): + dll.pixie_font_get_underline(self) + + @underline.setter + def underline(self, underline): + dll.pixie_font_set_underline(self, underline) + + @property + def strikethrough(self): + dll.pixie_font_get_strikethrough(self) + + @strikethrough.setter + def strikethrough(self, strikethrough): + dll.pixie_font_set_strikethrough(self, strikethrough) + + @property + def no_kerning_adjustments(self): + dll.pixie_font_get_no_kerning_adjustments(self) + + @no_kerning_adjustments.setter + def no_kerning_adjustments(self, no_kerning_adjustments): + dll.pixie_font_set_no_kerning_adjustments(self, no_kerning_adjustments) + + def scale(self): + result = dll.pixie_font_scale(self) + return result + + def default_line_height(self): + result = dll.pixie_font_default_line_height(self) + return result + + def typeset(self, text, bounds, hAlign, vAlign, wrap): + result = dll.pixie_font_typeset(self, text.encode("utf8"), bounds, hAlign, vAlign, wrap) + return result + + def compute_bounds(self, text): + result = dll.pixie_font_compute_bounds(self, text.encode("utf8")) + return result + +class Span (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_span_unref(self) + + @property + def text(self): + dll.pixie_span_get_text(self).decode("utf8") + + @text.setter + def text(self, text): + dll.pixie_span_set_text(self, text.encode("utf8")) + + @property + def font(self): + dll.pixie_span_get_font(self) + + @font.setter + def font(self, font): + dll.pixie_span_set_font(self, font) + +class Arrangement (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_arrangement_unref(self) + + def compute_bounds(self): + result = dll.pixie_arrangement_compute_bounds(self) + return result + +class Context (Structure): + _fields_ = [("ref", c_ulonglong)] + + def __bool__(self): + self.ref != None + + def __eq__(self, obj): + self.ref == obj.ref + + def __del__(self): + dll.pixie_context_unref(self) + + @property + def image(self): + dll.pixie_context_get_image(self) + + @image.setter + def image(self, image): + dll.pixie_context_set_image(self, image) + + @property + def fill_style(self): + dll.pixie_context_get_fill_style(self) + + @fill_style.setter + def fill_style(self, fill_style): + dll.pixie_context_set_fill_style(self, fill_style) + + @property + def stroke_style(self): + dll.pixie_context_get_stroke_style(self) + + @stroke_style.setter + def stroke_style(self, stroke_style): + dll.pixie_context_set_stroke_style(self, stroke_style) + + @property + def global_alpha(self): + dll.pixie_context_get_global_alpha(self) + + @global_alpha.setter + def global_alpha(self, global_alpha): + dll.pixie_context_set_global_alpha(self, global_alpha) + + @property + def line_width(self): + dll.pixie_context_get_line_width(self) + + @line_width.setter + def line_width(self, line_width): + dll.pixie_context_set_line_width(self, line_width) + + @property + def miter_limit(self): + dll.pixie_context_get_miter_limit(self) + + @miter_limit.setter + def miter_limit(self, miter_limit): + dll.pixie_context_set_miter_limit(self, miter_limit) + + @property + def line_cap(self): + dll.pixie_context_get_line_cap(self) + + @line_cap.setter + def line_cap(self, line_cap): + dll.pixie_context_set_line_cap(self, line_cap) + + @property + def line_join(self): + dll.pixie_context_get_line_join(self) + + @line_join.setter + def line_join(self, line_join): + dll.pixie_context_set_line_join(self, line_join) + + @property + def font(self): + dll.pixie_context_get_font(self).decode("utf8") + + @font.setter + def font(self, font): + dll.pixie_context_set_font(self, font.encode("utf8")) + + @property + def font_size(self): + dll.pixie_context_get_font_size(self) + + @font_size.setter + def font_size(self, font_size): + dll.pixie_context_set_font_size(self, font_size) + + @property + def text_align(self): + dll.pixie_context_get_text_align(self) + + @text_align.setter + def text_align(self, text_align): + dll.pixie_context_set_text_align(self, text_align) + + def save(self): + dll.pixie_context_save(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def save_layer(self): + dll.pixie_context_save_layer(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def restore(self): + dll.pixie_context_restore(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def begin_path(self): + dll.pixie_context_begin_path(self) + + def close_path(self): + dll.pixie_context_close_path(self) + + def fill(self, path, windingRule): + dll.pixie_context_path_fill(self, path, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill(self, windingRule): + dll.pixie_context_winding_rule_fill(self, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def clip(self, path, windingRule): + dll.pixie_context_path_clip(self, path, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def clip(self, windingRule): + dll.pixie_context_winding_rule_clip(self, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke(self, path): + dll.pixie_context_path_stroke(self, path) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke(self): + dll.pixie_context_stroke(self) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def measure_text(self, text): + result = dll.pixie_context_measure_text(self, text.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def get_transform(self): + result = dll.pixie_context_get_transform(self) + return result + + def set_transform(self, transform): + dll.pixie_context_set_transform(self, transform) + + def transform(self, transform): + dll.pixie_context_transform(self, transform) + + 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) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def draw_image2(self, image, dx, dy, dWidth, dHeight): + dll.pixie_context_draw_image2(self, image, dx, dy, dWidth, dHeight) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def draw_image3(self, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight): + dll.pixie_context_draw_image3(self, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def move_to(self, x, y): + dll.pixie_context_move_to(self, x, y) + + 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 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) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def arc_to(self, x1, y1, x2, y2, radius): + dll.pixie_context_arc_to(self, x1, y1, x2, y2, radius) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def rect(self, x, y, width, height): + dll.pixie_context_rect(self, x, y, width, height) + + def rounded_rect(self, x, y, w, h, nw, ne, se, sw): + dll.pixie_context_rounded_rect(self, x, y, w, h, nw, ne, se, sw) + + def ellipse(self, x, y, rx, ry): + dll.pixie_context_ellipse(self, x, y, rx, ry) + + def circle(self, cx, cy, r): + dll.pixie_context_circle(self, cx, cy, r) + + def polygon(self, x, y, size, sides): + dll.pixie_context_polygon(self, x, y, size, sides) + + def clear_rect(self, x, y, width, height): + dll.pixie_context_clear_rect(self, x, y, width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_rect(self, x, y, width, height): + dll.pixie_context_fill_rect(self, x, y, width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_rect(self, x, y, width, height): + dll.pixie_context_stroke_rect(self, x, y, width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def fill_text(self, text, x, y): + dll.pixie_context_fill_text(self, text.encode("utf8"), x, y) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def stroke_text(self, text, x, y): + dll.pixie_context_stroke_text(self, text.encode("utf8"), x, y) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + + def translate(self, x, y): + dll.pixie_context_translate(self, x, y) + + def scale(self, x, y): + dll.pixie_context_scale(self, x, y) + + def rotate(self, angle): + dll.pixie_context_rotate(self, angle) + + def is_point_in_path(self, x, y, windingRule): + result = dll.pixie_context_is_point_in_path(self, x, y, windingRule) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + + def is_point_in_stroke(self, x, y): + result = dll.pixie_context_is_point_in_stroke(self, x, y) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_new_image(width, height): + result = dll.pixie_new_image(width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_new_mask(width, height): + result = dll.pixie_new_mask(width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_new_paint(kind): + result = dll.pixie_new_paint(kind) + return result + +def pixie_new_path(): + result = dll.pixie_new_path() + return result + +def pixie_new_span(text, font): + result = dll.pixie_new_span(text.encode("utf8"), font) + return result + +def pixie_new_context(width, height): + result = dll.pixie_new_context(width, height) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_read_image(filePath): + result = dll.pixie_read_image(filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_read_mask(filePath): + result = dll.pixie_read_mask(filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_read_typeface(filePath): + result = dll.pixie_read_typeface(filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_read_font(filePath): + result = dll.pixie_read_font(filePath.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_parse_path(path): + result = dll.pixie_parse_path(path.encode("utf8")) + if pixie_check_error(): + raise PixieError(pixie_take_error()) + return result + +def pixie_miter_limit_to_angle(limit): + result = dll.pixie_miter_limit_to_angle(limit) + return result + +def pixie_angle_to_miter_limit(angle): + result = dll.pixie_angle_to_miter_limit(angle) + return result + +dll.pixie_check_error.argtypes = [] +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_float32_len.argtypes = [SeqFloat32] +dll.pixie_seq_float32_len.restype = None + +dll.pixie_seq_float32_get.argtypes = [SeqFloat32, c_longlong] +dll.pixie_seq_float32_get.restype = SeqFloat32 + +dll.pixie_seq_float32_set.argtypes = [SeqFloat32, c_longlong, c_float] +dll.pixie_seq_float32_set.restype = None + +dll.pixie_seq_float32_remove.argtypes = [SeqFloat32, c_longlong] +dll.pixie_seq_float32_remove.restype = None + +dll.pixie_seq_float32_add.argtypes = [SeqFloat32, c_float] +dll.pixie_seq_float32_add.restype = None + +dll.pixie_seq_float32_clear.argtypes = [SeqFloat32] +dll.pixie_seq_float32_clear.restype = None + +dll.pixie_seq_span_unref.argtypes = [SeqSpan] +dll.pixie_seq_span_unref.restype = None + +dll.pixie_seq_span_len.argtypes = [SeqSpan] +dll.pixie_seq_span_len.restype = None + +dll.pixie_seq_span_get.argtypes = [SeqSpan, c_longlong] +dll.pixie_seq_span_get.restype = SeqSpan + +dll.pixie_seq_span_set.argtypes = [SeqSpan, c_longlong, Span] +dll.pixie_seq_span_set.restype = None + +dll.pixie_seq_span_remove.argtypes = [SeqSpan, c_longlong] +dll.pixie_seq_span_remove.restype = None + +dll.pixie_seq_span_add.argtypes = [SeqSpan, Span] +dll.pixie_seq_span_add.restype = None + +dll.pixie_seq_span_clear.argtypes = [SeqSpan] +dll.pixie_seq_span_clear.restype = None + +dll.pixie_seq_span_typeset.argtypes = [SeqSpan, Vector2, HorizontalAlignment, VerticalAlignment, c_bool] +dll.pixie_seq_span_typeset.restype = Arrangement + +dll.pixie_seq_span_compute_bounds.argtypes = [SeqSpan] +dll.pixie_seq_span_compute_bounds.restype = Vector2 + +dll.pixie_image_unref.argtypes = [Image] +dll.pixie_image_unref.restype = None + +dll.pixie_image_get_width.argtypes = [Image] +dll.pixie_image_get_width.restype = c_longlong + +dll.pixie_image_set_width.argtypes = [Image, c_longlong] +dll.pixie_image_set_width.restype = None + +dll.pixie_image_get_height.argtypes = [Image] +dll.pixie_image_get_height.restype = c_longlong + +dll.pixie_image_set_height.argtypes = [Image, c_longlong] +dll.pixie_image_set_height.restype = None + +dll.pixie_image_write_file.argtypes = [Image, c_char_p] +dll.pixie_image_write_file.restype = None + +dll.pixie_image_wh.argtypes = [Image] +dll.pixie_image_wh.restype = Vector2 + +dll.pixie_image_copy.argtypes = [Image] +dll.pixie_image_copy.restype = Image + +dll.pixie_image_get_color.argtypes = [Image, c_longlong, c_longlong] +dll.pixie_image_get_color.restype = Color + +dll.pixie_image_set_color.argtypes = [Image, c_longlong, c_longlong, Color] +dll.pixie_image_set_color.restype = None + +dll.pixie_image_fill.argtypes = [Image, Color] +dll.pixie_image_fill.restype = None + +dll.pixie_image_flip_horizontal.argtypes = [Image] +dll.pixie_image_flip_horizontal.restype = None + +dll.pixie_image_flip_vertical.argtypes = [Image] +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_magnify_by2.argtypes = [Image, c_longlong] +dll.pixie_image_magnify_by2.restype = Image + +dll.pixie_image_apply_opacity.argtypes = [Image, c_float] +dll.pixie_image_apply_opacity.restype = None + +dll.pixie_image_invert.argtypes = [Image] +dll.pixie_image_invert.restype = None + +dll.pixie_image_blur.argtypes = [Image, c_float, Color] +dll.pixie_image_blur.restype = None + +dll.pixie_image_new_mask.argtypes = [Image] +dll.pixie_image_new_mask.restype = Mask + +dll.pixie_image_resize.argtypes = [Image, c_longlong, c_longlong] +dll.pixie_image_resize.restype = Image + +dll.pixie_image_shadow.argtypes = [Image, Vector2, c_float, c_float, Color] +dll.pixie_image_shadow.restype = Image + +dll.pixie_image_super_image.argtypes = [Image, c_longlong, c_longlong, c_longlong, c_longlong] +dll.pixie_image_super_image.restype = Image + +dll.pixie_image_mask_draw.argtypes = [Image, Mask, Matrix3, BlendMode] +dll.pixie_image_mask_draw.restype = None + +dll.pixie_image_image_draw.argtypes = [Image, Image, Matrix3, BlendMode] +dll.pixie_image_image_draw.restype = None + +dll.pixie_image_fill_gradient.argtypes = [Image, Paint] +dll.pixie_image_fill_gradient.restype = None + +dll.pixie_image_arrangement_fill_text.argtypes = [Image, Arrangement, Matrix3] +dll.pixie_image_arrangement_fill_text.restype = None + +dll.pixie_image_font_fill_text.argtypes = [Image, Font, c_char_p, Matrix3, Vector2, HorizontalAlignment, VerticalAlignment] +dll.pixie_image_font_fill_text.restype = None + +dll.pixie_image_arrangement_stroke_text.argtypes = [Image, Arrangement, Matrix3, c_float, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_image_arrangement_stroke_text.restype = None + +dll.pixie_image_font_stroke_text.argtypes = [Image, Font, c_char_p, Matrix3, c_float, Vector2, HorizontalAlignment, VerticalAlignment, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_image_font_stroke_text.restype = None + +dll.pixie_image_fill_path.argtypes = [Image, Path, Paint, Matrix3, WindingRule] +dll.pixie_image_fill_path.restype = None + +dll.pixie_image_stroke_path.argtypes = [Image, Path, Paint, Matrix3, c_float, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_image_stroke_path.restype = None + +dll.pixie_image_new_context.argtypes = [Image] +dll.pixie_image_new_context.restype = Context + +dll.pixie_mask_unref.argtypes = [Mask] +dll.pixie_mask_unref.restype = None + +dll.pixie_mask_get_width.argtypes = [Mask] +dll.pixie_mask_get_width.restype = c_longlong + +dll.pixie_mask_set_width.argtypes = [Mask, c_longlong] +dll.pixie_mask_set_width.restype = None + +dll.pixie_mask_get_height.argtypes = [Mask] +dll.pixie_mask_get_height.restype = c_longlong + +dll.pixie_mask_set_height.argtypes = [Mask, c_longlong] +dll.pixie_mask_set_height.restype = None + +dll.pixie_mask_write_file.argtypes = [Mask, c_char_p] +dll.pixie_mask_write_file.restype = None + +dll.pixie_mask_wh.argtypes = [Mask] +dll.pixie_mask_wh.restype = Vector2 + +dll.pixie_mask_copy.argtypes = [Mask] +dll.pixie_mask_copy.restype = Mask + +dll.pixie_mask_get_value.argtypes = [Mask, c_longlong, c_longlong] +dll.pixie_mask_get_value.restype = c_ubyte + +dll.pixie_mask_set_value.argtypes = [Mask, c_longlong, c_longlong, c_ubyte] +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_spread.argtypes = [Mask, c_float] +dll.pixie_mask_spread.restype = None + +dll.pixie_mask_ceil.argtypes = [Mask] +dll.pixie_mask_ceil.restype = None + +dll.pixie_mask_new_image.argtypes = [Mask] +dll.pixie_mask_new_image.restype = Image + +dll.pixie_mask_apply_opacity.argtypes = [Mask, c_float] +dll.pixie_mask_apply_opacity.restype = None + +dll.pixie_mask_invert.argtypes = [Mask] +dll.pixie_mask_invert.restype = None + +dll.pixie_mask_blur.argtypes = [Mask, c_float, c_ubyte] +dll.pixie_mask_blur.restype = None + +dll.pixie_mask_mask_draw.argtypes = [Mask, Mask, Matrix3, BlendMode] +dll.pixie_mask_mask_draw.restype = None + +dll.pixie_mask_image_draw.argtypes = [Mask, Image, Matrix3, BlendMode] +dll.pixie_mask_image_draw.restype = None + +dll.pixie_mask_arrangement_fill_text.argtypes = [Mask, Arrangement, Matrix3] +dll.pixie_mask_arrangement_fill_text.restype = None + +dll.pixie_mask_font_fill_text.argtypes = [Mask, Font, c_char_p, Matrix3, Vector2, HorizontalAlignment, VerticalAlignment] +dll.pixie_mask_font_fill_text.restype = None + +dll.pixie_mask_arrangement_stroke_text.argtypes = [Mask, Arrangement, Matrix3, c_float, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_mask_arrangement_stroke_text.restype = None + +dll.pixie_mask_font_stroke_text.argtypes = [Mask, Font, c_char_p, Matrix3, c_float, Vector2, HorizontalAlignment, VerticalAlignment, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_mask_font_stroke_text.restype = None + +dll.pixie_mask_fill_path.argtypes = [Mask, Path, Matrix3, WindingRule, BlendMode] +dll.pixie_mask_fill_path.restype = None + +dll.pixie_mask_stroke_path.argtypes = [Mask, Path, Matrix3, c_float, LineCap, LineJoin, c_float, SeqFloat32, BlendMode] +dll.pixie_mask_stroke_path.restype = None + +dll.pixie_paint_unref.argtypes = [Paint] +dll.pixie_paint_unref.restype = None + +dll.pixie_paint_get_kind.argtypes = [Paint] +dll.pixie_paint_get_kind.restype = PaintKind + +dll.pixie_paint_set_kind.argtypes = [Paint, PaintKind] +dll.pixie_paint_set_kind.restype = None + +dll.pixie_paint_get_blend_mode.argtypes = [Paint] +dll.pixie_paint_get_blend_mode.restype = BlendMode + +dll.pixie_paint_set_blend_mode.argtypes = [Paint, BlendMode] +dll.pixie_paint_set_blend_mode.restype = None + +dll.pixie_paint_get_opacity.argtypes = [Paint] +dll.pixie_paint_get_opacity.restype = c_float + +dll.pixie_paint_set_opacity.argtypes = [Paint, c_float] +dll.pixie_paint_set_opacity.restype = None + +dll.pixie_paint_get_color.argtypes = [Paint] +dll.pixie_paint_get_color.restype = Color + +dll.pixie_paint_set_color.argtypes = [Paint, Color] +dll.pixie_paint_set_color.restype = None + +dll.pixie_paint_get_image.argtypes = [Paint] +dll.pixie_paint_get_image.restype = Image + +dll.pixie_paint_set_image.argtypes = [Paint, Image] +dll.pixie_paint_set_image.restype = None + +dll.pixie_paint_get_image_mat.argtypes = [Paint] +dll.pixie_paint_get_image_mat.restype = Matrix3 + +dll.pixie_paint_set_image_mat.argtypes = [Paint, Matrix3] +dll.pixie_paint_set_image_mat.restype = None + +dll.pixie_paint_new_paint.argtypes = [Paint] +dll.pixie_paint_new_paint.restype = Paint + +dll.pixie_path_unref.argtypes = [Path] +dll.pixie_path_unref.restype = None + +dll.pixie_path_transform.argtypes = [Path, Matrix3] +dll.pixie_path_transform.restype = None + +dll.pixie_path_add_path.argtypes = [Path, Path] +dll.pixie_path_add_path.restype = None + +dll.pixie_path_close_path.argtypes = [Path] +dll.pixie_path_close_path.restype = None + +dll.pixie_path_compute_bounds.argtypes = [Path, Matrix3] +dll.pixie_path_compute_bounds.restype = Rect + +dll.pixie_path_fill_overlaps.argtypes = [Path, Vector2, Matrix3, WindingRule] +dll.pixie_path_fill_overlaps.restype = c_bool + +dll.pixie_path_stroke_overlaps.argtypes = [Path, Vector2, Matrix3, c_float, LineCap, LineJoin, c_float, SeqFloat32] +dll.pixie_path_stroke_overlaps.restype = c_bool + +dll.pixie_path_move_to.argtypes = [Path, c_float, c_float] +dll.pixie_path_move_to.restype = None + +dll.pixie_path_line_to.argtypes = [Path, c_float, c_float] +dll.pixie_path_line_to.restype = None + +dll.pixie_path_bezier_curve_to.argtypes = [Path, c_float, c_float, c_float, c_float, c_float, c_float] +dll.pixie_path_bezier_curve_to.restype = None + +dll.pixie_path_quadratic_curve_to.argtypes = [Path, c_float, c_float, c_float, c_float] +dll.pixie_path_quadratic_curve_to.restype = None + +dll.pixie_path_elliptical_arc_to.argtypes = [Path, c_float, c_float, c_float, c_bool, c_bool, c_float, c_float] +dll.pixie_path_elliptical_arc_to.restype = None + +dll.pixie_path_arc.argtypes = [Path, c_float, c_float, c_float, c_float, c_float, c_bool] +dll.pixie_path_arc.restype = None + +dll.pixie_path_arc_to.argtypes = [Path, c_float, c_float, c_float, c_float, c_float] +dll.pixie_path_arc_to.restype = None + +dll.pixie_path_rect.argtypes = [Path, c_float, c_float, c_float, c_float, c_bool] +dll.pixie_path_rect.restype = None + +dll.pixie_path_rounded_rect.argtypes = [Path, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_bool] +dll.pixie_path_rounded_rect.restype = None + +dll.pixie_path_ellipse.argtypes = [Path, c_float, c_float, c_float, c_float] +dll.pixie_path_ellipse.restype = None + +dll.pixie_path_circle.argtypes = [Path, c_float, c_float, c_float] +dll.pixie_path_circle.restype = None + +dll.pixie_path_polygon.argtypes = [Path, c_float, c_float, c_float, c_longlong] +dll.pixie_path_polygon.restype = None + +dll.pixie_typeface_unref.argtypes = [Typeface] +dll.pixie_typeface_unref.restype = None + +dll.pixie_typeface_get_file_path.argtypes = [Typeface] +dll.pixie_typeface_get_file_path.restype = c_char_p + +dll.pixie_typeface_set_file_path.argtypes = [Typeface, c_char_p] +dll.pixie_typeface_set_file_path.restype = None + +dll.pixie_typeface_ascent.argtypes = [Typeface] +dll.pixie_typeface_ascent.restype = c_float + +dll.pixie_typeface_descent.argtypes = [Typeface] +dll.pixie_typeface_descent.restype = c_float + +dll.pixie_typeface_line_gap.argtypes = [Typeface] +dll.pixie_typeface_line_gap.restype = c_float + +dll.pixie_typeface_line_height.argtypes = [Typeface] +dll.pixie_typeface_line_height.restype = c_float + +dll.pixie_typeface_get_glyph_path.argtypes = [Typeface, c_int] +dll.pixie_typeface_get_glyph_path.restype = Path + +dll.pixie_typeface_get_advance.argtypes = [Typeface, c_int] +dll.pixie_typeface_get_advance.restype = c_float + +dll.pixie_typeface_get_kerning_adjustment.argtypes = [Typeface, c_int, c_int] +dll.pixie_typeface_get_kerning_adjustment.restype = c_float + +dll.pixie_typeface_new_font.argtypes = [Typeface] +dll.pixie_typeface_new_font.restype = Font + +dll.pixie_font_unref.argtypes = [Font] +dll.pixie_font_unref.restype = None + +dll.pixie_font_get_typeface.argtypes = [Font] +dll.pixie_font_get_typeface.restype = Typeface + +dll.pixie_font_set_typeface.argtypes = [Font, Typeface] +dll.pixie_font_set_typeface.restype = None + +dll.pixie_font_get_size.argtypes = [Font] +dll.pixie_font_get_size.restype = c_float + +dll.pixie_font_set_size.argtypes = [Font, c_float] +dll.pixie_font_set_size.restype = None + +dll.pixie_font_get_line_height.argtypes = [Font] +dll.pixie_font_get_line_height.restype = c_float + +dll.pixie_font_set_line_height.argtypes = [Font, c_float] +dll.pixie_font_set_line_height.restype = None + +dll.pixie_font_get_text_case.argtypes = [Font] +dll.pixie_font_get_text_case.restype = TextCase + +dll.pixie_font_set_text_case.argtypes = [Font, TextCase] +dll.pixie_font_set_text_case.restype = None + +dll.pixie_font_get_underline.argtypes = [Font] +dll.pixie_font_get_underline.restype = c_bool + +dll.pixie_font_set_underline.argtypes = [Font, c_bool] +dll.pixie_font_set_underline.restype = None + +dll.pixie_font_get_strikethrough.argtypes = [Font] +dll.pixie_font_get_strikethrough.restype = c_bool + +dll.pixie_font_set_strikethrough.argtypes = [Font, c_bool] +dll.pixie_font_set_strikethrough.restype = None + +dll.pixie_font_get_no_kerning_adjustments.argtypes = [Font] +dll.pixie_font_get_no_kerning_adjustments.restype = c_bool + +dll.pixie_font_set_no_kerning_adjustments.argtypes = [Font, c_bool] +dll.pixie_font_set_no_kerning_adjustments.restype = None + +dll.pixie_font_scale.argtypes = [Font] +dll.pixie_font_scale.restype = c_float + +dll.pixie_font_default_line_height.argtypes = [Font] +dll.pixie_font_default_line_height.restype = c_float + +dll.pixie_font_typeset.argtypes = [Font, c_char_p, Vector2, HorizontalAlignment, VerticalAlignment, c_bool] +dll.pixie_font_typeset.restype = Arrangement + +dll.pixie_font_compute_bounds.argtypes = [Font, c_char_p] +dll.pixie_font_compute_bounds.restype = Vector2 + +dll.pixie_span_unref.argtypes = [Span] +dll.pixie_span_unref.restype = None + +dll.pixie_span_get_text.argtypes = [Span] +dll.pixie_span_get_text.restype = c_char_p + +dll.pixie_span_set_text.argtypes = [Span, c_char_p] +dll.pixie_span_set_text.restype = None + +dll.pixie_span_get_font.argtypes = [Span] +dll.pixie_span_get_font.restype = Font + +dll.pixie_span_set_font.argtypes = [Span, Font] +dll.pixie_span_set_font.restype = None + +dll.pixie_arrangement_unref.argtypes = [Arrangement] +dll.pixie_arrangement_unref.restype = None + +dll.pixie_arrangement_compute_bounds.argtypes = [Arrangement] +dll.pixie_arrangement_compute_bounds.restype = Vector2 + +dll.pixie_context_unref.argtypes = [Context] +dll.pixie_context_unref.restype = None + +dll.pixie_context_get_image.argtypes = [Context] +dll.pixie_context_get_image.restype = Image + +dll.pixie_context_set_image.argtypes = [Context, Image] +dll.pixie_context_set_image.restype = None + +dll.pixie_context_get_fill_style.argtypes = [Context] +dll.pixie_context_get_fill_style.restype = Paint + +dll.pixie_context_set_fill_style.argtypes = [Context, Paint] +dll.pixie_context_set_fill_style.restype = None + +dll.pixie_context_get_stroke_style.argtypes = [Context] +dll.pixie_context_get_stroke_style.restype = Paint + +dll.pixie_context_set_stroke_style.argtypes = [Context, Paint] +dll.pixie_context_set_stroke_style.restype = None + +dll.pixie_context_get_global_alpha.argtypes = [Context] +dll.pixie_context_get_global_alpha.restype = c_float + +dll.pixie_context_set_global_alpha.argtypes = [Context, c_float] +dll.pixie_context_set_global_alpha.restype = None + +dll.pixie_context_get_line_width.argtypes = [Context] +dll.pixie_context_get_line_width.restype = c_float + +dll.pixie_context_set_line_width.argtypes = [Context, c_float] +dll.pixie_context_set_line_width.restype = None + +dll.pixie_context_get_miter_limit.argtypes = [Context] +dll.pixie_context_get_miter_limit.restype = c_float + +dll.pixie_context_set_miter_limit.argtypes = [Context, c_float] +dll.pixie_context_set_miter_limit.restype = None + +dll.pixie_context_get_line_cap.argtypes = [Context] +dll.pixie_context_get_line_cap.restype = LineCap + +dll.pixie_context_set_line_cap.argtypes = [Context, LineCap] +dll.pixie_context_set_line_cap.restype = None + +dll.pixie_context_get_line_join.argtypes = [Context] +dll.pixie_context_get_line_join.restype = LineJoin + +dll.pixie_context_set_line_join.argtypes = [Context, LineJoin] +dll.pixie_context_set_line_join.restype = None + +dll.pixie_context_get_font.argtypes = [Context] +dll.pixie_context_get_font.restype = c_char_p + +dll.pixie_context_set_font.argtypes = [Context, c_char_p] +dll.pixie_context_set_font.restype = None + +dll.pixie_context_get_font_size.argtypes = [Context] +dll.pixie_context_get_font_size.restype = c_float + +dll.pixie_context_set_font_size.argtypes = [Context, c_float] +dll.pixie_context_set_font_size.restype = None + +dll.pixie_context_get_text_align.argtypes = [Context] +dll.pixie_context_get_text_align.restype = HorizontalAlignment + +dll.pixie_context_set_text_align.argtypes = [Context, HorizontalAlignment] +dll.pixie_context_set_text_align.restype = None + +dll.pixie_context_save.argtypes = [Context] +dll.pixie_context_save.restype = None + +dll.pixie_context_save_layer.argtypes = [Context] +dll.pixie_context_save_layer.restype = None + +dll.pixie_context_restore.argtypes = [Context] +dll.pixie_context_restore.restype = None + +dll.pixie_context_begin_path.argtypes = [Context] +dll.pixie_context_begin_path.restype = None + +dll.pixie_context_close_path.argtypes = [Context] +dll.pixie_context_close_path.restype = None + +dll.pixie_context_path_fill.argtypes = [Context, Path, WindingRule] +dll.pixie_context_path_fill.restype = None + +dll.pixie_context_winding_rule_fill.argtypes = [Context, WindingRule] +dll.pixie_context_winding_rule_fill.restype = None + +dll.pixie_context_path_clip.argtypes = [Context, Path, WindingRule] +dll.pixie_context_path_clip.restype = None + +dll.pixie_context_winding_rule_clip.argtypes = [Context, WindingRule] +dll.pixie_context_winding_rule_clip.restype = None + +dll.pixie_context_path_stroke.argtypes = [Context, Path] +dll.pixie_context_path_stroke.restype = None + +dll.pixie_context_stroke.argtypes = [Context] +dll.pixie_context_stroke.restype = None + +dll.pixie_context_measure_text.argtypes = [Context, c_char_p] +dll.pixie_context_measure_text.restype = TextMetrics + +dll.pixie_context_get_transform.argtypes = [Context] +dll.pixie_context_get_transform.restype = Matrix3 + +dll.pixie_context_set_transform.argtypes = [Context, Matrix3] +dll.pixie_context_set_transform.restype = None + +dll.pixie_context_transform.argtypes = [Context, Matrix3] +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_image2.argtypes = [Context, Image, c_float, c_float, c_float, c_float] +dll.pixie_context_draw_image2.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_move_to.argtypes = [Context, c_float, c_float] +dll.pixie_context_move_to.restype = None + +dll.pixie_context_line_to.argtypes = [Context, c_float, c_float] +dll.pixie_context_line_to.restype = None + +dll.pixie_context_bezier_curve_to.argtypes = [Context, c_float, c_float, c_float, c_float, c_float, c_float] +dll.pixie_context_bezier_curve_to.restype = None + +dll.pixie_context_quadratic_curve_to.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_quadratic_curve_to.restype = None + +dll.pixie_context_arc.argtypes = [Context, c_float, c_float, c_float, c_float, c_float, c_bool] +dll.pixie_context_arc.restype = None + +dll.pixie_context_arc_to.argtypes = [Context, c_float, c_float, c_float, c_float, c_float] +dll.pixie_context_arc_to.restype = None + +dll.pixie_context_rect.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_rect.restype = None + +dll.pixie_context_rounded_rect.argtypes = [Context, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float] +dll.pixie_context_rounded_rect.restype = None + +dll.pixie_context_ellipse.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_ellipse.restype = None + +dll.pixie_context_circle.argtypes = [Context, c_float, c_float, c_float] +dll.pixie_context_circle.restype = None + +dll.pixie_context_polygon.argtypes = [Context, c_float, c_float, c_float, c_longlong] +dll.pixie_context_polygon.restype = None + +dll.pixie_context_clear_rect.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_clear_rect.restype = None + +dll.pixie_context_fill_rect.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_fill_rect.restype = None + +dll.pixie_context_stroke_rect.argtypes = [Context, c_float, c_float, c_float, c_float] +dll.pixie_context_stroke_rect.restype = None + +dll.pixie_context_fill_text.argtypes = [Context, c_char_p, c_float, c_float] +dll.pixie_context_fill_text.restype = None + +dll.pixie_context_stroke_text.argtypes = [Context, c_char_p, c_float, c_float] +dll.pixie_context_stroke_text.restype = None + +dll.pixie_context_translate.argtypes = [Context, c_float, c_float] +dll.pixie_context_translate.restype = None + +dll.pixie_context_scale.argtypes = [Context, c_float, c_float] +dll.pixie_context_scale.restype = None + +dll.pixie_context_rotate.argtypes = [Context, c_float] +dll.pixie_context_rotate.restype = None + +dll.pixie_context_is_point_in_path.argtypes = [Context, c_float, c_float, WindingRule] +dll.pixie_context_is_point_in_path.restype = c_bool + +dll.pixie_context_is_point_in_stroke.argtypes = [Context, c_float, c_float] +dll.pixie_context_is_point_in_stroke.restype = c_bool + +dll.pixie_new_image.argtypes = [c_longlong, c_longlong] +dll.pixie_new_image.restype = Image + +dll.pixie_new_mask.argtypes = [c_longlong, c_longlong] +dll.pixie_new_mask.restype = Mask + +dll.pixie_new_paint.argtypes = [PaintKind] +dll.pixie_new_paint.restype = Paint + +dll.pixie_new_path.argtypes = [] +dll.pixie_new_path.restype = Path + +dll.pixie_new_span.argtypes = [c_char_p, Font] +dll.pixie_new_span.restype = Span + +dll.pixie_new_context.argtypes = [c_longlong, c_longlong] +dll.pixie_new_context.restype = Context + +dll.pixie_read_image.argtypes = [c_char_p] +dll.pixie_read_image.restype = Image + +dll.pixie_read_mask.argtypes = [c_char_p] +dll.pixie_read_mask.restype = Mask + +dll.pixie_read_typeface.argtypes = [c_char_p] +dll.pixie_read_typeface.restype = Typeface + +dll.pixie_read_font.argtypes = [c_char_p] +dll.pixie_read_font.restype = Font + +dll.pixie_parse_path.argtypes = [c_char_p] +dll.pixie_parse_path.restype = Path + +dll.pixie_miter_limit_to_angle.argtypes = [c_float] +dll.pixie_miter_limit_to_angle.restype = c_float + +dll.pixie_angle_to_miter_limit.argtypes = [c_float] +dll.pixie_angle_to_miter_limit.restype = c_float + From 7523c1375824ac44ebc8e49df994ca761e828a39 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 Aug 2021 01:38:41 -0500 Subject: [PATCH 2/7] fixes --- bindings/generated/pixie.py | 932 ++++++++++++++++++------------------ 1 file changed, 466 insertions(+), 466 deletions(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 0b9c1e0..95b3553 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,6 @@ from ctypes import * -dll = cdll.LoadLibrary("bindings/generated/pixie.dll") +dll = cdll.LoadLibrary("pixie.dll") class PixieError(Exception): pass @@ -71,10 +71,10 @@ TC_UPPER = 1 TC_LOWER = 2 TC_TITLE = 3 -class Vector2 (Structure): +class Vector2(Structure): _fields_ = [ ("x", c_float), - ("y", c_float), + ("y", c_float) ] def __init__(self, x, y): @@ -84,7 +84,7 @@ class Vector2 (Structure): def __eq__(self, obj): self.x == obj.x and self.y == obj.y -class Matrix3 (Structure): +class Matrix3(Structure): _fields_ = [ ("a", c_float), ("b", c_float), @@ -94,7 +94,7 @@ class Matrix3 (Structure): ("f", c_float), ("g", c_float), ("h", c_float), - ("i", c_float), + ("i", c_float) ] def __init__(self, a, b, c, d, e, f, g, h, i): @@ -111,12 +111,12 @@ class Matrix3 (Structure): def __eq__(self, obj): self.a == obj.a and self.b == obj.b and self.c == obj.c and self.d == obj.d and self.e == obj.e and self.f == obj.f and self.g == obj.g and self.h == obj.h and self.i == obj.i -class Rect (Structure): +class Rect(Structure): _fields_ = [ ("x", c_float), ("y", c_float), ("w", c_float), - ("h", c_float), + ("h", c_float) ] def __init__(self, x, y, w, h): @@ -128,12 +128,12 @@ class Rect (Structure): def __eq__(self, obj): self.x == obj.x and self.y == obj.y and self.w == obj.w and self.h == obj.h -class Color (Structure): +class Color(Structure): _fields_ = [ ("r", c_float), ("g", c_float), ("b", c_float), - ("a", c_float), + ("a", c_float) ] def __init__(self, r, g, b, a): @@ -145,10 +145,10 @@ class Color (Structure): def __eq__(self, obj): self.r == obj.r and self.g == obj.g and self.b == obj.b and self.a == obj.a -class ColorStop (Structure): +class ColorStop(Structure): _fields_ = [ ("color", Color), - ("position", c_float), + ("position", c_float) ] def __init__(self, color, position): @@ -158,9 +158,9 @@ class ColorStop (Structure): def __eq__(self, obj): self.color == obj.color and self.position == obj.position -class TextMetrics (Structure): +class TextMetrics(Structure): _fields_ = [ - ("width", c_float), + ("width", c_float) ] def __init__(self, width): @@ -169,15 +169,15 @@ class TextMetrics (Structure): def __eq__(self, obj): self.width == obj.width -def pixie_check_error(): +def check_error(): result = dll.pixie_check_error() return result -def pixie_take_error(): +def take_error(): result = dll.pixie_take_error().decode("utf8") return result -class SeqFloat32 (Structure): +class SeqFloat32(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -190,24 +190,24 @@ class SeqFloat32 (Structure): dll.pixie_seq_float32_unref(self) def __len__(self): - dll.pixie_seq_float32_len(self) + dll.seq_float32_len(self) def __getitem__(self, index): - dll.pixie_seq_float32_get(self, index) + dll.seq_float32_get(self, index) def __setitem__(self, index, value): - dll.pixie_seq_float32_set(self, index, value) + dll.seq_float32_set(self, index, value) def __delitem__(self, index): - dll.pixie_seq_float32_remove(self, index) + dll.seq_float32_remove(self, index) def append(self, value): - dll.pixie_seq_float32_add(self, value) + dll.seq_float32_add(self, value) def clear(self): - dll.pixie_seq_float32_clear(self) + dll.seq_float32_clear(self) -class SeqSpan (Structure): +class SeqSpan(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -220,32 +220,32 @@ class SeqSpan (Structure): dll.pixie_seq_span_unref(self) def __len__(self): - dll.pixie_seq_span_len(self) + dll.seq_span_len(self) def __getitem__(self, index): - dll.pixie_seq_span_get(self, index) + dll.seq_span_get(self, index) def __setitem__(self, index, value): - dll.pixie_seq_span_set(self, index, value) + dll.seq_span_set(self, index, value) def __delitem__(self, index): - dll.pixie_seq_span_remove(self, index) + dll.seq_span_remove(self, index) def append(self, value): - dll.pixie_seq_span_add(self, value) + dll.seq_span_add(self, value) def clear(self): - dll.pixie_seq_span_clear(self) + dll.seq_span_clear(self) - def typeset(self, bounds, hAlign, vAlign, wrap): - result = dll.pixie_seq_span_typeset(self, bounds, hAlign, vAlign, wrap) + def typeset(self, bounds, h_align, v_align, wrap): + result = dll.pixie_seq_span_typeset(self, bounds, h_align, v_align, wrap) return result def compute_bounds(self): result = dll.pixie_seq_span_compute_bounds(self) return result -class Image (Structure): +class Image(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -259,24 +259,24 @@ class Image (Structure): @property def width(self): - dll.pixie_image_get_width(self) + dll.image_get_width(self) @width.setter def width(self, width): - dll.pixie_image_set_width(self, width) + dll.image_set_width(self, width) @property def height(self): - dll.pixie_image_get_height(self) + dll.image_get_height(self) @height.setter def height(self, height): - dll.pixie_image_set_height(self, height) + dll.image_set_height(self, height) - def write_file(self, filePath): - dll.pixie_image_write_file(self, filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def write_file(self, file_path): + dll.pixie_image_write_file(self, file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) def wh(self): result = dll.pixie_image_wh(self) @@ -284,8 +284,8 @@ class Image (Structure): def copy(self): result = dll.pixie_image_copy(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def get_color(self, x, y): @@ -306,20 +306,20 @@ class Image (Structure): def sub_image(self, x, y, w, h): result = dll.pixie_image_sub_image(self, x, y, w, h) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def minify_by2(self, power): result = dll.pixie_image_minify_by2(self, power) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def magnify_by2(self, power): result = dll.pixie_image_magnify_by2(self, power) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def apply_opacity(self, opacity): @@ -328,85 +328,85 @@ class Image (Structure): def invert(self): dll.pixie_image_invert(self) - def blur(self, radius, outOfBounds): - dll.pixie_image_blur(self, radius, outOfBounds) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def blur(self, radius, out_of_bounds): + dll.pixie_image_blur(self, radius, out_of_bounds) + if check_error(): + raise PixieError(take_error()) def new_mask(self): result = dll.pixie_image_new_mask(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def resize(self, width, height): result = dll.pixie_image_resize(self, width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def shadow(self, offset, spread, blur, color): result = dll.pixie_image_shadow(self, offset, spread, blur, color) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def super_image(self, x, y, w, h): result = dll.pixie_image_super_image(self, x, y, w, h) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result - def draw(self, mask, transform, blendMode): - dll.pixie_image_mask_draw(self, mask, transform, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def mask_draw(self, mask, transform, blend_mode): + dll.pixie_image_mask_draw(self, mask, transform, blend_mode) + if check_error(): + raise PixieError(take_error()) - def draw(self, b, transform, blendMode): - dll.pixie_image_image_draw(self, b, transform, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def image_draw(self, b, transform, blend_mode): + dll.pixie_image_image_draw(self, b, transform, blend_mode) + if check_error(): + raise PixieError(take_error()) def fill_gradient(self, paint): dll.pixie_image_fill_gradient(self, paint) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) - def fill_text(self, arrangement, transform): + def arrangement_fill_text(self, arrangement, transform): dll.pixie_image_arrangement_fill_text(self, arrangement, transform) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) - def fill_text(self, font, text, transform, bounds, hAlign, vAlign): - dll.pixie_image_font_fill_text(self, font, text.encode("utf8"), transform, bounds, hAlign, vAlign) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def font_fill_text(self, font, text, transform, bounds, h_align, v_align): + dll.pixie_image_font_fill_text(self, font, text.encode("utf8"), transform, bounds, h_align, v_align) + if check_error(): + raise PixieError(take_error()) - def stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): - dll.pixie_image_arrangement_stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def arrangement_stroke_text(self, arrangement, transform, stroke_width, line_cap, line_join, miter_limit, dashes): + dll.pixie_image_arrangement_stroke_text(self, arrangement, transform, stroke_width, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) - def stroke_text(self, font, text, transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes): - dll.pixie_image_font_stroke_text(self, font, text.encode("utf8"), transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def font_stroke_text(self, font, text, transform, stroke_width, bounds, h_align, v_align, line_cap, line_join, miter_limit, dashes): + dll.pixie_image_font_stroke_text(self, font, text.encode("utf8"), transform, stroke_width, bounds, h_align, v_align, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) - def fill_path(self, path, paint, transform, windingRule): - dll.pixie_image_fill_path(self, path, paint, transform, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def fill_path(self, path, paint, transform, winding_rule): + dll.pixie_image_fill_path(self, path, paint, transform, winding_rule) + if check_error(): + raise PixieError(take_error()) - def stroke_path(self, path, paint, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): - dll.pixie_image_stroke_path(self, path, paint, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def stroke_path(self, path, paint, transform, stroke_width, line_cap, line_join, miter_limit, dashes): + dll.pixie_image_stroke_path(self, path, paint, transform, stroke_width, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) def new_context(self): result = dll.pixie_image_new_context(self) return result -class Mask (Structure): +class Mask(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -420,24 +420,24 @@ class Mask (Structure): @property def width(self): - dll.pixie_mask_get_width(self) + dll.mask_get_width(self) @width.setter def width(self, width): - dll.pixie_mask_set_width(self, width) + dll.mask_set_width(self, width) @property def height(self): - dll.pixie_mask_get_height(self) + dll.mask_get_height(self) @height.setter def height(self, height): - dll.pixie_mask_set_height(self, height) + dll.mask_set_height(self, height) - def write_file(self, filePath): - dll.pixie_mask_write_file(self, filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def write_file(self, file_path): + dll.pixie_mask_write_file(self, file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) def wh(self): result = dll.pixie_mask_wh(self) @@ -445,8 +445,8 @@ class Mask (Structure): def copy(self): result = dll.pixie_mask_copy(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def get_value(self, x, y): @@ -461,22 +461,22 @@ class Mask (Structure): def minify_by2(self, power): result = dll.pixie_mask_minify_by2(self, power) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def spread(self, spread): dll.pixie_mask_spread(self, spread) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def ceil(self): dll.pixie_mask_ceil(self) def new_image(self): result = dll.pixie_mask_new_image(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def apply_opacity(self, opacity): @@ -485,52 +485,52 @@ class Mask (Structure): def invert(self): dll.pixie_mask_invert(self) - def blur(self, radius, outOfBounds): - dll.pixie_mask_blur(self, radius, outOfBounds) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def blur(self, radius, out_of_bounds): + dll.pixie_mask_blur(self, radius, out_of_bounds) + if check_error(): + raise PixieError(take_error()) - def draw(self, b, transform, blendMode): - dll.pixie_mask_mask_draw(self, b, transform, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def mask_draw(self, b, transform, blend_mode): + dll.pixie_mask_mask_draw(self, b, transform, blend_mode) + if check_error(): + raise PixieError(take_error()) - def draw(self, image, transform, blendMode): - dll.pixie_mask_image_draw(self, image, transform, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def image_draw(self, image, transform, blend_mode): + dll.pixie_mask_image_draw(self, image, transform, blend_mode) + if check_error(): + raise PixieError(take_error()) - def fill_text(self, arrangement, transform): + def arrangement_fill_text(self, arrangement, transform): dll.pixie_mask_arrangement_fill_text(self, arrangement, transform) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) - def fill_text(self, font, text, transform, bounds, hAlign, vAlign): - dll.pixie_mask_font_fill_text(self, font, text.encode("utf8"), transform, bounds, hAlign, vAlign) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def font_fill_text(self, font, text, transform, bounds, h_align, v_align): + dll.pixie_mask_font_fill_text(self, font, text.encode("utf8"), transform, bounds, h_align, v_align) + if check_error(): + raise PixieError(take_error()) - def stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): - dll.pixie_mask_arrangement_stroke_text(self, arrangement, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def arrangement_stroke_text(self, arrangement, transform, stroke_width, line_cap, line_join, miter_limit, dashes): + dll.pixie_mask_arrangement_stroke_text(self, arrangement, transform, stroke_width, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) - def stroke_text(self, font, text, transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes): - dll.pixie_mask_font_stroke_text(self, font, text.encode("utf8"), transform, strokeWidth, bounds, hAlign, vAlign, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def font_stroke_text(self, font, text, transform, stroke_width, bounds, h_align, v_align, line_cap, line_join, miter_limit, dashes): + dll.pixie_mask_font_stroke_text(self, font, text.encode("utf8"), transform, stroke_width, bounds, h_align, v_align, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) - def fill_path(self, path, transform, windingRule, blendMode): - dll.pixie_mask_fill_path(self, path, transform, windingRule, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def fill_path(self, path, transform, winding_rule, blend_mode): + dll.pixie_mask_fill_path(self, path, transform, winding_rule, blend_mode) + if check_error(): + raise PixieError(take_error()) - def stroke_path(self, path, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes, blendMode): - dll.pixie_mask_stroke_path(self, path, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes, blendMode) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def stroke_path(self, path, transform, stroke_width, line_cap, line_join, miter_limit, dashes, blend_mode): + dll.pixie_mask_stroke_path(self, path, transform, stroke_width, line_cap, line_join, miter_limit, dashes, blend_mode) + if check_error(): + raise PixieError(take_error()) -class Paint (Structure): +class Paint(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -544,57 +544,57 @@ class Paint (Structure): @property def kind(self): - dll.pixie_paint_get_kind(self) + dll.paint_get_kind(self) @kind.setter def kind(self, kind): - dll.pixie_paint_set_kind(self, kind) + dll.paint_set_kind(self, kind) @property def blend_mode(self): - dll.pixie_paint_get_blend_mode(self) + dll.paint_get_blend_mode(self) @blend_mode.setter def blend_mode(self, blend_mode): - dll.pixie_paint_set_blend_mode(self, blend_mode) + dll.paint_set_blend_mode(self, blend_mode) @property def opacity(self): - dll.pixie_paint_get_opacity(self) + dll.paint_get_opacity(self) @opacity.setter def opacity(self, opacity): - dll.pixie_paint_set_opacity(self, opacity) + dll.paint_set_opacity(self, opacity) @property def color(self): - dll.pixie_paint_get_color(self) + dll.paint_get_color(self) @color.setter def color(self, color): - dll.pixie_paint_set_color(self, color) + dll.paint_set_color(self, color) @property def image(self): - dll.pixie_paint_get_image(self) + dll.paint_get_image(self) @image.setter def image(self, image): - dll.pixie_paint_set_image(self, image) + dll.paint_set_image(self, image) @property def image_mat(self): - dll.pixie_paint_get_image_mat(self) + dll.paint_get_image_mat(self) @image_mat.setter def image_mat(self, image_mat): - dll.pixie_paint_set_image_mat(self, image_mat) + dll.paint_set_image_mat(self, image_mat) def new_paint(self): result = dll.pixie_paint_new_paint(self) return result -class Path (Structure): +class Path(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -617,20 +617,20 @@ class Path (Structure): def compute_bounds(self, transform): result = dll.pixie_path_compute_bounds(self, transform) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result - def fill_overlaps(self, test, transform, windingRule): - result = dll.pixie_path_fill_overlaps(self, test, transform, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def fill_overlaps(self, test, transform, winding_rule): + result = dll.pixie_path_fill_overlaps(self, test, transform, winding_rule) + if check_error(): + raise PixieError(take_error()) return result - def stroke_overlaps(self, test, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes): - result = dll.pixie_path_stroke_overlaps(self, test, transform, strokeWidth, lineCap, lineJoin, miterLimit, dashes) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def stroke_overlaps(self, test, transform, stroke_width, line_cap, line_join, miter_limit, dashes): + result = dll.pixie_path_stroke_overlaps(self, test, transform, stroke_width, line_cap, line_join, miter_limit, dashes) + if check_error(): + raise PixieError(take_error()) return result def move_to(self, x, y): @@ -645,18 +645,18 @@ class Path (Structure): def quadratic_curve_to(self, x1, y1, x2, y2): dll.pixie_path_quadratic_curve_to(self, x1, y1, x2, y2) - def elliptical_arc_to(self, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y): - dll.pixie_path_elliptical_arc_to(self, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) + 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) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + 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) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def rect(self, x, y, w, h, clockwise): dll.pixie_path_rect(self, x, y, w, h, clockwise) @@ -673,7 +673,7 @@ class Path (Structure): def polygon(self, x, y, size, sides): dll.pixie_path_polygon(self, x, y, size, sides) -class Typeface (Structure): +class Typeface(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -687,11 +687,11 @@ class Typeface (Structure): @property def file_path(self): - dll.pixie_typeface_get_file_path(self).decode("utf8") + dll.typeface_get_file_path(self).decode("utf8") @file_path.setter def file_path(self, file_path): - dll.pixie_typeface_set_file_path(self, file_path.encode("utf8")) + dll.typeface_set_file_path(self, file_path.encode("utf8")) def ascent(self): result = dll.pixie_typeface_ascent(self) @@ -711,8 +711,8 @@ class Typeface (Structure): def get_glyph_path(self, rune): result = dll.pixie_typeface_get_glyph_path(self, rune) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def get_advance(self, rune): @@ -727,7 +727,7 @@ class Typeface (Structure): result = dll.pixie_typeface_new_font(self) return result -class Font (Structure): +class Font(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -741,59 +741,59 @@ class Font (Structure): @property def typeface(self): - dll.pixie_font_get_typeface(self) + dll.font_get_typeface(self) @typeface.setter def typeface(self, typeface): - dll.pixie_font_set_typeface(self, typeface) + dll.font_set_typeface(self, typeface) @property def size(self): - dll.pixie_font_get_size(self) + dll.font_get_size(self) @size.setter def size(self, size): - dll.pixie_font_set_size(self, size) + dll.font_set_size(self, size) @property def line_height(self): - dll.pixie_font_get_line_height(self) + dll.font_get_line_height(self) @line_height.setter def line_height(self, line_height): - dll.pixie_font_set_line_height(self, line_height) + dll.font_set_line_height(self, line_height) @property def text_case(self): - dll.pixie_font_get_text_case(self) + dll.font_get_text_case(self) @text_case.setter def text_case(self, text_case): - dll.pixie_font_set_text_case(self, text_case) + dll.font_set_text_case(self, text_case) @property def underline(self): - dll.pixie_font_get_underline(self) + dll.font_get_underline(self) @underline.setter def underline(self, underline): - dll.pixie_font_set_underline(self, underline) + dll.font_set_underline(self, underline) @property def strikethrough(self): - dll.pixie_font_get_strikethrough(self) + dll.font_get_strikethrough(self) @strikethrough.setter def strikethrough(self, strikethrough): - dll.pixie_font_set_strikethrough(self, strikethrough) + dll.font_set_strikethrough(self, strikethrough) @property def no_kerning_adjustments(self): - dll.pixie_font_get_no_kerning_adjustments(self) + dll.font_get_no_kerning_adjustments(self) @no_kerning_adjustments.setter def no_kerning_adjustments(self, no_kerning_adjustments): - dll.pixie_font_set_no_kerning_adjustments(self, no_kerning_adjustments) + dll.font_set_no_kerning_adjustments(self, no_kerning_adjustments) def scale(self): result = dll.pixie_font_scale(self) @@ -803,15 +803,15 @@ class Font (Structure): result = dll.pixie_font_default_line_height(self) return result - def typeset(self, text, bounds, hAlign, vAlign, wrap): - result = dll.pixie_font_typeset(self, text.encode("utf8"), bounds, hAlign, vAlign, wrap) + def typeset(self, text, bounds, h_align, v_align, wrap): + result = dll.pixie_font_typeset(self, text.encode("utf8"), bounds, h_align, v_align, wrap) return result def compute_bounds(self, text): result = dll.pixie_font_compute_bounds(self, text.encode("utf8")) return result -class Span (Structure): +class Span(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -825,21 +825,21 @@ class Span (Structure): @property def text(self): - dll.pixie_span_get_text(self).decode("utf8") + dll.span_get_text(self).decode("utf8") @text.setter def text(self, text): - dll.pixie_span_set_text(self, text.encode("utf8")) + dll.span_set_text(self, text.encode("utf8")) @property def font(self): - dll.pixie_span_get_font(self) + dll.span_get_font(self) @font.setter def font(self, font): - dll.pixie_span_set_font(self, font) + dll.span_set_font(self, font) -class Arrangement (Structure): +class Arrangement(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -855,7 +855,7 @@ class Arrangement (Structure): result = dll.pixie_arrangement_compute_bounds(self) return result -class Context (Structure): +class Context(Structure): _fields_ = [("ref", c_ulonglong)] def __bool__(self): @@ -869,106 +869,106 @@ class Context (Structure): @property def image(self): - dll.pixie_context_get_image(self) + dll.context_get_image(self) @image.setter def image(self, image): - dll.pixie_context_set_image(self, image) + dll.context_set_image(self, image) @property def fill_style(self): - dll.pixie_context_get_fill_style(self) + dll.context_get_fill_style(self) @fill_style.setter def fill_style(self, fill_style): - dll.pixie_context_set_fill_style(self, fill_style) + dll.context_set_fill_style(self, fill_style) @property def stroke_style(self): - dll.pixie_context_get_stroke_style(self) + dll.context_get_stroke_style(self) @stroke_style.setter def stroke_style(self, stroke_style): - dll.pixie_context_set_stroke_style(self, stroke_style) + dll.context_set_stroke_style(self, stroke_style) @property def global_alpha(self): - dll.pixie_context_get_global_alpha(self) + dll.context_get_global_alpha(self) @global_alpha.setter def global_alpha(self, global_alpha): - dll.pixie_context_set_global_alpha(self, global_alpha) + dll.context_set_global_alpha(self, global_alpha) @property def line_width(self): - dll.pixie_context_get_line_width(self) + dll.context_get_line_width(self) @line_width.setter def line_width(self, line_width): - dll.pixie_context_set_line_width(self, line_width) + dll.context_set_line_width(self, line_width) @property def miter_limit(self): - dll.pixie_context_get_miter_limit(self) + dll.context_get_miter_limit(self) @miter_limit.setter def miter_limit(self, miter_limit): - dll.pixie_context_set_miter_limit(self, miter_limit) + dll.context_set_miter_limit(self, miter_limit) @property def line_cap(self): - dll.pixie_context_get_line_cap(self) + dll.context_get_line_cap(self) @line_cap.setter def line_cap(self, line_cap): - dll.pixie_context_set_line_cap(self, line_cap) + dll.context_set_line_cap(self, line_cap) @property def line_join(self): - dll.pixie_context_get_line_join(self) + dll.context_get_line_join(self) @line_join.setter def line_join(self, line_join): - dll.pixie_context_set_line_join(self, line_join) + dll.context_set_line_join(self, line_join) @property def font(self): - dll.pixie_context_get_font(self).decode("utf8") + dll.context_get_font(self).decode("utf8") @font.setter def font(self, font): - dll.pixie_context_set_font(self, font.encode("utf8")) + dll.context_set_font(self, font.encode("utf8")) @property def font_size(self): - dll.pixie_context_get_font_size(self) + dll.context_get_font_size(self) @font_size.setter def font_size(self, font_size): - dll.pixie_context_set_font_size(self, font_size) + dll.context_set_font_size(self, font_size) @property def text_align(self): - dll.pixie_context_get_text_align(self) + dll.context_get_text_align(self) @text_align.setter def text_align(self, text_align): - dll.pixie_context_set_text_align(self, text_align) + dll.context_set_text_align(self, text_align) def save(self): dll.pixie_context_save(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def save_layer(self): dll.pixie_context_save_layer(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def restore(self): dll.pixie_context_restore(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def begin_path(self): dll.pixie_context_begin_path(self) @@ -976,40 +976,40 @@ class Context (Structure): def close_path(self): dll.pixie_context_close_path(self) - def fill(self, path, windingRule): - dll.pixie_context_path_fill(self, path, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def path_fill(self, path, winding_rule): + dll.pixie_context_path_fill(self, path, winding_rule) + if check_error(): + raise PixieError(take_error()) - def fill(self, windingRule): - dll.pixie_context_winding_rule_fill(self, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def fill(self, winding_rule): + dll.pixie_context_winding_rule_fill(self, winding_rule) + if check_error(): + raise PixieError(take_error()) - def clip(self, path, windingRule): - dll.pixie_context_path_clip(self, path, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def path_clip(self, path, winding_rule): + dll.pixie_context_path_clip(self, path, winding_rule) + if check_error(): + raise PixieError(take_error()) - def clip(self, windingRule): - dll.pixie_context_winding_rule_clip(self, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def clip(self, winding_rule): + dll.pixie_context_winding_rule_clip(self, winding_rule) + if check_error(): + raise PixieError(take_error()) - def stroke(self, path): + def path_stroke(self, path): dll.pixie_context_path_stroke(self, path) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def stroke(self): dll.pixie_context_stroke(self) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def measure_text(self, text): result = dll.pixie_context_measure_text(self, text.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result def get_transform(self): @@ -1027,18 +1027,18 @@ class Context (Structure): def draw_image1(self, image, dx, dy): dll.pixie_context_draw_image1(self, image, dx, dy) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) - def draw_image2(self, image, dx, dy, dWidth, dHeight): - dll.pixie_context_draw_image2(self, image, dx, dy, dWidth, dHeight) - if pixie_check_error(): - raise PixieError(pixie_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) + if check_error(): + raise PixieError(take_error()) - def draw_image3(self, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight): - dll.pixie_context_draw_image3(self, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) - if pixie_check_error(): - raise PixieError(pixie_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) + if check_error(): + raise PixieError(take_error()) def move_to(self, x, y): dll.pixie_context_move_to(self, x, y) @@ -1054,13 +1054,13 @@ class Context (Structure): def arc(self, x, y, r, a0, a1, ccw): dll.pixie_context_arc(self, x, y, r, a0, a1, ccw) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + 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) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def rect(self, x, y, width, height): dll.pixie_context_rect(self, x, y, width, height) @@ -1079,28 +1079,28 @@ class Context (Structure): def clear_rect(self, x, y, width, height): dll.pixie_context_clear_rect(self, x, y, width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def fill_rect(self, x, y, width, height): dll.pixie_context_fill_rect(self, x, y, width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def stroke_rect(self, x, y, width, height): dll.pixie_context_stroke_rect(self, x, y, width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def fill_text(self, text, x, y): dll.pixie_context_fill_text(self, text.encode("utf8"), x, y) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def stroke_text(self, text, x, y): dll.pixie_context_stroke_text(self, text.encode("utf8"), x, y) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) def translate(self, x, y): dll.pixie_context_translate(self, x, y) @@ -1111,83 +1111,83 @@ class Context (Structure): def rotate(self, angle): dll.pixie_context_rotate(self, angle) - def is_point_in_path(self, x, y, windingRule): - result = dll.pixie_context_is_point_in_path(self, x, y, windingRule) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + def is_point_in_path(self, x, y, winding_rule): + result = dll.pixie_context_is_point_in_path(self, x, y, winding_rule) + if check_error(): + raise PixieError(take_error()) return result def is_point_in_stroke(self, x, y): result = dll.pixie_context_is_point_in_stroke(self, x, y) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result -def pixie_new_image(width, height): +def new_image(width, height): result = dll.pixie_new_image(width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result -def pixie_new_mask(width, height): +def new_mask(width, height): result = dll.pixie_new_mask(width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result -def pixie_new_paint(kind): +def new_paint(kind): result = dll.pixie_new_paint(kind) return result -def pixie_new_path(): +def new_path(): result = dll.pixie_new_path() return result -def pixie_new_span(text, font): +def new_span(text, font): result = dll.pixie_new_span(text.encode("utf8"), font) return result -def pixie_new_context(width, height): +def new_context(width, height): result = dll.pixie_new_context(width, height) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result -def pixie_read_image(filePath): - result = dll.pixie_read_image(filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) +def read_image(file_path): + result = dll.pixie_read_image(file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) return result -def pixie_read_mask(filePath): - result = dll.pixie_read_mask(filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) +def read_mask(file_path): + result = dll.pixie_read_mask(file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) return result -def pixie_read_typeface(filePath): - result = dll.pixie_read_typeface(filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) +def read_typeface(file_path): + result = dll.pixie_read_typeface(file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) return result -def pixie_read_font(filePath): - result = dll.pixie_read_font(filePath.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) +def read_font(file_path): + result = dll.pixie_read_font(file_path.encode("utf8")) + if check_error(): + raise PixieError(take_error()) return result -def pixie_parse_path(path): +def parse_path(path): result = dll.pixie_parse_path(path.encode("utf8")) - if pixie_check_error(): - raise PixieError(pixie_take_error()) + if check_error(): + raise PixieError(take_error()) return result -def pixie_miter_limit_to_angle(limit): +def miter_limit_to_angle(limit): result = dll.pixie_miter_limit_to_angle(limit) return result -def pixie_angle_to_miter_limit(angle): +def angle_to_miter_limit(angle): result = dll.pixie_angle_to_miter_limit(angle) return result @@ -1200,44 +1200,44 @@ 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_float32_len.argtypes = [SeqFloat32] -dll.pixie_seq_float32_len.restype = None +dll.seq_float32_len.argtypes = [SeqFloat32] +dll.seq_float32_len.restype = None -dll.pixie_seq_float32_get.argtypes = [SeqFloat32, c_longlong] -dll.pixie_seq_float32_get.restype = SeqFloat32 +dll.seq_float32_get.argtypes = [SeqFloat32, c_longlong] +dll.seq_float32_get.restype = SeqFloat32 -dll.pixie_seq_float32_set.argtypes = [SeqFloat32, c_longlong, c_float] -dll.pixie_seq_float32_set.restype = None +dll.seq_float32_set.argtypes = [SeqFloat32, c_longlong, c_float] +dll.seq_float32_set.restype = None -dll.pixie_seq_float32_remove.argtypes = [SeqFloat32, c_longlong] -dll.pixie_seq_float32_remove.restype = None +dll.seq_float32_remove.argtypes = [SeqFloat32, c_longlong] +dll.seq_float32_remove.restype = None -dll.pixie_seq_float32_add.argtypes = [SeqFloat32, c_float] -dll.pixie_seq_float32_add.restype = None +dll.seq_float32_add.argtypes = [SeqFloat32, c_float] +dll.seq_float32_add.restype = None -dll.pixie_seq_float32_clear.argtypes = [SeqFloat32] -dll.pixie_seq_float32_clear.restype = None +dll.seq_float32_clear.argtypes = [SeqFloat32] +dll.seq_float32_clear.restype = None dll.pixie_seq_span_unref.argtypes = [SeqSpan] dll.pixie_seq_span_unref.restype = None -dll.pixie_seq_span_len.argtypes = [SeqSpan] -dll.pixie_seq_span_len.restype = None +dll.seq_span_len.argtypes = [SeqSpan] +dll.seq_span_len.restype = None -dll.pixie_seq_span_get.argtypes = [SeqSpan, c_longlong] -dll.pixie_seq_span_get.restype = SeqSpan +dll.seq_span_get.argtypes = [SeqSpan, c_longlong] +dll.seq_span_get.restype = SeqSpan -dll.pixie_seq_span_set.argtypes = [SeqSpan, c_longlong, Span] -dll.pixie_seq_span_set.restype = None +dll.seq_span_set.argtypes = [SeqSpan, c_longlong, Span] +dll.seq_span_set.restype = None -dll.pixie_seq_span_remove.argtypes = [SeqSpan, c_longlong] -dll.pixie_seq_span_remove.restype = None +dll.seq_span_remove.argtypes = [SeqSpan, c_longlong] +dll.seq_span_remove.restype = None -dll.pixie_seq_span_add.argtypes = [SeqSpan, Span] -dll.pixie_seq_span_add.restype = None +dll.seq_span_add.argtypes = [SeqSpan, Span] +dll.seq_span_add.restype = None -dll.pixie_seq_span_clear.argtypes = [SeqSpan] -dll.pixie_seq_span_clear.restype = None +dll.seq_span_clear.argtypes = [SeqSpan] +dll.seq_span_clear.restype = None dll.pixie_seq_span_typeset.argtypes = [SeqSpan, Vector2, HorizontalAlignment, VerticalAlignment, c_bool] dll.pixie_seq_span_typeset.restype = Arrangement @@ -1248,17 +1248,17 @@ dll.pixie_seq_span_compute_bounds.restype = Vector2 dll.pixie_image_unref.argtypes = [Image] dll.pixie_image_unref.restype = None -dll.pixie_image_get_width.argtypes = [Image] -dll.pixie_image_get_width.restype = c_longlong +dll.image_get_width.argtypes = [Image] +dll.image_get_width.restype = c_longlong -dll.pixie_image_set_width.argtypes = [Image, c_longlong] -dll.pixie_image_set_width.restype = None +dll.image_set_width.argtypes = [Image, c_longlong] +dll.image_set_width.restype = None -dll.pixie_image_get_height.argtypes = [Image] -dll.pixie_image_get_height.restype = c_longlong +dll.image_get_height.argtypes = [Image] +dll.image_get_height.restype = c_longlong -dll.pixie_image_set_height.argtypes = [Image, c_longlong] -dll.pixie_image_set_height.restype = None +dll.image_set_height.argtypes = [Image, c_longlong] +dll.image_set_height.restype = None dll.pixie_image_write_file.argtypes = [Image, c_char_p] dll.pixie_image_write_file.restype = None @@ -1347,17 +1347,17 @@ dll.pixie_image_new_context.restype = Context dll.pixie_mask_unref.argtypes = [Mask] dll.pixie_mask_unref.restype = None -dll.pixie_mask_get_width.argtypes = [Mask] -dll.pixie_mask_get_width.restype = c_longlong +dll.mask_get_width.argtypes = [Mask] +dll.mask_get_width.restype = c_longlong -dll.pixie_mask_set_width.argtypes = [Mask, c_longlong] -dll.pixie_mask_set_width.restype = None +dll.mask_set_width.argtypes = [Mask, c_longlong] +dll.mask_set_width.restype = None -dll.pixie_mask_get_height.argtypes = [Mask] -dll.pixie_mask_get_height.restype = c_longlong +dll.mask_get_height.argtypes = [Mask] +dll.mask_get_height.restype = c_longlong -dll.pixie_mask_set_height.argtypes = [Mask, c_longlong] -dll.pixie_mask_set_height.restype = None +dll.mask_set_height.argtypes = [Mask, c_longlong] +dll.mask_set_height.restype = None dll.pixie_mask_write_file.argtypes = [Mask, c_char_p] dll.pixie_mask_write_file.restype = None @@ -1425,41 +1425,41 @@ dll.pixie_mask_stroke_path.restype = None dll.pixie_paint_unref.argtypes = [Paint] dll.pixie_paint_unref.restype = None -dll.pixie_paint_get_kind.argtypes = [Paint] -dll.pixie_paint_get_kind.restype = PaintKind +dll.paint_get_kind.argtypes = [Paint] +dll.paint_get_kind.restype = PaintKind -dll.pixie_paint_set_kind.argtypes = [Paint, PaintKind] -dll.pixie_paint_set_kind.restype = None +dll.paint_set_kind.argtypes = [Paint, PaintKind] +dll.paint_set_kind.restype = None -dll.pixie_paint_get_blend_mode.argtypes = [Paint] -dll.pixie_paint_get_blend_mode.restype = BlendMode +dll.paint_get_blend_mode.argtypes = [Paint] +dll.paint_get_blend_mode.restype = BlendMode -dll.pixie_paint_set_blend_mode.argtypes = [Paint, BlendMode] -dll.pixie_paint_set_blend_mode.restype = None +dll.paint_set_blend_mode.argtypes = [Paint, BlendMode] +dll.paint_set_blend_mode.restype = None -dll.pixie_paint_get_opacity.argtypes = [Paint] -dll.pixie_paint_get_opacity.restype = c_float +dll.paint_get_opacity.argtypes = [Paint] +dll.paint_get_opacity.restype = c_float -dll.pixie_paint_set_opacity.argtypes = [Paint, c_float] -dll.pixie_paint_set_opacity.restype = None +dll.paint_set_opacity.argtypes = [Paint, c_float] +dll.paint_set_opacity.restype = None -dll.pixie_paint_get_color.argtypes = [Paint] -dll.pixie_paint_get_color.restype = Color +dll.paint_get_color.argtypes = [Paint] +dll.paint_get_color.restype = Color -dll.pixie_paint_set_color.argtypes = [Paint, Color] -dll.pixie_paint_set_color.restype = None +dll.paint_set_color.argtypes = [Paint, Color] +dll.paint_set_color.restype = None -dll.pixie_paint_get_image.argtypes = [Paint] -dll.pixie_paint_get_image.restype = Image +dll.paint_get_image.argtypes = [Paint] +dll.paint_get_image.restype = Image -dll.pixie_paint_set_image.argtypes = [Paint, Image] -dll.pixie_paint_set_image.restype = None +dll.paint_set_image.argtypes = [Paint, Image] +dll.paint_set_image.restype = None -dll.pixie_paint_get_image_mat.argtypes = [Paint] -dll.pixie_paint_get_image_mat.restype = Matrix3 +dll.paint_get_image_mat.argtypes = [Paint] +dll.paint_get_image_mat.restype = Matrix3 -dll.pixie_paint_set_image_mat.argtypes = [Paint, Matrix3] -dll.pixie_paint_set_image_mat.restype = None +dll.paint_set_image_mat.argtypes = [Paint, Matrix3] +dll.paint_set_image_mat.restype = None dll.pixie_paint_new_paint.argtypes = [Paint] dll.pixie_paint_new_paint.restype = Paint @@ -1524,11 +1524,11 @@ dll.pixie_path_polygon.restype = None dll.pixie_typeface_unref.argtypes = [Typeface] dll.pixie_typeface_unref.restype = None -dll.pixie_typeface_get_file_path.argtypes = [Typeface] -dll.pixie_typeface_get_file_path.restype = c_char_p +dll.typeface_get_file_path.argtypes = [Typeface] +dll.typeface_get_file_path.restype = c_char_p -dll.pixie_typeface_set_file_path.argtypes = [Typeface, c_char_p] -dll.pixie_typeface_set_file_path.restype = None +dll.typeface_set_file_path.argtypes = [Typeface, c_char_p] +dll.typeface_set_file_path.restype = None dll.pixie_typeface_ascent.argtypes = [Typeface] dll.pixie_typeface_ascent.restype = c_float @@ -1557,47 +1557,47 @@ dll.pixie_typeface_new_font.restype = Font dll.pixie_font_unref.argtypes = [Font] dll.pixie_font_unref.restype = None -dll.pixie_font_get_typeface.argtypes = [Font] -dll.pixie_font_get_typeface.restype = Typeface +dll.font_get_typeface.argtypes = [Font] +dll.font_get_typeface.restype = Typeface -dll.pixie_font_set_typeface.argtypes = [Font, Typeface] -dll.pixie_font_set_typeface.restype = None +dll.font_set_typeface.argtypes = [Font, Typeface] +dll.font_set_typeface.restype = None -dll.pixie_font_get_size.argtypes = [Font] -dll.pixie_font_get_size.restype = c_float +dll.font_get_size.argtypes = [Font] +dll.font_get_size.restype = c_float -dll.pixie_font_set_size.argtypes = [Font, c_float] -dll.pixie_font_set_size.restype = None +dll.font_set_size.argtypes = [Font, c_float] +dll.font_set_size.restype = None -dll.pixie_font_get_line_height.argtypes = [Font] -dll.pixie_font_get_line_height.restype = c_float +dll.font_get_line_height.argtypes = [Font] +dll.font_get_line_height.restype = c_float -dll.pixie_font_set_line_height.argtypes = [Font, c_float] -dll.pixie_font_set_line_height.restype = None +dll.font_set_line_height.argtypes = [Font, c_float] +dll.font_set_line_height.restype = None -dll.pixie_font_get_text_case.argtypes = [Font] -dll.pixie_font_get_text_case.restype = TextCase +dll.font_get_text_case.argtypes = [Font] +dll.font_get_text_case.restype = TextCase -dll.pixie_font_set_text_case.argtypes = [Font, TextCase] -dll.pixie_font_set_text_case.restype = None +dll.font_set_text_case.argtypes = [Font, TextCase] +dll.font_set_text_case.restype = None -dll.pixie_font_get_underline.argtypes = [Font] -dll.pixie_font_get_underline.restype = c_bool +dll.font_get_underline.argtypes = [Font] +dll.font_get_underline.restype = c_bool -dll.pixie_font_set_underline.argtypes = [Font, c_bool] -dll.pixie_font_set_underline.restype = None +dll.font_set_underline.argtypes = [Font, c_bool] +dll.font_set_underline.restype = None -dll.pixie_font_get_strikethrough.argtypes = [Font] -dll.pixie_font_get_strikethrough.restype = c_bool +dll.font_get_strikethrough.argtypes = [Font] +dll.font_get_strikethrough.restype = c_bool -dll.pixie_font_set_strikethrough.argtypes = [Font, c_bool] -dll.pixie_font_set_strikethrough.restype = None +dll.font_set_strikethrough.argtypes = [Font, c_bool] +dll.font_set_strikethrough.restype = None -dll.pixie_font_get_no_kerning_adjustments.argtypes = [Font] -dll.pixie_font_get_no_kerning_adjustments.restype = c_bool +dll.font_get_no_kerning_adjustments.argtypes = [Font] +dll.font_get_no_kerning_adjustments.restype = c_bool -dll.pixie_font_set_no_kerning_adjustments.argtypes = [Font, c_bool] -dll.pixie_font_set_no_kerning_adjustments.restype = None +dll.font_set_no_kerning_adjustments.argtypes = [Font, c_bool] +dll.font_set_no_kerning_adjustments.restype = None dll.pixie_font_scale.argtypes = [Font] dll.pixie_font_scale.restype = c_float @@ -1614,17 +1614,17 @@ dll.pixie_font_compute_bounds.restype = Vector2 dll.pixie_span_unref.argtypes = [Span] dll.pixie_span_unref.restype = None -dll.pixie_span_get_text.argtypes = [Span] -dll.pixie_span_get_text.restype = c_char_p +dll.span_get_text.argtypes = [Span] +dll.span_get_text.restype = c_char_p -dll.pixie_span_set_text.argtypes = [Span, c_char_p] -dll.pixie_span_set_text.restype = None +dll.span_set_text.argtypes = [Span, c_char_p] +dll.span_set_text.restype = None -dll.pixie_span_get_font.argtypes = [Span] -dll.pixie_span_get_font.restype = Font +dll.span_get_font.argtypes = [Span] +dll.span_get_font.restype = Font -dll.pixie_span_set_font.argtypes = [Span, Font] -dll.pixie_span_set_font.restype = None +dll.span_set_font.argtypes = [Span, Font] +dll.span_set_font.restype = None dll.pixie_arrangement_unref.argtypes = [Arrangement] dll.pixie_arrangement_unref.restype = None @@ -1635,71 +1635,71 @@ dll.pixie_arrangement_compute_bounds.restype = Vector2 dll.pixie_context_unref.argtypes = [Context] dll.pixie_context_unref.restype = None -dll.pixie_context_get_image.argtypes = [Context] -dll.pixie_context_get_image.restype = Image +dll.context_get_image.argtypes = [Context] +dll.context_get_image.restype = Image -dll.pixie_context_set_image.argtypes = [Context, Image] -dll.pixie_context_set_image.restype = None +dll.context_set_image.argtypes = [Context, Image] +dll.context_set_image.restype = None -dll.pixie_context_get_fill_style.argtypes = [Context] -dll.pixie_context_get_fill_style.restype = Paint +dll.context_get_fill_style.argtypes = [Context] +dll.context_get_fill_style.restype = Paint -dll.pixie_context_set_fill_style.argtypes = [Context, Paint] -dll.pixie_context_set_fill_style.restype = None +dll.context_set_fill_style.argtypes = [Context, Paint] +dll.context_set_fill_style.restype = None -dll.pixie_context_get_stroke_style.argtypes = [Context] -dll.pixie_context_get_stroke_style.restype = Paint +dll.context_get_stroke_style.argtypes = [Context] +dll.context_get_stroke_style.restype = Paint -dll.pixie_context_set_stroke_style.argtypes = [Context, Paint] -dll.pixie_context_set_stroke_style.restype = None +dll.context_set_stroke_style.argtypes = [Context, Paint] +dll.context_set_stroke_style.restype = None -dll.pixie_context_get_global_alpha.argtypes = [Context] -dll.pixie_context_get_global_alpha.restype = c_float +dll.context_get_global_alpha.argtypes = [Context] +dll.context_get_global_alpha.restype = c_float -dll.pixie_context_set_global_alpha.argtypes = [Context, c_float] -dll.pixie_context_set_global_alpha.restype = None +dll.context_set_global_alpha.argtypes = [Context, c_float] +dll.context_set_global_alpha.restype = None -dll.pixie_context_get_line_width.argtypes = [Context] -dll.pixie_context_get_line_width.restype = c_float +dll.context_get_line_width.argtypes = [Context] +dll.context_get_line_width.restype = c_float -dll.pixie_context_set_line_width.argtypes = [Context, c_float] -dll.pixie_context_set_line_width.restype = None +dll.context_set_line_width.argtypes = [Context, c_float] +dll.context_set_line_width.restype = None -dll.pixie_context_get_miter_limit.argtypes = [Context] -dll.pixie_context_get_miter_limit.restype = c_float +dll.context_get_miter_limit.argtypes = [Context] +dll.context_get_miter_limit.restype = c_float -dll.pixie_context_set_miter_limit.argtypes = [Context, c_float] -dll.pixie_context_set_miter_limit.restype = None +dll.context_set_miter_limit.argtypes = [Context, c_float] +dll.context_set_miter_limit.restype = None -dll.pixie_context_get_line_cap.argtypes = [Context] -dll.pixie_context_get_line_cap.restype = LineCap +dll.context_get_line_cap.argtypes = [Context] +dll.context_get_line_cap.restype = LineCap -dll.pixie_context_set_line_cap.argtypes = [Context, LineCap] -dll.pixie_context_set_line_cap.restype = None +dll.context_set_line_cap.argtypes = [Context, LineCap] +dll.context_set_line_cap.restype = None -dll.pixie_context_get_line_join.argtypes = [Context] -dll.pixie_context_get_line_join.restype = LineJoin +dll.context_get_line_join.argtypes = [Context] +dll.context_get_line_join.restype = LineJoin -dll.pixie_context_set_line_join.argtypes = [Context, LineJoin] -dll.pixie_context_set_line_join.restype = None +dll.context_set_line_join.argtypes = [Context, LineJoin] +dll.context_set_line_join.restype = None -dll.pixie_context_get_font.argtypes = [Context] -dll.pixie_context_get_font.restype = c_char_p +dll.context_get_font.argtypes = [Context] +dll.context_get_font.restype = c_char_p -dll.pixie_context_set_font.argtypes = [Context, c_char_p] -dll.pixie_context_set_font.restype = None +dll.context_set_font.argtypes = [Context, c_char_p] +dll.context_set_font.restype = None -dll.pixie_context_get_font_size.argtypes = [Context] -dll.pixie_context_get_font_size.restype = c_float +dll.context_get_font_size.argtypes = [Context] +dll.context_get_font_size.restype = c_float -dll.pixie_context_set_font_size.argtypes = [Context, c_float] -dll.pixie_context_set_font_size.restype = None +dll.context_set_font_size.argtypes = [Context, c_float] +dll.context_set_font_size.restype = None -dll.pixie_context_get_text_align.argtypes = [Context] -dll.pixie_context_get_text_align.restype = HorizontalAlignment +dll.context_get_text_align.argtypes = [Context] +dll.context_get_text_align.restype = HorizontalAlignment -dll.pixie_context_set_text_align.argtypes = [Context, HorizontalAlignment] -dll.pixie_context_set_text_align.restype = None +dll.context_set_text_align.argtypes = [Context, HorizontalAlignment] +dll.context_set_text_align.restype = None dll.pixie_context_save.argtypes = [Context] dll.pixie_context_save.restype = None From 1d7394a3810d215c19f823e5f6d5d338ca132e5c Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 Aug 2021 22:31:12 -0500 Subject: [PATCH 3/7] break on digits --- bindings/generated/internal.nim | 56 +++++++-------- bindings/generated/pixie.nim | 58 ++++++++-------- bindings/generated/pixie.py | 118 ++++++++++++++++---------------- 3 files changed, 116 insertions(+), 116 deletions(-) diff --git a/bindings/generated/internal.nim b/bindings/generated/internal.nim index 70f90db..29920ae 100644 --- a/bindings/generated/internal.nim +++ b/bindings/generated/internal.nim @@ -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 diff --git a/bindings/generated/pixie.nim b/bindings/generated/pixie.nim index d977ac4..af2b8aa 100644 --- a/bindings/generated/pixie.nim +++ b/bindings/generated/pixie.nim @@ -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) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 95b3553..05ca39d 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -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 From 6ee94ae6d60472a4fb7bdfdac6569e0b3ed4c516 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 Aug 2021 22:40:26 -0500 Subject: [PATCH 4/7] f --- bindings/generated/pixie.py | 447 ++++++++++++++++++------------------ 1 file changed, 223 insertions(+), 224 deletions(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 05ca39d..6d2f1c5 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,6 @@ from ctypes import * -dll = cdll.LoadLibrary("pixie.dll") +dll = cdll.LoadLibrary("./pixie.dll") class PixieError(Exception): pass @@ -190,22 +190,22 @@ class SeqFloat32(Structure): dll.pixie_seq_float_32_unref(self) def __len__(self): - dll.seq_float_32_len(self) + dll.pixie_seq_float_32_len(self) def __getitem__(self, index): - dll.seq_float_32_get(self, index) + dll.pixie_seq_float_32_get(self, index) def __setitem__(self, index, value): - dll.seq_float_32_set(self, index, value) + dll.pixie_seq_float_32_set(self, index, value) def __delitem__(self, index): - dll.seq_float_32_remove(self, index) + dll.pixie_seq_float_32_remove(self, index) def append(self, value): - dll.seq_float_32_add(self, value) + dll.pixie_seq_float_32_add(self, value) def clear(self): - dll.seq_float_32_clear(self) + dll.pixie_seq_float_32_clear(self) class SeqSpan(Structure): _fields_ = [("ref", c_ulonglong)] @@ -220,22 +220,22 @@ class SeqSpan(Structure): dll.pixie_seq_span_unref(self) def __len__(self): - dll.seq_span_len(self) + dll.pixie_seq_span_len(self) def __getitem__(self, index): - dll.seq_span_get(self, index) + dll.pixie_seq_span_get(self, index) def __setitem__(self, index, value): - dll.seq_span_set(self, index, value) + dll.pixie_seq_span_set(self, index, value) def __delitem__(self, index): - dll.seq_span_remove(self, index) + dll.pixie_seq_span_remove(self, index) def append(self, value): - dll.seq_span_add(self, value) + dll.pixie_seq_span_add(self, value) def clear(self): - dll.seq_span_clear(self) + dll.pixie_seq_span_clear(self) def typeset(self, bounds, h_align, v_align, wrap): result = dll.pixie_seq_span_typeset(self, bounds, h_align, v_align, wrap) @@ -259,19 +259,19 @@ class Image(Structure): @property def width(self): - dll.image_get_width(self) + dll.pixie_image_get_width(self) @width.setter def width(self, width): - dll.image_set_width(self, width) + dll.pixie_image_set_width(self, width) @property def height(self): - dll.image_get_height(self) + dll.pixie_image_get_height(self) @height.setter def height(self, height): - dll.image_set_height(self, height) + dll.pixie_image_set_height(self, height) def write_file(self, file_path): dll.pixie_image_write_file(self, file_path.encode("utf8")) @@ -420,19 +420,19 @@ class Mask(Structure): @property def width(self): - dll.mask_get_width(self) + dll.pixie_mask_get_width(self) @width.setter def width(self, width): - dll.mask_set_width(self, width) + dll.pixie_mask_set_width(self, width) @property def height(self): - dll.mask_get_height(self) + dll.pixie_mask_get_height(self) @height.setter def height(self, height): - dll.mask_set_height(self, height) + dll.pixie_mask_set_height(self, height) def write_file(self, file_path): dll.pixie_mask_write_file(self, file_path.encode("utf8")) @@ -544,51 +544,51 @@ class Paint(Structure): @property def kind(self): - dll.paint_get_kind(self) + dll.pixie_paint_get_kind(self) @kind.setter def kind(self, kind): - dll.paint_set_kind(self, kind) + dll.pixie_paint_set_kind(self, kind) @property def blend_mode(self): - dll.paint_get_blend_mode(self) + dll.pixie_paint_get_blend_mode(self) @blend_mode.setter def blend_mode(self, blend_mode): - dll.paint_set_blend_mode(self, blend_mode) + dll.pixie_paint_set_blend_mode(self, blend_mode) @property def opacity(self): - dll.paint_get_opacity(self) + dll.pixie_paint_get_opacity(self) @opacity.setter def opacity(self, opacity): - dll.paint_set_opacity(self, opacity) + dll.pixie_paint_set_opacity(self, opacity) @property def color(self): - dll.paint_get_color(self) + dll.pixie_paint_get_color(self) @color.setter def color(self, color): - dll.paint_set_color(self, color) + dll.pixie_paint_set_color(self, color) @property def image(self): - dll.paint_get_image(self) + dll.pixie_paint_get_image(self) @image.setter def image(self, image): - dll.paint_set_image(self, image) + dll.pixie_paint_set_image(self, image) @property def image_mat(self): - dll.paint_get_image_mat(self) + dll.pixie_paint_get_image_mat(self) @image_mat.setter def image_mat(self, image_mat): - dll.paint_set_image_mat(self, image_mat) + dll.pixie_paint_set_image_mat(self, image_mat) def new_paint(self): result = dll.pixie_paint_new_paint(self) @@ -687,11 +687,11 @@ class Typeface(Structure): @property def file_path(self): - dll.typeface_get_file_path(self).decode("utf8") + dll.pixie_typeface_get_file_path(self).decode("utf8") @file_path.setter def file_path(self, file_path): - dll.typeface_set_file_path(self, file_path.encode("utf8")) + dll.pixie_typeface_set_file_path(self, file_path.encode("utf8")) def ascent(self): result = dll.pixie_typeface_ascent(self) @@ -741,59 +741,59 @@ class Font(Structure): @property def typeface(self): - dll.font_get_typeface(self) + dll.pixie_font_get_typeface(self) @typeface.setter def typeface(self, typeface): - dll.font_set_typeface(self, typeface) + dll.pixie_font_set_typeface(self, typeface) @property def size(self): - dll.font_get_size(self) + dll.pixie_font_get_size(self) @size.setter def size(self, size): - dll.font_set_size(self, size) + dll.pixie_font_set_size(self, size) @property def line_height(self): - dll.font_get_line_height(self) + dll.pixie_font_get_line_height(self) @line_height.setter def line_height(self, line_height): - dll.font_set_line_height(self, line_height) + dll.pixie_font_set_line_height(self, line_height) @property def text_case(self): - dll.font_get_text_case(self) + dll.pixie_font_get_text_case(self) @text_case.setter def text_case(self, text_case): - dll.font_set_text_case(self, text_case) + dll.pixie_font_set_text_case(self, text_case) @property def underline(self): - dll.font_get_underline(self) + dll.pixie_font_get_underline(self) @underline.setter def underline(self, underline): - dll.font_set_underline(self, underline) + dll.pixie_font_set_underline(self, underline) @property def strikethrough(self): - dll.font_get_strikethrough(self) + dll.pixie_font_get_strikethrough(self) @strikethrough.setter def strikethrough(self, strikethrough): - dll.font_set_strikethrough(self, strikethrough) + dll.pixie_font_set_strikethrough(self, strikethrough) @property def no_kerning_adjustments(self): - dll.font_get_no_kerning_adjustments(self) + dll.pixie_font_get_no_kerning_adjustments(self) @no_kerning_adjustments.setter def no_kerning_adjustments(self, no_kerning_adjustments): - dll.font_set_no_kerning_adjustments(self, no_kerning_adjustments) + dll.pixie_font_set_no_kerning_adjustments(self, no_kerning_adjustments) def scale(self): result = dll.pixie_font_scale(self) @@ -825,19 +825,19 @@ class Span(Structure): @property def text(self): - dll.span_get_text(self).decode("utf8") + dll.pixie_span_get_text(self).decode("utf8") @text.setter def text(self, text): - dll.span_set_text(self, text.encode("utf8")) + dll.pixie_span_set_text(self, text.encode("utf8")) @property def font(self): - dll.span_get_font(self) + dll.pixie_span_get_font(self) @font.setter def font(self, font): - dll.span_set_font(self, font) + dll.pixie_span_set_font(self, font) class Arrangement(Structure): _fields_ = [("ref", c_ulonglong)] @@ -869,91 +869,91 @@ class Context(Structure): @property def image(self): - dll.context_get_image(self) + dll.pixie_context_get_image(self) @image.setter def image(self, image): - dll.context_set_image(self, image) + dll.pixie_context_set_image(self, image) @property def fill_style(self): - dll.context_get_fill_style(self) + dll.pixie_context_get_fill_style(self) @fill_style.setter def fill_style(self, fill_style): - dll.context_set_fill_style(self, fill_style) + dll.pixie_context_set_fill_style(self, fill_style) @property def stroke_style(self): - dll.context_get_stroke_style(self) + dll.pixie_context_get_stroke_style(self) @stroke_style.setter def stroke_style(self, stroke_style): - dll.context_set_stroke_style(self, stroke_style) + dll.pixie_context_set_stroke_style(self, stroke_style) @property def global_alpha(self): - dll.context_get_global_alpha(self) + dll.pixie_context_get_global_alpha(self) @global_alpha.setter def global_alpha(self, global_alpha): - dll.context_set_global_alpha(self, global_alpha) + dll.pixie_context_set_global_alpha(self, global_alpha) @property def line_width(self): - dll.context_get_line_width(self) + dll.pixie_context_get_line_width(self) @line_width.setter def line_width(self, line_width): - dll.context_set_line_width(self, line_width) + dll.pixie_context_set_line_width(self, line_width) @property def miter_limit(self): - dll.context_get_miter_limit(self) + dll.pixie_context_get_miter_limit(self) @miter_limit.setter def miter_limit(self, miter_limit): - dll.context_set_miter_limit(self, miter_limit) + dll.pixie_context_set_miter_limit(self, miter_limit) @property def line_cap(self): - dll.context_get_line_cap(self) + dll.pixie_context_get_line_cap(self) @line_cap.setter def line_cap(self, line_cap): - dll.context_set_line_cap(self, line_cap) + dll.pixie_context_set_line_cap(self, line_cap) @property def line_join(self): - dll.context_get_line_join(self) + dll.pixie_context_get_line_join(self) @line_join.setter def line_join(self, line_join): - dll.context_set_line_join(self, line_join) + dll.pixie_context_set_line_join(self, line_join) @property def font(self): - dll.context_get_font(self).decode("utf8") + dll.pixie_context_get_font(self).decode("utf8") @font.setter def font(self, font): - dll.context_set_font(self, font.encode("utf8")) + dll.pixie_context_set_font(self, font.encode("utf8")) @property def font_size(self): - dll.context_get_font_size(self) + dll.pixie_context_get_font_size(self) @font_size.setter def font_size(self, font_size): - dll.context_set_font_size(self, font_size) + dll.pixie_context_set_font_size(self, font_size) @property def text_align(self): - dll.context_get_text_align(self) + dll.pixie_context_get_text_align(self) @text_align.setter def text_align(self, text_align): - dll.context_set_text_align(self, text_align) + dll.pixie_context_set_text_align(self, text_align) def save(self): dll.pixie_context_save(self) @@ -1200,44 +1200,44 @@ dll.pixie_take_error.restype = c_char_p dll.pixie_seq_float_32_unref.argtypes = [SeqFloat32] dll.pixie_seq_float_32_unref.restype = None -dll.seq_float_32_len.argtypes = [SeqFloat32] -dll.seq_float_32_len.restype = None +dll.pixie_seq_float_32_len.argtypes = [SeqFloat32] +dll.pixie_seq_float_32_len.restype = None -dll.seq_float_32_get.argtypes = [SeqFloat32, c_longlong] -dll.seq_float_32_get.restype = SeqFloat32 +dll.pixie_seq_float_32_get.argtypes = [SeqFloat32, c_longlong] +dll.pixie_seq_float_32_get.restype = SeqFloat32 -dll.seq_float_32_set.argtypes = [SeqFloat32, c_longlong, c_float] -dll.seq_float_32_set.restype = None +dll.pixie_seq_float_32_set.argtypes = [SeqFloat32, c_longlong, c_float] +dll.pixie_seq_float_32_set.restype = None -dll.seq_float_32_remove.argtypes = [SeqFloat32, c_longlong] -dll.seq_float_32_remove.restype = None +dll.pixie_seq_float_32_remove.argtypes = [SeqFloat32, c_longlong] +dll.pixie_seq_float_32_remove.restype = None -dll.seq_float_32_add.argtypes = [SeqFloat32, c_float] -dll.seq_float_32_add.restype = None +dll.pixie_seq_float_32_add.argtypes = [SeqFloat32, c_float] +dll.pixie_seq_float_32_add.restype = None -dll.seq_float_32_clear.argtypes = [SeqFloat32] -dll.seq_float_32_clear.restype = None +dll.pixie_seq_float_32_clear.argtypes = [SeqFloat32] +dll.pixie_seq_float_32_clear.restype = None dll.pixie_seq_span_unref.argtypes = [SeqSpan] dll.pixie_seq_span_unref.restype = None -dll.seq_span_len.argtypes = [SeqSpan] -dll.seq_span_len.restype = None +dll.pixie_seq_span_len.argtypes = [SeqSpan] +dll.pixie_seq_span_len.restype = None -dll.seq_span_get.argtypes = [SeqSpan, c_longlong] -dll.seq_span_get.restype = SeqSpan +dll.pixie_seq_span_get.argtypes = [SeqSpan, c_longlong] +dll.pixie_seq_span_get.restype = SeqSpan -dll.seq_span_set.argtypes = [SeqSpan, c_longlong, Span] -dll.seq_span_set.restype = None +dll.pixie_seq_span_set.argtypes = [SeqSpan, c_longlong, Span] +dll.pixie_seq_span_set.restype = None -dll.seq_span_remove.argtypes = [SeqSpan, c_longlong] -dll.seq_span_remove.restype = None +dll.pixie_seq_span_remove.argtypes = [SeqSpan, c_longlong] +dll.pixie_seq_span_remove.restype = None -dll.seq_span_add.argtypes = [SeqSpan, Span] -dll.seq_span_add.restype = None +dll.pixie_seq_span_add.argtypes = [SeqSpan, Span] +dll.pixie_seq_span_add.restype = None -dll.seq_span_clear.argtypes = [SeqSpan] -dll.seq_span_clear.restype = None +dll.pixie_seq_span_clear.argtypes = [SeqSpan] +dll.pixie_seq_span_clear.restype = None dll.pixie_seq_span_typeset.argtypes = [SeqSpan, Vector2, HorizontalAlignment, VerticalAlignment, c_bool] dll.pixie_seq_span_typeset.restype = Arrangement @@ -1248,17 +1248,17 @@ dll.pixie_seq_span_compute_bounds.restype = Vector2 dll.pixie_image_unref.argtypes = [Image] dll.pixie_image_unref.restype = None -dll.image_get_width.argtypes = [Image] -dll.image_get_width.restype = c_longlong +dll.pixie_image_get_width.argtypes = [Image] +dll.pixie_image_get_width.restype = c_longlong -dll.image_set_width.argtypes = [Image, c_longlong] -dll.image_set_width.restype = None +dll.pixie_image_set_width.argtypes = [Image, c_longlong] +dll.pixie_image_set_width.restype = None -dll.image_get_height.argtypes = [Image] -dll.image_get_height.restype = c_longlong +dll.pixie_image_get_height.argtypes = [Image] +dll.pixie_image_get_height.restype = c_longlong -dll.image_set_height.argtypes = [Image, c_longlong] -dll.image_set_height.restype = None +dll.pixie_image_set_height.argtypes = [Image, c_longlong] +dll.pixie_image_set_height.restype = None dll.pixie_image_write_file.argtypes = [Image, c_char_p] dll.pixie_image_write_file.restype = None @@ -1347,17 +1347,17 @@ dll.pixie_image_new_context.restype = Context dll.pixie_mask_unref.argtypes = [Mask] dll.pixie_mask_unref.restype = None -dll.mask_get_width.argtypes = [Mask] -dll.mask_get_width.restype = c_longlong +dll.pixie_mask_get_width.argtypes = [Mask] +dll.pixie_mask_get_width.restype = c_longlong -dll.mask_set_width.argtypes = [Mask, c_longlong] -dll.mask_set_width.restype = None +dll.pixie_mask_set_width.argtypes = [Mask, c_longlong] +dll.pixie_mask_set_width.restype = None -dll.mask_get_height.argtypes = [Mask] -dll.mask_get_height.restype = c_longlong +dll.pixie_mask_get_height.argtypes = [Mask] +dll.pixie_mask_get_height.restype = c_longlong -dll.mask_set_height.argtypes = [Mask, c_longlong] -dll.mask_set_height.restype = None +dll.pixie_mask_set_height.argtypes = [Mask, c_longlong] +dll.pixie_mask_set_height.restype = None dll.pixie_mask_write_file.argtypes = [Mask, c_char_p] dll.pixie_mask_write_file.restype = None @@ -1425,41 +1425,41 @@ dll.pixie_mask_stroke_path.restype = None dll.pixie_paint_unref.argtypes = [Paint] dll.pixie_paint_unref.restype = None -dll.paint_get_kind.argtypes = [Paint] -dll.paint_get_kind.restype = PaintKind +dll.pixie_paint_get_kind.argtypes = [Paint] +dll.pixie_paint_get_kind.restype = PaintKind -dll.paint_set_kind.argtypes = [Paint, PaintKind] -dll.paint_set_kind.restype = None +dll.pixie_paint_set_kind.argtypes = [Paint, PaintKind] +dll.pixie_paint_set_kind.restype = None -dll.paint_get_blend_mode.argtypes = [Paint] -dll.paint_get_blend_mode.restype = BlendMode +dll.pixie_paint_get_blend_mode.argtypes = [Paint] +dll.pixie_paint_get_blend_mode.restype = BlendMode -dll.paint_set_blend_mode.argtypes = [Paint, BlendMode] -dll.paint_set_blend_mode.restype = None +dll.pixie_paint_set_blend_mode.argtypes = [Paint, BlendMode] +dll.pixie_paint_set_blend_mode.restype = None -dll.paint_get_opacity.argtypes = [Paint] -dll.paint_get_opacity.restype = c_float +dll.pixie_paint_get_opacity.argtypes = [Paint] +dll.pixie_paint_get_opacity.restype = c_float -dll.paint_set_opacity.argtypes = [Paint, c_float] -dll.paint_set_opacity.restype = None +dll.pixie_paint_set_opacity.argtypes = [Paint, c_float] +dll.pixie_paint_set_opacity.restype = None -dll.paint_get_color.argtypes = [Paint] -dll.paint_get_color.restype = Color +dll.pixie_paint_get_color.argtypes = [Paint] +dll.pixie_paint_get_color.restype = Color -dll.paint_set_color.argtypes = [Paint, Color] -dll.paint_set_color.restype = None +dll.pixie_paint_set_color.argtypes = [Paint, Color] +dll.pixie_paint_set_color.restype = None -dll.paint_get_image.argtypes = [Paint] -dll.paint_get_image.restype = Image +dll.pixie_paint_get_image.argtypes = [Paint] +dll.pixie_paint_get_image.restype = Image -dll.paint_set_image.argtypes = [Paint, Image] -dll.paint_set_image.restype = None +dll.pixie_paint_set_image.argtypes = [Paint, Image] +dll.pixie_paint_set_image.restype = None -dll.paint_get_image_mat.argtypes = [Paint] -dll.paint_get_image_mat.restype = Matrix3 +dll.pixie_paint_get_image_mat.argtypes = [Paint] +dll.pixie_paint_get_image_mat.restype = Matrix3 -dll.paint_set_image_mat.argtypes = [Paint, Matrix3] -dll.paint_set_image_mat.restype = None +dll.pixie_paint_set_image_mat.argtypes = [Paint, Matrix3] +dll.pixie_paint_set_image_mat.restype = None dll.pixie_paint_new_paint.argtypes = [Paint] dll.pixie_paint_new_paint.restype = Paint @@ -1524,11 +1524,11 @@ dll.pixie_path_polygon.restype = None dll.pixie_typeface_unref.argtypes = [Typeface] dll.pixie_typeface_unref.restype = None -dll.typeface_get_file_path.argtypes = [Typeface] -dll.typeface_get_file_path.restype = c_char_p +dll.pixie_typeface_get_file_path.argtypes = [Typeface] +dll.pixie_typeface_get_file_path.restype = c_char_p -dll.typeface_set_file_path.argtypes = [Typeface, c_char_p] -dll.typeface_set_file_path.restype = None +dll.pixie_typeface_set_file_path.argtypes = [Typeface, c_char_p] +dll.pixie_typeface_set_file_path.restype = None dll.pixie_typeface_ascent.argtypes = [Typeface] dll.pixie_typeface_ascent.restype = c_float @@ -1557,47 +1557,47 @@ dll.pixie_typeface_new_font.restype = Font dll.pixie_font_unref.argtypes = [Font] dll.pixie_font_unref.restype = None -dll.font_get_typeface.argtypes = [Font] -dll.font_get_typeface.restype = Typeface +dll.pixie_font_get_typeface.argtypes = [Font] +dll.pixie_font_get_typeface.restype = Typeface -dll.font_set_typeface.argtypes = [Font, Typeface] -dll.font_set_typeface.restype = None +dll.pixie_font_set_typeface.argtypes = [Font, Typeface] +dll.pixie_font_set_typeface.restype = None -dll.font_get_size.argtypes = [Font] -dll.font_get_size.restype = c_float +dll.pixie_font_get_size.argtypes = [Font] +dll.pixie_font_get_size.restype = c_float -dll.font_set_size.argtypes = [Font, c_float] -dll.font_set_size.restype = None +dll.pixie_font_set_size.argtypes = [Font, c_float] +dll.pixie_font_set_size.restype = None -dll.font_get_line_height.argtypes = [Font] -dll.font_get_line_height.restype = c_float +dll.pixie_font_get_line_height.argtypes = [Font] +dll.pixie_font_get_line_height.restype = c_float -dll.font_set_line_height.argtypes = [Font, c_float] -dll.font_set_line_height.restype = None +dll.pixie_font_set_line_height.argtypes = [Font, c_float] +dll.pixie_font_set_line_height.restype = None -dll.font_get_text_case.argtypes = [Font] -dll.font_get_text_case.restype = TextCase +dll.pixie_font_get_text_case.argtypes = [Font] +dll.pixie_font_get_text_case.restype = TextCase -dll.font_set_text_case.argtypes = [Font, TextCase] -dll.font_set_text_case.restype = None +dll.pixie_font_set_text_case.argtypes = [Font, TextCase] +dll.pixie_font_set_text_case.restype = None -dll.font_get_underline.argtypes = [Font] -dll.font_get_underline.restype = c_bool +dll.pixie_font_get_underline.argtypes = [Font] +dll.pixie_font_get_underline.restype = c_bool -dll.font_set_underline.argtypes = [Font, c_bool] -dll.font_set_underline.restype = None +dll.pixie_font_set_underline.argtypes = [Font, c_bool] +dll.pixie_font_set_underline.restype = None -dll.font_get_strikethrough.argtypes = [Font] -dll.font_get_strikethrough.restype = c_bool +dll.pixie_font_get_strikethrough.argtypes = [Font] +dll.pixie_font_get_strikethrough.restype = c_bool -dll.font_set_strikethrough.argtypes = [Font, c_bool] -dll.font_set_strikethrough.restype = None +dll.pixie_font_set_strikethrough.argtypes = [Font, c_bool] +dll.pixie_font_set_strikethrough.restype = None -dll.font_get_no_kerning_adjustments.argtypes = [Font] -dll.font_get_no_kerning_adjustments.restype = c_bool +dll.pixie_font_get_no_kerning_adjustments.argtypes = [Font] +dll.pixie_font_get_no_kerning_adjustments.restype = c_bool -dll.font_set_no_kerning_adjustments.argtypes = [Font, c_bool] -dll.font_set_no_kerning_adjustments.restype = None +dll.pixie_font_set_no_kerning_adjustments.argtypes = [Font, c_bool] +dll.pixie_font_set_no_kerning_adjustments.restype = None dll.pixie_font_scale.argtypes = [Font] dll.pixie_font_scale.restype = c_float @@ -1614,17 +1614,17 @@ dll.pixie_font_compute_bounds.restype = Vector2 dll.pixie_span_unref.argtypes = [Span] dll.pixie_span_unref.restype = None -dll.span_get_text.argtypes = [Span] -dll.span_get_text.restype = c_char_p +dll.pixie_span_get_text.argtypes = [Span] +dll.pixie_span_get_text.restype = c_char_p -dll.span_set_text.argtypes = [Span, c_char_p] -dll.span_set_text.restype = None +dll.pixie_span_set_text.argtypes = [Span, c_char_p] +dll.pixie_span_set_text.restype = None -dll.span_get_font.argtypes = [Span] -dll.span_get_font.restype = Font +dll.pixie_span_get_font.argtypes = [Span] +dll.pixie_span_get_font.restype = Font -dll.span_set_font.argtypes = [Span, Font] -dll.span_set_font.restype = None +dll.pixie_span_set_font.argtypes = [Span, Font] +dll.pixie_span_set_font.restype = None dll.pixie_arrangement_unref.argtypes = [Arrangement] dll.pixie_arrangement_unref.restype = None @@ -1635,71 +1635,71 @@ dll.pixie_arrangement_compute_bounds.restype = Vector2 dll.pixie_context_unref.argtypes = [Context] dll.pixie_context_unref.restype = None -dll.context_get_image.argtypes = [Context] -dll.context_get_image.restype = Image +dll.pixie_context_get_image.argtypes = [Context] +dll.pixie_context_get_image.restype = Image -dll.context_set_image.argtypes = [Context, Image] -dll.context_set_image.restype = None +dll.pixie_context_set_image.argtypes = [Context, Image] +dll.pixie_context_set_image.restype = None -dll.context_get_fill_style.argtypes = [Context] -dll.context_get_fill_style.restype = Paint +dll.pixie_context_get_fill_style.argtypes = [Context] +dll.pixie_context_get_fill_style.restype = Paint -dll.context_set_fill_style.argtypes = [Context, Paint] -dll.context_set_fill_style.restype = None +dll.pixie_context_set_fill_style.argtypes = [Context, Paint] +dll.pixie_context_set_fill_style.restype = None -dll.context_get_stroke_style.argtypes = [Context] -dll.context_get_stroke_style.restype = Paint +dll.pixie_context_get_stroke_style.argtypes = [Context] +dll.pixie_context_get_stroke_style.restype = Paint -dll.context_set_stroke_style.argtypes = [Context, Paint] -dll.context_set_stroke_style.restype = None +dll.pixie_context_set_stroke_style.argtypes = [Context, Paint] +dll.pixie_context_set_stroke_style.restype = None -dll.context_get_global_alpha.argtypes = [Context] -dll.context_get_global_alpha.restype = c_float +dll.pixie_context_get_global_alpha.argtypes = [Context] +dll.pixie_context_get_global_alpha.restype = c_float -dll.context_set_global_alpha.argtypes = [Context, c_float] -dll.context_set_global_alpha.restype = None +dll.pixie_context_set_global_alpha.argtypes = [Context, c_float] +dll.pixie_context_set_global_alpha.restype = None -dll.context_get_line_width.argtypes = [Context] -dll.context_get_line_width.restype = c_float +dll.pixie_context_get_line_width.argtypes = [Context] +dll.pixie_context_get_line_width.restype = c_float -dll.context_set_line_width.argtypes = [Context, c_float] -dll.context_set_line_width.restype = None +dll.pixie_context_set_line_width.argtypes = [Context, c_float] +dll.pixie_context_set_line_width.restype = None -dll.context_get_miter_limit.argtypes = [Context] -dll.context_get_miter_limit.restype = c_float +dll.pixie_context_get_miter_limit.argtypes = [Context] +dll.pixie_context_get_miter_limit.restype = c_float -dll.context_set_miter_limit.argtypes = [Context, c_float] -dll.context_set_miter_limit.restype = None +dll.pixie_context_set_miter_limit.argtypes = [Context, c_float] +dll.pixie_context_set_miter_limit.restype = None -dll.context_get_line_cap.argtypes = [Context] -dll.context_get_line_cap.restype = LineCap +dll.pixie_context_get_line_cap.argtypes = [Context] +dll.pixie_context_get_line_cap.restype = LineCap -dll.context_set_line_cap.argtypes = [Context, LineCap] -dll.context_set_line_cap.restype = None +dll.pixie_context_set_line_cap.argtypes = [Context, LineCap] +dll.pixie_context_set_line_cap.restype = None -dll.context_get_line_join.argtypes = [Context] -dll.context_get_line_join.restype = LineJoin +dll.pixie_context_get_line_join.argtypes = [Context] +dll.pixie_context_get_line_join.restype = LineJoin -dll.context_set_line_join.argtypes = [Context, LineJoin] -dll.context_set_line_join.restype = None +dll.pixie_context_set_line_join.argtypes = [Context, LineJoin] +dll.pixie_context_set_line_join.restype = None -dll.context_get_font.argtypes = [Context] -dll.context_get_font.restype = c_char_p +dll.pixie_context_get_font.argtypes = [Context] +dll.pixie_context_get_font.restype = c_char_p -dll.context_set_font.argtypes = [Context, c_char_p] -dll.context_set_font.restype = None +dll.pixie_context_set_font.argtypes = [Context, c_char_p] +dll.pixie_context_set_font.restype = None -dll.context_get_font_size.argtypes = [Context] -dll.context_get_font_size.restype = c_float +dll.pixie_context_get_font_size.argtypes = [Context] +dll.pixie_context_get_font_size.restype = c_float -dll.context_set_font_size.argtypes = [Context, c_float] -dll.context_set_font_size.restype = None +dll.pixie_context_set_font_size.argtypes = [Context, c_float] +dll.pixie_context_set_font_size.restype = None -dll.context_get_text_align.argtypes = [Context] -dll.context_get_text_align.restype = HorizontalAlignment +dll.pixie_context_get_text_align.argtypes = [Context] +dll.pixie_context_get_text_align.restype = HorizontalAlignment -dll.context_set_text_align.argtypes = [Context, HorizontalAlignment] -dll.context_set_text_align.restype = None +dll.pixie_context_set_text_align.argtypes = [Context, HorizontalAlignment] +dll.pixie_context_set_text_align.restype = None dll.pixie_context_save.argtypes = [Context] dll.pixie_context_save.restype = None @@ -1859,4 +1859,3 @@ dll.pixie_miter_limit_to_angle.restype = c_float dll.pixie_angle_to_miter_limit.argtypes = [c_float] dll.pixie_angle_to_miter_limit.restype = c_float - From 90fbd7fa8cd32b5e9aff18e3d5b95d3b627feaea Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 Aug 2021 23:16:28 -0500 Subject: [PATCH 5/7] f --- bindings/generated/pixie.py | 73 +++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 6d2f1c5..3b69dad 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,6 @@ from ctypes import * -dll = cdll.LoadLibrary("./pixie.dll") +dll = cdll.LoadLibrary("pixie.dll") class PixieError(Exception): pass @@ -190,10 +190,10 @@ class SeqFloat32(Structure): dll.pixie_seq_float_32_unref(self) def __len__(self): - dll.pixie_seq_float_32_len(self) + return dll.pixie_seq_float_32_len(self) def __getitem__(self, index): - dll.pixie_seq_float_32_get(self, index) + return dll.pixie_seq_float_32_get(self, index) def __setitem__(self, index, value): dll.pixie_seq_float_32_set(self, index, value) @@ -220,10 +220,10 @@ class SeqSpan(Structure): dll.pixie_seq_span_unref(self) def __len__(self): - dll.pixie_seq_span_len(self) + return dll.pixie_seq_span_len(self) def __getitem__(self, index): - dll.pixie_seq_span_get(self, index) + return dll.pixie_seq_span_get(self, index) def __setitem__(self, index, value): dll.pixie_seq_span_set(self, index, value) @@ -259,7 +259,7 @@ class Image(Structure): @property def width(self): - dll.pixie_image_get_width(self) + return dll.pixie_image_get_width(self) @width.setter def width(self, width): @@ -267,7 +267,7 @@ class Image(Structure): @property def height(self): - dll.pixie_image_get_height(self) + return dll.pixie_image_get_height(self) @height.setter def height(self, height): @@ -420,7 +420,7 @@ class Mask(Structure): @property def width(self): - dll.pixie_mask_get_width(self) + return dll.pixie_mask_get_width(self) @width.setter def width(self, width): @@ -428,7 +428,7 @@ class Mask(Structure): @property def height(self): - dll.pixie_mask_get_height(self) + return dll.pixie_mask_get_height(self) @height.setter def height(self, height): @@ -544,7 +544,7 @@ class Paint(Structure): @property def kind(self): - dll.pixie_paint_get_kind(self) + return dll.pixie_paint_get_kind(self) @kind.setter def kind(self, kind): @@ -552,7 +552,7 @@ class Paint(Structure): @property def blend_mode(self): - dll.pixie_paint_get_blend_mode(self) + return dll.pixie_paint_get_blend_mode(self) @blend_mode.setter def blend_mode(self, blend_mode): @@ -560,7 +560,7 @@ class Paint(Structure): @property def opacity(self): - dll.pixie_paint_get_opacity(self) + return dll.pixie_paint_get_opacity(self) @opacity.setter def opacity(self, opacity): @@ -568,7 +568,7 @@ class Paint(Structure): @property def color(self): - dll.pixie_paint_get_color(self) + return dll.pixie_paint_get_color(self) @color.setter def color(self, color): @@ -576,7 +576,7 @@ class Paint(Structure): @property def image(self): - dll.pixie_paint_get_image(self) + return dll.pixie_paint_get_image(self) @image.setter def image(self, image): @@ -584,7 +584,7 @@ class Paint(Structure): @property def image_mat(self): - dll.pixie_paint_get_image_mat(self) + return dll.pixie_paint_get_image_mat(self) @image_mat.setter def image_mat(self, image_mat): @@ -687,7 +687,7 @@ class Typeface(Structure): @property def file_path(self): - dll.pixie_typeface_get_file_path(self).decode("utf8") + return dll.pixie_typeface_get_file_path(self).decode("utf8") @file_path.setter def file_path(self, file_path): @@ -741,7 +741,7 @@ class Font(Structure): @property def typeface(self): - dll.pixie_font_get_typeface(self) + return dll.pixie_font_get_typeface(self) @typeface.setter def typeface(self, typeface): @@ -749,7 +749,7 @@ class Font(Structure): @property def size(self): - dll.pixie_font_get_size(self) + return dll.pixie_font_get_size(self) @size.setter def size(self, size): @@ -757,7 +757,7 @@ class Font(Structure): @property def line_height(self): - dll.pixie_font_get_line_height(self) + return dll.pixie_font_get_line_height(self) @line_height.setter def line_height(self, line_height): @@ -765,7 +765,7 @@ class Font(Structure): @property def text_case(self): - dll.pixie_font_get_text_case(self) + return dll.pixie_font_get_text_case(self) @text_case.setter def text_case(self, text_case): @@ -773,7 +773,7 @@ class Font(Structure): @property def underline(self): - dll.pixie_font_get_underline(self) + return dll.pixie_font_get_underline(self) @underline.setter def underline(self, underline): @@ -781,7 +781,7 @@ class Font(Structure): @property def strikethrough(self): - dll.pixie_font_get_strikethrough(self) + return dll.pixie_font_get_strikethrough(self) @strikethrough.setter def strikethrough(self, strikethrough): @@ -789,7 +789,7 @@ class Font(Structure): @property def no_kerning_adjustments(self): - dll.pixie_font_get_no_kerning_adjustments(self) + return dll.pixie_font_get_no_kerning_adjustments(self) @no_kerning_adjustments.setter def no_kerning_adjustments(self, no_kerning_adjustments): @@ -825,7 +825,7 @@ class Span(Structure): @property def text(self): - dll.pixie_span_get_text(self).decode("utf8") + return dll.pixie_span_get_text(self).decode("utf8") @text.setter def text(self, text): @@ -833,7 +833,7 @@ class Span(Structure): @property def font(self): - dll.pixie_span_get_font(self) + return dll.pixie_span_get_font(self) @font.setter def font(self, font): @@ -869,7 +869,7 @@ class Context(Structure): @property def image(self): - dll.pixie_context_get_image(self) + return dll.pixie_context_get_image(self) @image.setter def image(self, image): @@ -877,7 +877,7 @@ class Context(Structure): @property def fill_style(self): - dll.pixie_context_get_fill_style(self) + return dll.pixie_context_get_fill_style(self) @fill_style.setter def fill_style(self, fill_style): @@ -885,7 +885,7 @@ class Context(Structure): @property def stroke_style(self): - dll.pixie_context_get_stroke_style(self) + return dll.pixie_context_get_stroke_style(self) @stroke_style.setter def stroke_style(self, stroke_style): @@ -893,7 +893,7 @@ class Context(Structure): @property def global_alpha(self): - dll.pixie_context_get_global_alpha(self) + return dll.pixie_context_get_global_alpha(self) @global_alpha.setter def global_alpha(self, global_alpha): @@ -901,7 +901,7 @@ class Context(Structure): @property def line_width(self): - dll.pixie_context_get_line_width(self) + return dll.pixie_context_get_line_width(self) @line_width.setter def line_width(self, line_width): @@ -909,7 +909,7 @@ class Context(Structure): @property def miter_limit(self): - dll.pixie_context_get_miter_limit(self) + return dll.pixie_context_get_miter_limit(self) @miter_limit.setter def miter_limit(self, miter_limit): @@ -917,7 +917,7 @@ class Context(Structure): @property def line_cap(self): - dll.pixie_context_get_line_cap(self) + return dll.pixie_context_get_line_cap(self) @line_cap.setter def line_cap(self, line_cap): @@ -925,7 +925,7 @@ class Context(Structure): @property def line_join(self): - dll.pixie_context_get_line_join(self) + return dll.pixie_context_get_line_join(self) @line_join.setter def line_join(self, line_join): @@ -933,7 +933,7 @@ class Context(Structure): @property def font(self): - dll.pixie_context_get_font(self).decode("utf8") + return dll.pixie_context_get_font(self).decode("utf8") @font.setter def font(self, font): @@ -941,7 +941,7 @@ class Context(Structure): @property def font_size(self): - dll.pixie_context_get_font_size(self) + return dll.pixie_context_get_font_size(self) @font_size.setter def font_size(self, font_size): @@ -949,7 +949,7 @@ class Context(Structure): @property def text_align(self): - dll.pixie_context_get_text_align(self) + return dll.pixie_context_get_text_align(self) @text_align.setter def text_align(self, text_align): @@ -1859,3 +1859,4 @@ dll.pixie_miter_limit_to_angle.restype = c_float dll.pixie_angle_to_miter_limit.argtypes = [c_float] dll.pixie_angle_to_miter_limit.restype = c_float + From 9a6c452b72bea6f7f49749d7f42367cb854c78f7 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 Aug 2021 23:52:23 -0500 Subject: [PATCH 6/7] py bound seqs work --- bindings/generated/pixie.py | 187 +++++++++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 4 deletions(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 3b69dad..b9d9d86 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,6 @@ from ctypes import * -dll = cdll.LoadLibrary("pixie.dll") +dll = cdll.LoadLibrary("./pixie.dll") class PixieError(Exception): pass @@ -590,6 +590,60 @@ class Paint(Structure): def image_mat(self, image_mat): dll.pixie_paint_set_image_mat(self, image_mat) + class GradientHandlePositions: + + def __init__(self, paint): + self.paint = paint + + def __len__(self): + return dll.pixie_paint_gradient_handle_positions_len(self.paint) + + def __getitem__(self, index): + return dll.pixie_paint_gradient_handle_positions_get(self.paint, index) + + def __setitem__(self, index, value): + dll.pixie_paint_gradient_handle_positions_set(self.paint, index, value) + + def __delitem__(self, index): + dll.pixie_paint_gradient_handle_positions_remove(self.paint, index) + + def append(self, value): + dll.pixie_paint_gradient_handle_positions_add(self.paint, value) + + def clear(self): + dll.pixie_paint_gradient_handle_positions_clear(self.paint) + + @property + def gradient_handle_positions(self): + return self.GradientHandlePositions(self) + + class GradientStops: + + def __init__(self, paint): + self.paint = paint + + def __len__(self): + return dll.pixie_paint_gradient_stops_len(self.paint) + + def __getitem__(self, index): + return dll.pixie_paint_gradient_stops_get(self.paint, index) + + def __setitem__(self, index, value): + dll.pixie_paint_gradient_stops_set(self.paint, index, value) + + def __delitem__(self, index): + dll.pixie_paint_gradient_stops_remove(self.paint, index) + + def append(self, value): + dll.pixie_paint_gradient_stops_add(self.paint, value) + + def clear(self): + dll.pixie_paint_gradient_stops_clear(self.paint) + + @property + def gradient_stops(self): + return self.GradientStops(self) + def new_paint(self): result = dll.pixie_paint_new_paint(self) return result @@ -763,6 +817,33 @@ class Font(Structure): def line_height(self, line_height): dll.pixie_font_set_line_height(self, line_height) + class Paints: + + def __init__(self, font): + self.font = font + + def __len__(self): + return dll.pixie_font_paints_len(self.font) + + def __getitem__(self, index): + return dll.pixie_font_paints_get(self.font, index) + + def __setitem__(self, index, value): + dll.pixie_font_paints_set(self.font, index, value) + + def __delitem__(self, index): + dll.pixie_font_paints_remove(self.font, index) + + def append(self, value): + dll.pixie_font_paints_add(self.font, value) + + def clear(self): + dll.pixie_font_paints_clear(self.font) + + @property + def paints(self): + return self.Paints(self) + @property def text_case(self): return dll.pixie_font_get_text_case(self) @@ -955,6 +1036,33 @@ class Context(Structure): def text_align(self, text_align): dll.pixie_context_set_text_align(self, text_align) + class LineDash: + + def __init__(self, context): + self.context = context + + def __len__(self): + return dll.pixie_context_line_dash_len(self.context) + + def __getitem__(self, index): + return dll.pixie_context_line_dash_get(self.context, index) + + def __setitem__(self, index, value): + dll.pixie_context_line_dash_set(self.context, index, value) + + def __delitem__(self, index): + dll.pixie_context_line_dash_remove(self.context, index) + + def append(self, value): + dll.pixie_context_line_dash_add(self.context, value) + + def clear(self): + dll.pixie_context_line_dash_clear(self.context) + + @property + def line_dash(self): + return self.LineDash(self) + def save(self): dll.pixie_context_save(self) if check_error(): @@ -1201,7 +1309,7 @@ dll.pixie_seq_float_32_unref.argtypes = [SeqFloat32] dll.pixie_seq_float_32_unref.restype = None dll.pixie_seq_float_32_len.argtypes = [SeqFloat32] -dll.pixie_seq_float_32_len.restype = None +dll.pixie_seq_float_32_len.restype = c_longlong dll.pixie_seq_float_32_get.argtypes = [SeqFloat32, c_longlong] dll.pixie_seq_float_32_get.restype = SeqFloat32 @@ -1222,7 +1330,7 @@ dll.pixie_seq_span_unref.argtypes = [SeqSpan] dll.pixie_seq_span_unref.restype = None dll.pixie_seq_span_len.argtypes = [SeqSpan] -dll.pixie_seq_span_len.restype = None +dll.pixie_seq_span_len.restype = c_longlong dll.pixie_seq_span_get.argtypes = [SeqSpan, c_longlong] dll.pixie_seq_span_get.restype = SeqSpan @@ -1461,6 +1569,42 @@ dll.pixie_paint_get_image_mat.restype = Matrix3 dll.pixie_paint_set_image_mat.argtypes = [Paint, Matrix3] dll.pixie_paint_set_image_mat.restype = None +dll.pixie_paint_gradient_handle_positions_len.argtypes = [Paint] +dll.pixie_paint_gradient_handle_positions_len.restype = c_longlong + +dll.pixie_paint_gradient_handle_positions_get.argtypes = [Paint, c_longlong] +dll.pixie_paint_gradient_handle_positions_get.restype = Paint + +dll.pixie_paint_gradient_handle_positions_set.argtypes = [Paint, c_longlong, Vector2] +dll.pixie_paint_gradient_handle_positions_set.restype = None + +dll.pixie_paint_gradient_handle_positions_remove.argtypes = [Paint, c_longlong] +dll.pixie_paint_gradient_handle_positions_remove.restype = None + +dll.pixie_paint_gradient_handle_positions_add.argtypes = [Paint, Vector2] +dll.pixie_paint_gradient_handle_positions_add.restype = None + +dll.pixie_paint_gradient_handle_positions_clear.argtypes = [Paint] +dll.pixie_paint_gradient_handle_positions_clear.restype = None + +dll.pixie_paint_gradient_stops_len.argtypes = [Paint] +dll.pixie_paint_gradient_stops_len.restype = c_longlong + +dll.pixie_paint_gradient_stops_get.argtypes = [Paint, c_longlong] +dll.pixie_paint_gradient_stops_get.restype = Paint + +dll.pixie_paint_gradient_stops_set.argtypes = [Paint, c_longlong, ColorStop] +dll.pixie_paint_gradient_stops_set.restype = None + +dll.pixie_paint_gradient_stops_remove.argtypes = [Paint, c_longlong] +dll.pixie_paint_gradient_stops_remove.restype = None + +dll.pixie_paint_gradient_stops_add.argtypes = [Paint, ColorStop] +dll.pixie_paint_gradient_stops_add.restype = None + +dll.pixie_paint_gradient_stops_clear.argtypes = [Paint] +dll.pixie_paint_gradient_stops_clear.restype = None + dll.pixie_paint_new_paint.argtypes = [Paint] dll.pixie_paint_new_paint.restype = Paint @@ -1575,6 +1719,24 @@ dll.pixie_font_get_line_height.restype = c_float dll.pixie_font_set_line_height.argtypes = [Font, c_float] dll.pixie_font_set_line_height.restype = None +dll.pixie_font_paints_len.argtypes = [Font] +dll.pixie_font_paints_len.restype = c_longlong + +dll.pixie_font_paints_get.argtypes = [Font, c_longlong] +dll.pixie_font_paints_get.restype = Font + +dll.pixie_font_paints_set.argtypes = [Font, c_longlong, Paint] +dll.pixie_font_paints_set.restype = None + +dll.pixie_font_paints_remove.argtypes = [Font, c_longlong] +dll.pixie_font_paints_remove.restype = None + +dll.pixie_font_paints_add.argtypes = [Font, Paint] +dll.pixie_font_paints_add.restype = None + +dll.pixie_font_paints_clear.argtypes = [Font] +dll.pixie_font_paints_clear.restype = None + dll.pixie_font_get_text_case.argtypes = [Font] dll.pixie_font_get_text_case.restype = TextCase @@ -1701,6 +1863,24 @@ dll.pixie_context_get_text_align.restype = HorizontalAlignment dll.pixie_context_set_text_align.argtypes = [Context, HorizontalAlignment] dll.pixie_context_set_text_align.restype = None +dll.pixie_context_line_dash_len.argtypes = [Context] +dll.pixie_context_line_dash_len.restype = c_longlong + +dll.pixie_context_line_dash_get.argtypes = [Context, c_longlong] +dll.pixie_context_line_dash_get.restype = Context + +dll.pixie_context_line_dash_set.argtypes = [Context, c_longlong, c_float] +dll.pixie_context_line_dash_set.restype = None + +dll.pixie_context_line_dash_remove.argtypes = [Context, c_longlong] +dll.pixie_context_line_dash_remove.restype = None + +dll.pixie_context_line_dash_add.argtypes = [Context, c_float] +dll.pixie_context_line_dash_add.restype = None + +dll.pixie_context_line_dash_clear.argtypes = [Context] +dll.pixie_context_line_dash_clear.restype = None + dll.pixie_context_save.argtypes = [Context] dll.pixie_context_save.restype = None @@ -1859,4 +2039,3 @@ dll.pixie_miter_limit_to_angle.restype = c_float dll.pixie_angle_to_miter_limit.argtypes = [c_float] dll.pixie_angle_to_miter_limit.restype = c_float - From 949ef160d82d2516e56040073a1a9f08c58beb3f Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 26 Aug 2021 00:21:49 -0500 Subject: [PATCH 7/7] new seq --- bindings/generated/pixie.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index b9d9d86..0523cda 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,6 @@ from ctypes import * -dll = cdll.LoadLibrary("./pixie.dll") +dll = cdll.LoadLibrary("pixie.dll") class PixieError(Exception): pass @@ -189,6 +189,9 @@ class SeqFloat32(Structure): def __del__(self): dll.pixie_seq_float_32_unref(self) + def __init__(self): + self.ref = dll.pixie_new_seq_float_32() + def __len__(self): return dll.pixie_seq_float_32_len(self) @@ -219,6 +222,9 @@ class SeqSpan(Structure): def __del__(self): dll.pixie_seq_span_unref(self) + def __init__(self): + self.ref = dll.pixie_new_seq_span() + def __len__(self): return dll.pixie_seq_span_len(self) @@ -1308,11 +1314,14 @@ dll.pixie_take_error.restype = c_char_p dll.pixie_seq_float_32_unref.argtypes = [SeqFloat32] dll.pixie_seq_float_32_unref.restype = None +dll.pixie_new_seq_float_32.argtypes = [] +dll.pixie_new_seq_float_32.restype = c_ulonglong + dll.pixie_seq_float_32_len.argtypes = [SeqFloat32] dll.pixie_seq_float_32_len.restype = c_longlong dll.pixie_seq_float_32_get.argtypes = [SeqFloat32, c_longlong] -dll.pixie_seq_float_32_get.restype = SeqFloat32 +dll.pixie_seq_float_32_get.restype = c_float dll.pixie_seq_float_32_set.argtypes = [SeqFloat32, c_longlong, c_float] dll.pixie_seq_float_32_set.restype = None @@ -1329,11 +1338,14 @@ dll.pixie_seq_float_32_clear.restype = None dll.pixie_seq_span_unref.argtypes = [SeqSpan] dll.pixie_seq_span_unref.restype = None +dll.pixie_new_seq_span.argtypes = [] +dll.pixie_new_seq_span.restype = c_ulonglong + dll.pixie_seq_span_len.argtypes = [SeqSpan] dll.pixie_seq_span_len.restype = c_longlong dll.pixie_seq_span_get.argtypes = [SeqSpan, c_longlong] -dll.pixie_seq_span_get.restype = SeqSpan +dll.pixie_seq_span_get.restype = Span dll.pixie_seq_span_set.argtypes = [SeqSpan, c_longlong, Span] dll.pixie_seq_span_set.restype = None @@ -1573,7 +1585,7 @@ dll.pixie_paint_gradient_handle_positions_len.argtypes = [Paint] dll.pixie_paint_gradient_handle_positions_len.restype = c_longlong dll.pixie_paint_gradient_handle_positions_get.argtypes = [Paint, c_longlong] -dll.pixie_paint_gradient_handle_positions_get.restype = Paint +dll.pixie_paint_gradient_handle_positions_get.restype = Vector2 dll.pixie_paint_gradient_handle_positions_set.argtypes = [Paint, c_longlong, Vector2] dll.pixie_paint_gradient_handle_positions_set.restype = None @@ -1591,7 +1603,7 @@ dll.pixie_paint_gradient_stops_len.argtypes = [Paint] dll.pixie_paint_gradient_stops_len.restype = c_longlong dll.pixie_paint_gradient_stops_get.argtypes = [Paint, c_longlong] -dll.pixie_paint_gradient_stops_get.restype = Paint +dll.pixie_paint_gradient_stops_get.restype = ColorStop dll.pixie_paint_gradient_stops_set.argtypes = [Paint, c_longlong, ColorStop] dll.pixie_paint_gradient_stops_set.restype = None @@ -1723,7 +1735,7 @@ dll.pixie_font_paints_len.argtypes = [Font] dll.pixie_font_paints_len.restype = c_longlong dll.pixie_font_paints_get.argtypes = [Font, c_longlong] -dll.pixie_font_paints_get.restype = Font +dll.pixie_font_paints_get.restype = Paint dll.pixie_font_paints_set.argtypes = [Font, c_longlong, Paint] dll.pixie_font_paints_set.restype = None @@ -1867,7 +1879,7 @@ dll.pixie_context_line_dash_len.argtypes = [Context] dll.pixie_context_line_dash_len.restype = c_longlong dll.pixie_context_line_dash_get.argtypes = [Context, c_longlong] -dll.pixie_context_line_dash_get.restype = Context +dll.pixie_context_line_dash_get.restype = c_float dll.pixie_context_line_dash_set.argtypes = [Context, c_longlong, c_float] dll.pixie_context_line_dash_set.restype = None @@ -2039,3 +2051,4 @@ dll.pixie_miter_limit_to_angle.restype = c_float dll.pixie_angle_to_miter_limit.argtypes = [c_float] dll.pixie_angle_to_miter_limit.restype = c_float +