enable.savage.svg.backends.kiva.renderer module

class enable.savage.svg.backends.kiva.renderer.ColorBrush(color)[source]

Bases: object

IsOk()[source]
set_on_gc(gc)[source]

Set the appropriate properties on the GraphicsContext.

class enable.savage.svg.backends.kiva.renderer.CompiledPath(*args)[source]

Bases: kiva.agg.agg.CompiledPath

AddCircle(x, y, r)[source]
AddCurveToPoint(ctrl1, ctrl2, endpoint)[source]
AddEllipse(cx, cy, rx, ry)[source]
AddEllipticalArcTo(x, y, w, h, theta0, dtheta, phi=0)[source]
AddLineToPoint(*args)
AddPath(*args)
AddQuadCurveToPoint(*args)
AddRectangle(*args)
AddRoundedRectangleEx(x, y, w, h, rx, ry)[source]
CloseSubpath(*args)
GetCurrentPoint()
MoveToPoint(*args)
elliptical_arc_to(rx, ry, phi, large_arc_flag, sweep_flag, x2, y2)[source]
class enable.savage.svg.backends.kiva.renderer.LinearGradientBrush(x1, y1, x2, y2, stops, spreadMethod='pad', transforms=None, units='userSpaceOnUse')[source]

Bases: enable.savage.svg.backends.null.null_renderer.AbstractGradientBrush

A Brush representing a linear gradient.

set_on_gc(gc, bbox=None)[source]
class enable.savage.svg.backends.kiva.renderer.Pen(color)[source]

Bases: object

SetCap(cap)[source]
SetDash(dasharray, dashoffset=0.0)[source]
SetJoin(join)[source]
SetWidth(width)[source]
set_on_gc(gc)[source]

Set the appropriate properties on the GraphicsContext.

class enable.savage.svg.backends.kiva.renderer.RadialGradientBrush(cx, cy, r, stops, fx=None, fy=None, spreadMethod='pad', transforms=None, units='userSpaceOnUse')[source]

Bases: enable.savage.svg.backends.null.null_renderer.AbstractGradientBrush

A Brush representing a radial gradient.

set_on_gc(gc, bbox=None)[source]
class enable.savage.svg.backends.kiva.renderer.Renderer[source]

Bases: enable.savage.svg.backends.null.null_renderer.NullRenderer

classmethod DrawImage(gc, image, x, y, width, height)[source]
classmethod DrawText(gc, text, x, y, brush, anchor='start')[source]

Draw text at the given x,y position with the color of the given brush.

fixme: Handle gradients…?

classmethod GetTextExtent(gc, text)[source]
NullBrush = None
NullGraphicsBrush = None
NullPen = None
TransparentPen = <enable.savage.svg.backends.kiva.renderer.Pen object>
caps = {'butt': 1, 'round': 0, 'square': 2}
classmethod clipPath(gc, path)[source]
classmethod concatTransform(gc, matrix)[source]
classmethod createAffineMatrix(a, b, c, d, x, y)[source]
classmethod createBrush(color_tuple)[source]
classmethod createLinearGradientBrush(x1, y1, x2, y2, stops, spreadMethod='pad', transforms=None, units='userSpaceOnUse')[source]
classmethod createNativePen(pen)[source]
classmethod createPen(color_tuple)[source]
classmethod createRadialGradientBrush(cx, cy, r, stops, fx=None, fy=None, spreadMethod='pad', transforms=None, units='userSpaceOnUse')[source]
classmethod fillPath(gc, path, mode)[source]
fill_rules = {'evenodd': 2, 'nonzero': 1}
classmethod getCurrentPoint(path)[source]
classmethod getFont(font_name='Arial')[source]
classmethod gradientPath(gc, path, brush)[source]
joins = {'bevel': 1, 'miter': 2, 'round': 0}
classmethod makeMatrix(*args)[source]
classmethod makePath()[source]
classmethod popState(gc)[source]
classmethod pushState(gc)[source]
classmethod rotate(gc, angle)[source]
classmethod scale(gc, sx, sy)[source]
classmethod setBrush(gc, brush)[source]
classmethod setFont(gc, font, brush)[source]
classmethod setFontSize(font, size)[source]
classmethod setFontStyle(font, style)[source]
classmethod setFontWeight(font, weight)[source]
classmethod setPen(gc, pen)[source]
classmethod setPenDash(pen, dasharray, offset)[source]
classmethod strokePath(gc, path)[source]
classmethod translate(gc, *args)[source]
enable.savage.svg.backends.kiva.renderer.font_style(font)[source]

Return a string for the font style of a given font.

fixme: Shouldn’t the backends handle this?