Skip to content

Context


class Context

Cairo graphics context.

Member Functions

Name Description
destroy
newPath
closePath
arc
arcNegative
curveTo
lineTo
moveTo
rectangle
relCurveTo
relLineTo
relMoveTo
stroke
strokePreserve
fill
fillPreserve
paint
translate
scale
rotate
deviceToUserDistance
setSourceRGB
setSourceRGBA
setSource
setLineWidth
showText
setFontSize
pushGroup
popGroupToSource

Member Function Details

arc

function arc(xc:Real, yc:Real, radius:Real, angle1:Real, angle2:Real)

arcNegative

function arcNegative(xc:Real, yc:Real, radius:Real, angle1:Real, angle2:Real)

closePath

function closePath()

curveTo

function curveTo(x1:Real, y1:Real, x2:Real, y2:Real, x3:Real, y3:Real)

destroy

function destroy()

deviceToUserDistance

function deviceToUserDistance(ux:Real, uy:Real) -> (Real, Real)

fill

function fill()

fillPreserve

function fillPreserve()

lineTo

function lineTo(x:Real, y:Real)

moveTo

function moveTo(x:Real, y:Real)

newPath

function newPath()

paint

function paint()

popGroupToSource

function popGroupToSource()

pushGroup

function pushGroup()

rectangle

function rectangle(x:Real, y:Real, width:Real, height:Real)

relCurveTo

function relCurveTo(dx1:Real, dy1:Real, dx2:Real, dy2:Real, dx3:Real, dy3:Real)

relLineTo

function relLineTo(dx:Real, dy:Real)

relMoveTo

function relMoveTo(dx:Real, dy:Real)

rotate

function rotate(angle:Real)

scale

function scale(sx:Real, sy:Real)

setFontSize

function setFontSize(size:Real)

setLineWidth

function setLineWidth(width:Real)

setSource

function setSource(pattern:Pattern)

setSourceRGB

function setSourceRGB(red:Real, green:Real, blue:Real)

setSourceRGBA

function setSourceRGBA(red:Real, green:Real, blue:Real, alpha:Real)

showText

function showText(utf8:String)

stroke

function stroke()

strokePreserve

function strokePreserve()

translate

function translate(tx:Real, ty:Real)