Clipping¶
- class shoebot.data.ClippingPath(bot, path=None, **kwargs)¶
- addpoint(*args)¶
- append(*args)¶
- arc(x, y, radius, angle1, angle2)¶
- property bounds¶
Return cached bounds of this Grob. If bounds are not cached, render to a meta surface, and keep the meta surface and bounds cached.
- property center¶
Return cached bounds of this Grob. If bounds are not cached, render to a meta surface, and keep the meta surface and bounds cached.
- closepath()¶
- contains(x, y)¶
Return cached bounds of this Grob. If bounds are not cached, render to a meta surface, and keep the meta surface and bounds cached.
- property contours¶
Returns a list of contours in the path, as BezierPath objects. A contour is a sequence of lines and curves separated from the next contour by a MOVETO. For example, the glyph “o” has two contours: the inner circle and the outer circle.
- copy()¶
- curveto(x1, y1, x2, y2, x3, y3)¶
- draw()¶
- ellipse(x, y, w, h, ellipsemode='corner')¶
- extend(pathelements)¶
- property fill¶
- inheritFromContext(ignore=())¶
Doesn’t store exactly the same items as Nodebox for ease of implementation, it has enough to get the Nodebox Dentrite example working.
- property length¶
Returns the length of the path. Calculates the length of each spline in the path, using n as a number of points to measure. When segmented is True, returns a list containing the individual length of each spline as values between 0.0 and 1.0, defining the relative length of each spline in relation to the total path length.
- line(x1, y1, x2, y2)¶
- lineto(x, y)¶
- moveto(x, y)¶
- point(t, segments=None)¶
Returns the PathElement at time t (0.0-1.0) on the path.
Returns coordinates for point at t on the path. Gets the length of the path, based on the length of each curve and line in the path. Determines in what segment t falls. Gets the point on that segment. When you supply the list of segment lengths yourself, as returned from length(path, segmented=True), point() works about thirty times faster in a for-loop since it doesn’t need to recalculate the length during each iteration.
- points(amount=100, start=0.0, end=1.0, segments=None)¶
Returns an iterator with a list of calculated points for the path. To omit the last point on closed paths: end=1-1.0/amount
- rect(x, y, w, h, roundness=0.0, rectmode='corner')¶
- relcurveto(x1, y1, x2, y2, x3, y3)¶
- rellineto(x, y)¶
- relmoveto(x, y)¶
- property stroke¶
- property strokewidth¶