Mono.Cairo 1.0.5000.0 2.0.0.0 System.Object System.IDisposable This is the main object when drawing with Cairo.

`// This example sets up a surface on a GTK window and draws an arc to it. // More examples are available in the samples directory in mcs/classes/Mono.Cairo // // Compile like this: // mcs sample.cs -pkg:gtk-sharp-2.0 -r:Mono.Cairo // using System; using System.Reflection; using System.Runtime.InteropServices; using Cairo; using Gtk; public class GtkCairo { static DrawingArea a; static void Main () { Application.Init (); Gtk.Window w = new Gtk.Window ("Mono.Cairo Circles demo"); a = new CairoGraphic (); Box box = new HBox (true, 0); box.Add (a); w.Add (box); w.Resize (500,500); w.ShowAll (); Application.Run (); } } public class CairoGraphic : DrawingArea { static readonly double M_PI = 3.14159265358979323846; static void draw (Cairo.Context gr, int width, int height) { double xc = 0.5; double yc = 0.5; double radius = 0.4; double angle1 = 45.0 * (M_PI/180.0); /* angles are specified */ double angle2 = 180.0 * (M_PI/180.0); /* in radians */ gr.Scale (width, height); gr.LineWidth = 0.04; gr.Arc (xc, yc, radius, angle1, angle2); gr.Stroke (); /* draw helping lines */ gr.Color = new Color(1, 0.2, 0.2, 0.6); gr.Arc (xc, yc, 0.05, 0, 2*M_PI); gr.Fill (); gr.LineWidth = 0.03; gr.Arc (xc, yc, radius, angle1, angle1); gr.LineTo (new PointD(xc, yc)); gr.Arc (xc, yc, radius, angle2, angle2); gr.LineTo (new PointD(xc, yc)); gr.Stroke (); } protected override bool OnExposeEvent (Gdk.EventExpose args) { Gdk.Window win = args.Window; #if OLD_SYSTEMS // // For old versions of Gtk# (before 2.8), you need the helper class // available in gtk-sharp/sample/GtkCairo.cs // Cairo.Context g = Gdk.Graphics.CreateDrawable (win); #else // // Starting with Gtk 2.8 Gtk has direct support for // Cairo, as its built on top of it, on older // versions, a helper routine is used // Context g = Gdk.CairoHelper.Create (args.Window); #endif int x, y, w, h, d; win.GetGeometry(out x, out y, out w, out h, out d); draw (g, w, h); return true; } }`

- Constructor
  The on which this Context object will render everything.
  Creates a object using the provided surface.

  /* Example assumes you have already set up the drawable as per the main code snippet shown*/

  Cairo.XlibSurface s = new Cairo.XlibSurface (Xdisplay, Xdrawable, Xvisual, w, h);

  Cairo.Context g = new Cairo.Context (s);

  Note that the can be a or .
  1.0.5000.0
  2.0.0.0
- Constructor
  The raw C object.
  This constructor accepts a Cairo graphics object coming in from the C API and wraps it into our class.
  1.0.5000.0
  2.0.0.0
- Property
  Cairo.Antialias The antialiasing mode of the rasterizer used for drawing shapes. The antialiasing mode This value is a hint, and a particular backend may or may not support a particular value. At the current time, no backend supports when drawing shapes. Note that this option does not affect text rendering. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` path to be appended Appends the path onto the current path. This Function appends the path onto the current path. The path may be either the return value from one of or or it may be constructed manually.
- Method
  System.Void `` `` `` `` `` X position of the center of the arc Y position of the center of the arc the radius of the arc the start angle, in radians the end angle, in radians Adds an arc from to to the current path.

  If there is a current point, that point is connected to the start of the arc by a straight line segment. Angles are measured in radians with an angle of 0 along the X axis and an angle of %M_PI radians (90 degrees) along the Y axis, so with the default transformation matrix, positive angles are clockwise. (To convert from degrees to radians, use degrees * (M_PI / 180.) ) This function gives the arc in the direction of increasing angle; see to get the arc in the direction of decreasing angle.

  A full arc is drawn as a circle. To make an oval arc, you can scale the current transformation matrix by different amounts in the X and Y directions.

  `double xc = 0.5; double yc = 0.5; double radius = 0.4; double angle1 = 45.0 * (M_PI/180.0); double angle2 = 180.0 * (M_PI/180.0); gr.Scale (width, height); gr.LineWidth = 0.04; gr.Arc (xc, yc, radius, angle1, angle2); gr.Stroke ();`

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` `` `` `` X position of the center of the arc Y position of the center of the arc the radius of the arc the start angle, in radians the end angle, in radians Adds an arc from to to the current path.

  The function behaves identically to except that instead of giving the arc in the direction of increasing angle, it gives the arc in the direction of decreasing angle.

  `double xc = 0.5; double yc = 0.5; double radius = 0.4; double angle1 = 45.0 * (M_PI/180.0); double angle2 = 180.0 * (M_PI/180.0); gr.Scale (width, height); gr.LineWidth = 0.04; gr.ArcNegative (xc, yc, radius, angle1, angle2); gr.Stroke ();`

  1.0.5000.0
  2.0.0.0
- Method
  System.Void Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by and according to the current fill rule (see ).

  After calling this method, the current path will be cleared from the cairo context.

  The current clip region affects all drawing operations by effectively masking out any changes to the surface that are outside the current clip region.

  Calling this method can only make the clip region smaller, never larger. But the current clip is part of the graphics state, so a temporary restriction of the clip region can be achieved by calling this method within a / pair. The only other means of increasing the size of the clip region is .

  1.0.5000.0
  2.0.0.0
- Method
  System.Void Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by and according to the current fill rule (see ). Unlike Cairo.Context.Clip(), Cairo.Context.ClipPreserve() preserves the path within the cairo context. The current clip region affects all drawing operations by effectively masking out any changes to the surface that are outside the current clip region. Calling Cairo.Context.Clip() can only make the clip region smaller, never larger. But the current clip is part of the graphics state, so a temporary restriction of the clip region can be achieved by calling Cairo.Context.Clip() within a Cairo.Context.Save()/Cairo.Context.Restore() pair. The only other means of increasing the size of the clip region is Cairo.Context.ResetClip(). 1.0.5000.0 2.0.0.0
- Method
  System.Void Closes a path so it can be stroked. `gr.Scale (width, height); gr.LineWidth = 0.04; gr.MoveTo ( new PointD (0.5, 0.1) ); gr.LineTo ( new PointD (0.9, 0.9) ); gr.RelLineTo ( new Distance (-0.4, 0.0) ); gr.CurveTo ( new PointD (0.2, 0.9), new PointD ( 0.2, 0.5), new PointD (0.5, 0.5)); gr.ClosePath ();` 1.0.5000.0 2.0.0.0
- Property
  Cairo.Color The current Color in the drawing context. the Color 1.0.5000.0 2.0.0.0
- Property
  Cairo.Color Sets the source pattern to be the given opaque color. To be added.

  Sets the context source color to be the opaque color specified. This opaque color will then be used for any subsequent drawing operation until a new source pattern is set.

  The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

  System.Obsolete("Use Color property")
  1.0.5000.0
  2.0.0.0
- Property
  Cairo.FontFace To be added. To be added. 1.0.5000.0 2.0.0.0
- Method
  System.Void Emits the current page for backends that support multiple pages, without clearing it.. The contents of the current page will be retained for the next page too. Use if you want to get an empty page after the emission. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  Cairo.Path Creates a copy of the current path and returns it as . Copy of current path This function creates a copy of the current path and returns it to the user as .
- Method
  1.0.5000.0
  2.0.0.0
  Cairo.Path Gets a flattened copy of the current path and returns it to the user as a . Flattened copy of current path. This function is like except that any curves in the path will be approximated with piecewise-linear approximations, (accurate to within the current tolerance value). That is, the result is guaranteed to not have any elements of type which will instead be replaced by a series of elements.
- Property
  Cairo.PointD Gets the current point of the current path, which is conceptually the final point reached by the path so far. the current point The current point is returned in the user-space coordinate system. If there is no defined current point then x and y will both be set to 0.0. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` first control point second control point third control point Adds a cubic Bézier spline to the path from the current point to position (x3, y3) in user-space coordinates, using (x1, y1) and (x2, y2) as the control points. After this call the current point will be (p3.X, p3.Y). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` `` `` `` the X coordinate of the first control point the Y coordinate of the first control point the X coordinate of the second control point the Y coordinate of the second control point the X coordinate of the end of the curve the Y coordinate of the end of the curve Adds a cubic Bézier spline to the path from the current point to position (x3, y3) in user-space coordinates, using (x1, y1) and (x2, y2) as the control points. After this call the current point will be (x3, y3). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X value of coordinate Y value of coordinate Transform a coordinate from device space to user space by multiplying the given point by the inverse of the current transformation matrix (CTM). None 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X value of the coordinate Y value of the coordinate Transform a distance vector from device space to user space. This function is similar to except that the translation components of the inverse CTM will be ignored when transforming (dx,dy). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` When false, returning and "Cairo.Context: called from finalization thread, programmer is missing a call to Dispose" is written Decreases the reference count on cr by one. If the result is zero, then cr and all associated resources are freed. To be added. 1.0.5000.0 2.0.0.0
- Method
  System.Void A drawing operator that fills the current path according to the current fill rule. After cairo_fill, the current path will be cleared from the cairo context. See and . 1.0.5000.0 2.0.0.0
- Method
  Cairo.Rectangle Computes a bounding box in user coordinates covering the area that would be affected by a call to . The rectangle describing the area that would be affected. If the current path is empty, returns an empty rectangle (0,0, 0,0). Surface dimensions and clipping are not taken into account. 1.0.5000.0 2.0.0.0
- Method
  System.Void A drawing operator that fills the current path according to the current fill rule. Unlike , this preserves the path within the cairo context. 1.0.5000.0 2.0.0.0
- Property
  Cairo.FillRule Get or set the fill rule. See The fill rule is used to determine which regions are inside or outside a complex (potentially self-intersecting) path. The current fill rule affects both and . See for details on the semantics of each available fill rule. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Void To be added. To be added.
- Property
  Cairo.FontExtents Gets the font extents for the currently selected font. the FontExtents 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` a font family name, encoded in UTF-8 the FontSlant the FontWeight Selects a family and style of font from a simplified description as a family name, slant and weight. This function is meant to be used only for applications with simple font needs: Cairo doesn't provide for operations such as listing all available fonts on the system, and it is expected that most applications will need to use a more comprehensive font handling and text layout library in addition to Cairo. 1.0.5000.0 2.0.0.0 System.Obsolete("Use SelectFontFace() instead.")
- Property
  Cairo.Matrix The current font matrix a matrix describing a transform to be applied to the current font. The font matrix gives a transformation from the design space of the font (in this space, the em-square is 1 unit by 1 unit) to user space. Normally, a simple scale is used (see ), but a more complex font matrix can be used to shear the font or stretch it unequally along the two axes 1.0.5000.0 2.0.0.0
- Property
  Cairo.FontOptions A set of custom font rendering options font options to use Rendering options are derived by merging these options with the options derived from underlying surface; if the value in options has a default value (like Cairo.Antialias.Default), then the value from the surface is used. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` size of the font. Sets the current font matrix to a scale by a factor of size, replacing any font matrix previously set. This results in a font size of size user space units. (More precisely, this matrix will result in the font's em-square being a size by size square in user space.) If text is drawn without a call to , the default font size is 10.0. 1.0.5000.0 2.0.0.0 System.Obsolete("Use SetFontSize() instead.")
- Property
  System.Obsolete("Use SetFontSize() instead.")
  System.Double Set the size of the font for the context. the new font size 1.0.5000.0 2.0.0.0
- Method
  Cairo.TextExtents `` an array of Gets the extents for an array of glyphs. The extents of an array of glyphs as . Note that whitespace glyphs do not contribute to the size of the rectangle. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` array of glyphs to show Adds closed paths for the glyphs to the current path. None 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 System.Obsolete("The matrix argument was never used, use GlyphPath(Glyphs []) instead")
- Property
  Cairo.Surface Gets the current destination surface for the context. the target surface Gets the current destination surface for the context. This is either the original target surface or the target surface for the current group as started by the most recent call to . 1.0.5000.0 2.0.0.0
- Property
  System.IntPtr Internal handle to the native cairo object pointer to native object 1.0.5000.0 2.0.0.0
- Method
  System.Void Resets the current transformation matrix. Resets the current transformation matrix (CTM) by setting it equal to the identity matrix. That is, the user-space and device-space axes will be aligned and one user-space unit will transform to one device-space unit. 1.0.5000.0 2.0.0.0
- Method
  System.Boolean `` `` X coordinate of the point to test Y coordinate of the point to test Tests whether the given point is inside the area that would be affected by a operation given the current path and filling parameters. True if the point is inside, or false if outside. Surface dimensions and clipping are not taken into account. 1.0.5000.0 2.0.0.0
- Method
  System.Boolean `` `` X coordinate of the point to test Y coordinate of the point to test Tests whether the given point is inside the area that would be affected by a operation given the current path and stroking parameters. True if the point is inside, or false if outside. Surface dimensions and clipping are not taken into account. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X component of distance vector to be transformed. Y component of distance vector to be transformed. Transform the specified distance vector by the inverse of the current transformation matrix (CTM).

  This is accomplished by multiplying the specified point by the inverse of the CTM, while ignoring the translation components of the CTM

  Equivalent to cairo_device_to_user_distance().

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` X value of the point to be transformed. Y value of the point to be transformed. Transform the specified point by the inverse of the current transformation matrix (CTM).

  This is accomplished by multiplying the given point by the inverse of the CTM

  Equivalent to cairo_device_to_user().

  1.0.5000.0
  2.0.0.0
- Property
  Cairo.LineCap Get or set the line cap style. See . 1.0.5000.0 2.0.0.0
- Property
  Cairo.LineJoin Get or set the line join style. See . 1.0.5000.0 2.0.0.0
- Method
  System.Void `` end of the new line Adds a line to the path from the current point to position (x, y) in user-space coordinates. After this call the current point will be (p.X, p.Y). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` the X coordinate of the end of the new line the Y coordinate of the end of the new line Adds a line to the path from the current point to position (x, y) in user-space coordinates. After this call the current point will be (x, y). 1.0.5000.0 2.0.0.0
- Property
  System.Double Get or set the width of the stroke. The width of the stroke. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` a Pattern A drawing operator that paints the current source using the alpha channel of as a mask. Opaque areas of mask are painted with the source, transparent areas are not painted. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` a Surface X coordinate at which to place the origin of Y coordinate at which to place the origin of A drawing operator that paints the current source using the alpha channel of as a mask. Opaque areas of surface are painted with the source, transparent areas are not painted. 1.0.5000.0 2.0.0.0
- Property
  Cairo.Matrix Get or set the current transformation matrix (CTM). the CTM 1.0.5000.0 2.0.0.0
- Property
  System.Double Get or set the miter limit (the value beyond which joins are no longer mitered). the MiterLimit 1.0.5000.0 2.0.0.0
- Method
  System.Void `` the new position If the current subpath is not empty, begin a new subpath. After this call the current point will be (p.X, p.Y). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` the X coordinate of the new position the Y coordinate of the new position If the current subpath is not empty, begin a new subpath. After this call the current point will be (x, y). 1.0.5000.0 2.0.0.0
- Method
  System.Void Clears the current path. After this call there will be no current point. 1.0.5000.0 2.0.0.0
- Method
  System.Void Begins a new sub-path. Note that the existing path is not affected. After this call there will be no current point. In many cases, this call is not needed since new sub-paths are frequently started with . A call to is particularly useful when beginning a new sub-path with one of the calls. This makes things easier as it is no longer necessary to manually compute the arc's initial coordinates for a call to . 1.0.5000.0 2.0.0.0
- Property
  Cairo.Operator The current Operator for the drawing context. the Operator 1.0.5000.0 2.0.0.0
- Method
  System.Void A drawing operator that paints the current source everywhere within the current clip region. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` alpha value, between 0 (transparent) and 1 (opaque) A drawing operator that paints the current source everywhere within the current clip region using a mask of constant alpha value . The effect is similar to , but the drawing is faded out using the alpha value. 1.0.5000.0 2.0.0.0
- Property
  Cairo.Pattern See . See . 1.0.5000.0 2.0.0.0
- Method
  Cairo.Pattern Terminates the redirection begun by a call to and returns a new pattern containing the results of all drawing operations performed to the group. A newly created (surface) pattern containing the results of all drawing operations performed to the group. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. The function calls , (balancing a call to by the PopGroup function), so that any changes to the graphics state will not be visible outside the group. 1.0.5000.0 2.0.0.0
- Method
  System.Void Terminates the redirection begun by a call to and installs the resulting pattern as the source pattern in the given cairo context. The function calls , (balancing a call to by the PopGroup function), so that any changes to the graphics state will not be visible outside the group. 1.0.5000.0 2.0.0.0
- Method
  System.Void Temporarily redirects drawing to an intermediate surface known as a group. Temporarily redirects drawing to an intermediate surface known as a group. The redirection lasts until the group is completed by a call to or . These calls provide the result of any drawing to the group as a pattern, (either as an explicit object, or set as the source pattern). This group functionality can be convenient for performing intermediate compositing. One common use of a group is to render objects as opaque within the group, (so that they occlude each other), and then blend the result with translucence onto the destination. Groups can be nested arbitrarily deep by making balanced calls to /. Each call pushes/pops the new target group onto/from a stack. The function calls so that any changes to the graphics state will not be visible outside the group, (the functions call ). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` a indicating the type of group that will be created Temporarily redirects drawing to an intermediate surface known as a group. The group will have a content type of content. Temporarily redirects drawing to an intermediate surface known as a group. The redirection lasts until the group is completed by a call to or . These calls provide the result of any drawing to the group as a pattern, (either as an explicit object, or set as the source pattern). The group will have a content type of content. The ability to control this content type is the only distinction between this function and which you should see for a more detailed description of group rendering. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` To be added. Adds a closed-subpath rectangle of the given size to the current path in user-space coordinates. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` point at which to draw rectangle's width rectangle's height Draw a rectangle at with and . 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` `` the X coordinate of the top left corner of the rectangle the Y coordinate of the top left corner of the rectangle the width of the rectangle the height of the rectangle Adds a closed-subpath rectangle of the given size to the current path at position (x, y) in user-space coordinates. 1.0.5000.0 2.0.0.0
- Property
  1.0.5000.0
  2.0.0.0
  System.UInt32 Returns the current reference count. the current reference count If the object is a nil object, 0 will be returned.
- Method
  System.Void `` `` `` offset to the first control point offset to the second control point offset to the end of the curve Relative-coordinate version of .

  All offsets are relative to the current point. Adds a cubic Bézier spline to the path from the current point to a point offset from the current point by (d3), using points offset by (d1) and (d2) as the control points. After this call the current point will be offset by (d3.Dx, d3.Dy).

  Given a current point of (x, y), Cairo.Context.RelCurveTo (d1, d2, d3) is logically equivalent to Cairo.Context.CurveTo (x + d1.Dx, y + d1.Dy, x + d2.Dx, y + d2.Dy, x + d3.Dx, y + d3.Dy).

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` `` `` `` `` the X offset to the first control point the Y offset to the first control point the X offset to the second control point the Y offset to the second control point the X offset to the end of the curve the Y offset to the end of the curve Relative-coordinate version of .

  All offsets are relative to the current point. Adds a cubic Bézier spline to the path from the current point to a point offset from the current point by (dx3, dy3), using points offset by (dx1, dy1) and (dx2, dy2) as the control points. After this call the current point will be offset by (dx3, dy3).

  Given a current point of (x, y), Cairo.Context.RelCurveTo (dx1, dy1, dx2, dy2, dx3, dy3) is logically equivalent to Cairo.Context.CurveTo (x + dx1, y + dy1, x + dx2, y + dy2, x + dx3, y + dy3).

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` the offset to the end of the new line Relative-coordinate version of . Adds a line to the path from the current point to a point that is offset from the current point by (d.Dx, d.Dy) in user space. After this call the current point will be offset by (d.Dx, d.Dy). Given a current point of (x, y), Cairo.Context.RelLineTo (d) is logically equivalent to Cairo.Context.LineTo (x + d.Dx, y + d.Dy). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` the X offset to the end of the new line the Y offset to the end of the new line Relative-coordinate version of . Adds a line to the path from the current point to a point that is offset from the current point by (dx, dy) in user space. After this call the current point will be offset by (dx, dy). Given a current point of (x, y), Cairo.Context.RelLineTo (dx, dy) is logically equivalent to Cairo.Context.LineTo (x + dx, y + dy). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` offset If the current subpath is not empty, begin a new subpath. After this call the current point will offset by (d.Dx, d.Dy). Given a current point of (x, y), Cairo.Context.RelMoveTo (d) is logically equivalent to Cairo.Context.MoveTo (x + d.Dx, y + d.Dy). 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` the X offset the Y offset If the current subpath is not empty, begin a new subpath. After this call the current point will offset by (dx, dy). Given a current point of (x, y), Cairo.Context.RelMoveTo (dx, dy) is logically equivalent to Cairo.Context.MoveTo (x + dx, y + dy). 1.0.5000.0 2.0.0.0
- Method
  System.Void Reset the current clip region to its original, unrestricted state. That is, set the clip region to an infinitely large shape containing the target surface. Equivalently, if infinity is too hard to grasp, one can imagine the clip region being reset to the exact bounds of the target surface. Note that code meant to be reusable should not call Cairo.Context.ResetClip() as it will cause results unexpected by higher-level code which calls Cairo.Context.Clip(). Consider using Cairo.Context.Save() and Cairo.Context.Restore() around Cairo.Context.Clip() as a more robust means of temporarily restricting the clip region. 1.0.5000.0 2.0.0.0
- Method
  System.Void Restores the object to the state saved by a preceding call to and removes that state from the stack of saved states. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` angle (in radians) by which the user-space axes will be rotated. Modifies the current transformation matrix (CTM) by rotating the user-space axes by radians. The rotation of the axes takes places after any existing transformation of user space. The rotation direction for positive angles is from the positive X axis toward the positive Y axis. 1.0.5000.0 2.0.0.0
- Method
  System.Void Makes a copy of the current state of the object and saves it on an internal stack of saved states. When is called, @cr will be restored to the saved state. Multiple calls to and can be nested; each call to restores the state from the matching paired . 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` scale factor for the X dimension scale factor for the Y dimension Modifies the current transformation matrix (CTM) by scaling the X and Y user-space axes by and respectively. The scaling of the axes takes place after any existing transformation of user space. 1.0.5000.0 2.0.0.0
- Property
  1.0.5000.0
  2.0.0.0
  Cairo.ScaledFont Gets or sets the current font face, font matrix, and font options. the ScaledFont Returns the current scaled font.
- Method
  System.Void `` `` `` a font family name, encoded in UTF-8 the slant for the font the weight for the font Selects a family and style of font from a simplified description as a family name, slant and weight. This function is meant to be used only for applications with simple font needs: Cairo doesn't provide for operations such as listing all available fonts on the system, and it is expected that most applications will need to use a more comprehensive font handling and text layout library in addition to cairo. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` length of on and off portions the offset to begin the stroke Sets the dash pattern to be used by . A dash pattern is specified by dashes, an array of positive values. Each value provides the user-space length of alternate "on" and "off" portions of the stroke. The offset specifies an offset into the pattern at which the stroke begins. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` the new font size, in user space units Sets the current font matrix to a scale by a factor of , replacing any font matrix previously set with or . This results in a font size of user space units. (More precisely, this matrix will result in the font's em-square being a scale by scale square in user space.) 1.0.5000.0 2.0.0.0
- Method
  System.Void `` a surface to be used to set the source pattern This is a convenience function for creating a pattern from surface and setting it as the source in cr with . 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` a surface to be used to set the source pattern User-space X coordinate for surface origin User-space Y coordinate for surface origin This is a convenience function for creating a pattern from surface and setting it as the source in cr with . The x and y parameters give the user-space coordinate at which the surface origin should appear. (The surface origin is its upper-left corner before any transformation has been applied.) The x and y patterns are negated and then set as translation values in the pattern matrix. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` red component of color green component of color blue component of color Sets the source pattern to an opaque color. This opaque color will then be used for any subsequent drawing operation until a new source pattern is set. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` `` red component of color green component of color blue component of color alpha component of color Sets the source pattern to a translucent color. This color will then be used for any subsequent drawing operation until a new source pattern is set. The color and alpha components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` a surface to be used to set the source pattern User-space X coordinate for surface origin User-space Y coordinate for surface origin This is a convenience function for creating a pattern from a surface and setting it as the source.

  The x and y parameters give the user-space coordinate at which the surface origin should appear. (The surface origin is its upper-left corner before any transformation has been applied.) The x and y patterns are negated and then set as translation values in the pattern matrix.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` array of glyphs to show A drawing operator that generates the shape from an array of glyphs, rendered according to the current font face, font size (font matrix), and font options. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` Obsolete array of glyphs to show A drawing operator that generates the shape from an array of glyphs, rendered according to the current font face, font size (font matrix), and font options. 1.0.5000.0 2.0.0.0 System.Obsolete("The matrix argument was never used, use ShowGlyphs(Glyphs []) instead")
- Method
  System.Void Emits and clears the current page for backends that support multiple pages.. Use if you do not want to clear the page. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` the text to show A drawing operator that generates the shape from a string of UTF-8 characters, rendered according to the current font_face, font_size (font_matrix), and font_options.

  This function first computes a set of glyphs for the string of text. The first glyph is placed so that its origin is at the current point. The origin of each subsequent glyph is offset from that of the previous glyph by the advance values of the previous glyph.

  After this call the current point is moved to the origin of where the next glyph would be placed in this same progression. That is, the current point will be at the origin of the final glyph offset by its advance values. This allows for easy display of a single logical string with multiple calls to Cairo.Context.ShowText().

  NOTE: The Cairo.Context.ShowText() function call is part of what the cairo designers call the "toy" text API. It is convenient for short demos and simple programs, but it is not expected to be adequate for the most serious of text-using applications. See for the "real" text display API in cairo.

  1.0.5000.0
  2.0.0.0
- Property
  Cairo.Pattern Sets the source pattern within graphics object to . A to be used as the source for subsequent drawing operations. This pattern will then be used for any subsequent drawing operation until a new source pattern is set. 1.0.5000.0 2.0.0.0
- Property
  Cairo.Status Get the internal status of Cairo. the Status 1.0.5000.0 2.0.0.0
- Method
  System.Void A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. After cairo_stroke, the current path will be cleared from the cairo context. See , , , , and . 1.0.5000.0 2.0.0.0
- Method
  Cairo.Rectangle Computes a bounding box in user coordinates covering the area that would be affected by a call to using the current stroke parameters. The rectangle describing the area that would be affected. If the current path is empty, returns an empty rectangle (0,0, 0,0). Surface dimensions and clipping are not taken into account. 1.0.5000.0 2.0.0.0
- Method
  System.Void A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. Unlike , it preserves the path within the cairo context. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Void To be added. To be added.
- Property
  Cairo.Surface Gets the target surface for the cairo context as passed to . the target surface. 1.0.5000.0 2.0.0.0
- Method
  Cairo.TextExtents `` a string of text, encoded in UTF-8 Gets the extents for a string of text. the TextExtents

  The extents describe a user-space rectangle that encloses the "inked" portion of the text, (as it would be drawn by ). Additionally, the and values indicate the amount by which the current point would be advanced by .

  Note that whitespace characters do not directly contribute to the size of the rectangle (TextExtents.Width and TextExtents.Height). They do contribute indirectly by changing the position of non-whitespace characters. In particular, trailing whitespace characters are likely to not affect the size of the rectangle, though they will affect the and values.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` a String Adds closed paths for text to the current path. Adds closed paths for text to the current path. The generated path if filled, achieves an effect similar to that of . 1.0.5000.0 2.0.0.0
- Property
  System.Double Sets the tolerance used when converting paths into trapezoids. the tolerance, in device units (typically pixels) Curved segments of the path will be subdivided until the maximum deviation between the original path and the polygonal approximation is less than the tolerance. The default value is 0.1. A larger value will give better performance, a smaller value, better appearance. (Reducing the value from the default value of 0.1 is unlikely to improve appearance significantly.) 1.0.5000.0 2.0.0.0
- Method
  System.Void `` The affine transformation to tranform by. Transform the CTM (Current Transformation Matrix) by the specified affine transformation matrix. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X component of distance vector to be transformed. Y component of distance vector to be transformed. Transform the specified distance vector by the current transformation matrix (CTM).

  This is accomplished by multiplying the specified point by the CTM, while ignoring the translation components of the CTM

  Equivalent to cairo_user_to_device_distance().

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` X value of point to be transformed. Y value of point to be transformed. Transform the specified point by the current transformation matrix (CTM).

  This is accomplished by multiplying the given point by the CTM

  Equivalent to cairo_user_to_device().

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` amount to translate in the X direction amount to translate in the Y direction Modifies the current transformation matrix (CTM) by translating the user-space origin by (tx, ty).

  This offset is interpreted as a user-space coordinate according to the CTM in place before the new call to cairo_translate. In other words, the translation of the user-space origin takes place after any existing transformation.

  `image = new ImageSurface ("data/e.png"); w = image.Width; h = image.Height; gr.Translate (0.5, 0.5); gr.Rotate (45* M_PI/180); gr.Scale (1.0/w, 1.0/h); gr.Translate (-0.5*w, -0.5*h); image.Show (gr, 0, 0); image.Destroy ();`

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` `` X value of coordinate Y value of coordinate Transform a coordinate from user space to device space by multiplying the given point by the current transformation matrix. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X component of a distance vector Y component of a distance vector Transform a distance vector from user space to device space. This function is similar to except that the translation components of the CTM will be ignored when transforming (dx,dy). 1.0.5000.0 2.0.0.0