Commit 40a4d417 authored by Øyvind Kolås's avatar Øyvind Kolås
Browse files

(feat:ctc) add preliminary pycardium ctx integration

We should perhaps have a ctx object returned from the display instead
of overloading the displas as the ctx context?
parent 6bcb071c
......@@ -185,6 +185,110 @@ class Display:
sys_display.circ(x, y, rad, col, filled, size)
return self
def fill(self):
sys_display.fill()
return self
def line_width(self, lw):
sys_display.line_width(lw)
return self
def font_size(self, lw):
sys_display.font_size(lw)
return self
def stroke(self):
sys_display.stroke()
return self
def text(self, utf8):
sys_display.text(utf8)
return self
#def svg_path(self, d):
# sys_display.svg_path(d)
# return self
def flush(self):
sys_display.flush()
return self
def scale(self, x, y):
sys_display.scale(x, y)
return self
def translate(self, x, y):
sys_display.translate(x, y)
return self
def rotate(self, r):
sys_display.rotate(r)
return self
def save(self):
sys_display.save()
return self
def restore(self):
sys_display.restore()
return self
def rgba(self, r, g, b, a):
sys_display.rgba(r, g, b, a)
return self
def line_to(self, x0, y0):
sys_display.line_to(x0, y0)
return self
def move_to(self, x0, y0):
sys_display.move_to(x0, y0)
return self
def quad_to(self, x0, y0, x1, y1):
sys_display.quad_to(x0, y0, x1, y1)
return self
def curve_to(self, x0, y0, x1, y1, x2, y2):
sys_display.curve_to(x0, y0, x1, y1, x2, y2)
return self
def rel_line_to(self, x0, y0):
sys_display.rel_line_to(x0, y0)
return self
def rel_move_to(self, x0, y0):
sys_display.rel_move_to(x0, y0)
return self
def rel_quad_to(self, x0, y0, x1, y1):
sys_display.rel_quad_to(x0, y0, x1, y1)
return self
def rectangle(self, x0, y0, x1, y1):
sys_display.rectangle(x0, y0, x1, y1)
return self
def rel_curve_to(self, x0, y0, x1, y1, x2, y2):
sys_display.rel_curve_to(x0, y0, x1, y1, x2, y2)
return self
def linear_gradient(self, x0, y0, x1, y1):
sys_display.linear_gradient(x0, y0, x1, y1)
return self
def gradient_add_stop(self, pos, r, g, b, a):
sys_display.gradient_add_stop (pos, r, g, b, a)
return self
def gradient_clear_stops(self):
sys_display.gradient_clear_stops()
return self
def radial_gradient(self, x0, y0, r0, x1, y1, r1):
sys_display.radial_gradient(x0, y0, r0, x1, y1, r1)
return self
open = Display.open
close = Display.close
......@@ -104,6 +104,40 @@ Q(rect)
Q(circ)
Q(clear)
Q(arc)
Q(gray)
Q(gradient_add_stop)
Q(fill)
Q(clip)
Q(font)
Q(svg_path)
Q(stroke)
Q(begin_path)
Q(save)
Q(restore)
Q(rotate)
Q(line_width)
Q(font_size)
Q(scale)
Q(translate)
Q(line_to)
Q(move_to)
Q(curve_to)
Q(quad_to)
Q(quad_to)
Q(rectangle)
Q(rel_line_to)
Q(rel_move_to)
Q(rel_curve_to)
Q(rel_quad_to)
Q(close_path)
Q(rgba)
Q(global_alpha)
Q(text)
Q(text_width)
Q(linear_gradient)
Q(radial_gradient)
/* ambient */
Q(light_sensor)
Q(start)
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment