Table of Contents

Class Context

Namespace
Cairo.Internal
Assembly
cairo-1.0.dll
public class Context
Inheritance
Context
Inherited Members

Methods

AppendPath(ContextHandle, PathHandle)

public static extern void AppendPath(ContextHandle cr, PathHandle path)

Parameters

cr ContextHandle
path PathHandle

Arc(ContextHandle, double, double, double, double, double)

public static extern void Arc(ContextHandle cr, double xc, double yc, double radius, double angle1, double angle2)

Parameters

cr ContextHandle
xc double
yc double
radius double
angle1 double
angle2 double

ArcNegative(ContextHandle, double, double, double, double, double)

public static extern void ArcNegative(ContextHandle cr, double xc, double yc, double radius, double angle1, double angle2)

Parameters

cr ContextHandle
xc double
yc double
radius double
angle1 double
angle2 double

Clip(ContextHandle)

public static extern void Clip(ContextHandle cr)

Parameters

cr ContextHandle

ClipExtents(ContextHandle, out double, out double, out double, out double)

public static extern void ClipExtents(ContextHandle cr, out double x1, out double y1, out double x2, out double y2)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double

ClipPreserve(ContextHandle)

public static extern void ClipPreserve(ContextHandle cr)

Parameters

cr ContextHandle

ClosePath(ContextHandle)

public static extern void ClosePath(ContextHandle cr)

Parameters

cr ContextHandle

CopyPage(ContextHandle)

public static extern void CopyPage(ContextHandle cr)

Parameters

cr ContextHandle

CopyPath(ContextHandle)

public static extern PathOwnedHandle CopyPath(ContextHandle cr)

Parameters

cr ContextHandle

Returns

PathOwnedHandle

CopyPathFlat(ContextHandle)

public static extern PathOwnedHandle CopyPathFlat(ContextHandle cr)

Parameters

cr ContextHandle

Returns

PathOwnedHandle

Create(SurfaceHandle)

public static extern ContextOwnedHandle Create(SurfaceHandle target)

Parameters

target SurfaceHandle

Returns

ContextOwnedHandle

CurveTo(ContextHandle, double, double, double, double, double, double)

public static extern void CurveTo(ContextHandle cr, double x1, double y1, double x2, double y2, double x3, double y3)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double

Destroy(IntPtr)

public static extern void Destroy(IntPtr handle)

Parameters

handle IntPtr

DeviceToUser(ContextHandle, ref double, ref double)

public static extern void DeviceToUser(ContextHandle cr, ref double x, ref double y)

Parameters

cr ContextHandle
x double
y double

DeviceToUserDistance(ContextHandle, ref double, ref double)

public static extern void DeviceToUserDistance(ContextHandle cr, ref double dx, ref double dy)

Parameters

cr ContextHandle
dx double
dy double

Fill(ContextHandle)

public static extern void Fill(ContextHandle cr)

Parameters

cr ContextHandle

FillExtents(ContextHandle, out double, out double, out double, out double)

public static extern void FillExtents(ContextHandle cr, out double x1, out double y1, out double x2, out double y2)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double

FillPreserve(ContextHandle)

public static extern void FillPreserve(ContextHandle cr)

Parameters

cr ContextHandle

FontExtents(ContextHandle, out FontExtents)

public static extern void FontExtents(ContextHandle cr, out FontExtents extents)

Parameters

cr ContextHandle
extents FontExtents

GetAntialias(ContextHandle)

public static extern Antialias GetAntialias(ContextHandle cr)

Parameters

cr ContextHandle

Returns

Antialias

GetCurrentPoint(ContextHandle, out double, out double)

public static extern void GetCurrentPoint(ContextHandle cr, out double x, out double y)

Parameters

cr ContextHandle
x double
y double

GetDash(ContextHandle, double[], out double)

public static extern void GetDash(ContextHandle cr, double[] dashes, out double offset)

Parameters

cr ContextHandle
dashes double[]
offset double

GetDashCount(ContextHandle)

public static extern int GetDashCount(ContextHandle cr)

Parameters

cr ContextHandle

Returns

int

GetFillRule(ContextHandle)

public static extern FillRule GetFillRule(ContextHandle cr)

Parameters

cr ContextHandle

Returns

FillRule

GetFontFace(ContextHandle)

public static extern FontFaceUnownedHandle GetFontFace(ContextHandle cr)

Parameters

cr ContextHandle

Returns

FontFaceUnownedHandle

GetFontMatrix(ContextHandle, MatrixHandle)

public static extern void GetFontMatrix(ContextHandle cr, MatrixHandle matrix)

Parameters

cr ContextHandle
matrix MatrixHandle

GetFontOptions(ContextHandle, FontOptionsHandle)

public static extern void GetFontOptions(ContextHandle cr, FontOptionsHandle options)

Parameters

cr ContextHandle
options FontOptionsHandle

GetGType()

Calls native function cairo_gobject_context_get_type.

public static extern nuint GetGType()

Returns

nuint

Transfer ownership: None Nullable: False

GetGroupTarget(ContextHandle)

public static extern SurfaceUnownedHandle GetGroupTarget(ContextHandle cr)

Parameters

cr ContextHandle

Returns

SurfaceUnownedHandle

GetLineCap(ContextHandle)

public static extern LineCap GetLineCap(ContextHandle cr)

Parameters

cr ContextHandle

Returns

LineCap

GetLineJoin(ContextHandle)

public static extern LineJoin GetLineJoin(ContextHandle cr)

Parameters

cr ContextHandle

Returns

LineJoin

GetLineWidth(ContextHandle)

public static extern double GetLineWidth(ContextHandle cr)

Parameters

cr ContextHandle

Returns

double

GetMatrix(ContextHandle, MatrixHandle)

public static extern void GetMatrix(ContextHandle cr, MatrixHandle matrix)

Parameters

cr ContextHandle
matrix MatrixHandle

GetMiterLimit(ContextHandle)

public static extern double GetMiterLimit(ContextHandle cr)

Parameters

cr ContextHandle

Returns

double

GetOperator(ContextHandle)

public static extern Operator GetOperator(ContextHandle cr)

Parameters

cr ContextHandle

Returns

Operator

GetScaledFont(ContextHandle)

public static extern ScaledFontUnownedHandle GetScaledFont(ContextHandle cr)

Parameters

cr ContextHandle

Returns

ScaledFontUnownedHandle

GetSource(ContextHandle)

public static extern PatternUnownedHandle GetSource(ContextHandle cr)

Parameters

cr ContextHandle

Returns

PatternUnownedHandle

GetTarget(ContextHandle)

public static extern SurfaceUnownedHandle GetTarget(ContextHandle cr)

Parameters

cr ContextHandle

Returns

SurfaceUnownedHandle

GetTolerance(ContextHandle)

public static extern double GetTolerance(ContextHandle cr)

Parameters

cr ContextHandle

Returns

double

HasCurrentPoint(ContextHandle)

public static extern bool HasCurrentPoint(ContextHandle cr)

Parameters

cr ContextHandle

Returns

bool

IdentityMatrix(ContextHandle)

public static extern void IdentityMatrix(ContextHandle cr)

Parameters

cr ContextHandle

InClip(ContextHandle, double, double)

public static extern bool InClip(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

Returns

bool

InFill(ContextHandle, double, double)

public static extern bool InFill(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

Returns

bool

InStroke(ContextHandle, double, double)

public static extern bool InStroke(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

Returns

bool

LineTo(ContextHandle, double, double)

public static extern void LineTo(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

Mask(ContextHandle, PatternHandle)

public static extern void Mask(ContextHandle cr, PatternHandle pattern)

Parameters

cr ContextHandle
pattern PatternHandle

MaskSurface(ContextHandle, SurfaceHandle, double, double)

public static extern void MaskSurface(ContextHandle cr, SurfaceHandle surface, double surface_x, double surface_y)

Parameters

cr ContextHandle
surface SurfaceHandle
surface_x double
surface_y double

MoveTo(ContextHandle, double, double)

public static extern void MoveTo(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

NewPath(ContextHandle)

public static extern void NewPath(ContextHandle cr)

Parameters

cr ContextHandle

NewSubPath(ContextHandle)

public static extern void NewSubPath(ContextHandle cr)

Parameters

cr ContextHandle

Paint(ContextHandle)

public static extern void Paint(ContextHandle cr)

Parameters

cr ContextHandle

PaintWithAlpha(ContextHandle, double)

public static extern void PaintWithAlpha(ContextHandle cr, double alpha)

Parameters

cr ContextHandle
alpha double

PathExtents(ContextHandle, out double, out double, out double, out double)

public static extern void PathExtents(ContextHandle cr, out double x1, out double y1, out double x2, out double y2)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double

PopGroup(ContextHandle)

public static extern PatternOwnedHandle PopGroup(ContextHandle cr)

Parameters

cr ContextHandle

Returns

PatternOwnedHandle

PopGroupToSource(ContextHandle)

public static extern void PopGroupToSource(ContextHandle cr)

Parameters

cr ContextHandle

PushGroup(ContextHandle)

public static extern void PushGroup(ContextHandle cr)

Parameters

cr ContextHandle

PushGroupWithContent(ContextHandle, Content)

public static extern void PushGroupWithContent(ContextHandle cr, Content content)

Parameters

cr ContextHandle
content Content

Rectangle(ContextHandle, double, double, double, double)

public static extern void Rectangle(ContextHandle cr, double x, double y, double width, double height)

Parameters

cr ContextHandle
x double
y double
width double
height double

RelCurveTo(ContextHandle, double, double, double, double, double, double)

public static extern void RelCurveTo(ContextHandle cr, double x1, double y1, double x2, double y2, double x3, double y3)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double

RelLineTo(ContextHandle, double, double)

public static extern void RelLineTo(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

RelMoveTo(ContextHandle, double, double)

public static extern void RelMoveTo(ContextHandle cr, double x, double y)

Parameters

cr ContextHandle
x double
y double

ResetClip(ContextHandle)

public static extern void ResetClip(ContextHandle cr)

Parameters

cr ContextHandle

Restore(ContextHandle)

public static extern void Restore(ContextHandle cr)

Parameters

cr ContextHandle

Rotate(ContextHandle, double)

public static extern void Rotate(ContextHandle cr, double angle)

Parameters

cr ContextHandle
angle double

Save(ContextHandle)

public static extern void Save(ContextHandle cr)

Parameters

cr ContextHandle

Scale(ContextHandle, double, double)

public static extern void Scale(ContextHandle cr, double sx, double sy)

Parameters

cr ContextHandle
sx double
sy double

SelectFontFace(ContextHandle, NonNullableUtf8StringHandle, FontSlant, FontWeight)

public static extern void SelectFontFace(ContextHandle cr, NonNullableUtf8StringHandle family, FontSlant slant, FontWeight weight)

Parameters

cr ContextHandle
family NonNullableUtf8StringHandle
slant FontSlant
weight FontWeight

SetAntialias(ContextHandle, Antialias)

public static extern void SetAntialias(ContextHandle cr, Antialias antialias)

Parameters

cr ContextHandle
antialias Antialias

SetDash(ContextHandle, double[], int, double)

public static extern void SetDash(ContextHandle cr, double[] dashes, int num_dashes, double offset)

Parameters

cr ContextHandle
dashes double[]
num_dashes int
offset double

SetFillRule(ContextHandle, FillRule)

public static extern void SetFillRule(ContextHandle cr, FillRule fill_rule)

Parameters

cr ContextHandle
fill_rule FillRule

SetFontFace(ContextHandle, FontFaceHandle)

public static extern void SetFontFace(ContextHandle cr, FontFaceHandle font_face)

Parameters

cr ContextHandle
font_face FontFaceHandle

SetFontMatrix(ContextHandle, MatrixHandle)

public static extern void SetFontMatrix(ContextHandle cr, MatrixHandle matrix)

Parameters

cr ContextHandle
matrix MatrixHandle

SetFontOptions(ContextHandle, FontOptionsHandle)

public static extern void SetFontOptions(ContextHandle cr, FontOptionsHandle options)

Parameters

cr ContextHandle
options FontOptionsHandle

SetFontSize(ContextHandle, double)

public static extern void SetFontSize(ContextHandle cr, double size)

Parameters

cr ContextHandle
size double

SetLineCap(ContextHandle, LineCap)

public static extern void SetLineCap(ContextHandle cr, LineCap line_cap)

Parameters

cr ContextHandle
line_cap LineCap

SetLineJoin(ContextHandle, LineJoin)

public static extern void SetLineJoin(ContextHandle cr, LineJoin line_join)

Parameters

cr ContextHandle
line_join LineJoin

SetLineWidth(ContextHandle, double)

public static extern void SetLineWidth(ContextHandle cr, double width)

Parameters

cr ContextHandle
width double

SetMatrix(ContextHandle, MatrixHandle)

public static extern void SetMatrix(ContextHandle cr, MatrixHandle matrix)

Parameters

cr ContextHandle
matrix MatrixHandle

SetMiterLimit(ContextHandle, double)

public static extern void SetMiterLimit(ContextHandle cr, double limit)

Parameters

cr ContextHandle
limit double

SetOperator(ContextHandle, Operator)

public static extern void SetOperator(ContextHandle cr, Operator op)

Parameters

cr ContextHandle
op Operator

SetScaledFont(ContextHandle, ScaledFontHandle)

public static extern void SetScaledFont(ContextHandle cr, ScaledFontHandle scaled_font)

Parameters

cr ContextHandle
scaled_font ScaledFontHandle

SetSource(ContextHandle, PatternHandle)

public static extern void SetSource(ContextHandle cr, PatternHandle source)

Parameters

cr ContextHandle
source PatternHandle

SetSourceRgb(ContextHandle, double, double, double)

public static extern void SetSourceRgb(ContextHandle cr, double red, double green, double blue)

Parameters

cr ContextHandle
red double
green double
blue double

SetSourceRgba(ContextHandle, double, double, double, double)

public static extern void SetSourceRgba(ContextHandle cr, double red, double green, double blue, double alpha)

Parameters

cr ContextHandle
red double
green double
blue double
alpha double

SetSourceSurface(ContextHandle, SurfaceHandle, double, double)

public static extern void SetSourceSurface(ContextHandle cr, SurfaceHandle surface, double x, double y)

Parameters

cr ContextHandle
surface SurfaceHandle
x double
y double

SetTolerance(ContextHandle, double)

public static extern void SetTolerance(ContextHandle cr, double tolerance)

Parameters

cr ContextHandle
tolerance double

ShowPage(ContextHandle)

public static extern void ShowPage(ContextHandle cr)

Parameters

cr ContextHandle

ShowText(ContextHandle, NonNullableUtf8StringHandle)

public static extern void ShowText(ContextHandle cr, NonNullableUtf8StringHandle utf8)

Parameters

cr ContextHandle
utf8 NonNullableUtf8StringHandle

Status(ContextHandle)

public static extern Status Status(ContextHandle cr)

Parameters

cr ContextHandle

Returns

Status

Stroke(ContextHandle)

public static extern void Stroke(ContextHandle cr)

Parameters

cr ContextHandle

StrokeExtents(ContextHandle, out double, out double, out double, out double)

public static extern void StrokeExtents(ContextHandle cr, out double x1, out double y1, out double x2, out double y2)

Parameters

cr ContextHandle
x1 double
y1 double
x2 double
y2 double

StrokePreserve(ContextHandle)

public static extern void StrokePreserve(ContextHandle cr)

Parameters

cr ContextHandle

TextExtents(ContextHandle, NonNullableUtf8StringHandle, out TextExtents)

public static extern void TextExtents(ContextHandle cr, NonNullableUtf8StringHandle utf8, out TextExtents extents)

Parameters

cr ContextHandle
utf8 NonNullableUtf8StringHandle
extents TextExtents

TextPath(ContextHandle, NonNullableUtf8StringHandle)

public static extern void TextPath(ContextHandle cr, NonNullableUtf8StringHandle utf8)

Parameters

cr ContextHandle
utf8 NonNullableUtf8StringHandle

Transform(ContextHandle, MatrixHandle)

public static extern void Transform(ContextHandle cr, MatrixHandle matrix)

Parameters

cr ContextHandle
matrix MatrixHandle

Translate(ContextHandle, double, double)

public static extern void Translate(ContextHandle cr, double tx, double ty)

Parameters

cr ContextHandle
tx double
ty double

UserToDevice(ContextHandle, ref double, ref double)

public static extern void UserToDevice(ContextHandle cr, ref double x, ref double y)

Parameters

cr ContextHandle
x double
y double

UserToDeviceDistance(ContextHandle, ref double, ref double)

public static extern void UserToDeviceDistance(ContextHandle cr, ref double dx, ref double dy)

Parameters

cr ContextHandle
dx double
dy double