public ScaledFont (FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options) : this (NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle), true) { }
public void SetContextFontFace(FontFace value) { NativeMethods.cairo_set_font_face (handle, value == null ? IntPtr.Zero : value.Handle); }
/// <summary> /// Creates a new GdiRenderObject instance. /// </summary> /// <param name="text">The text to draw.</param> /// <param name="font">The font to use to render the text.</param> /// <param name="bounds">The location and size to draw the text.</param> /// <param name="fill"> /// The brush used to fill the path when the state is <see cref="RenderState.Normal"/>. /// </param> /// <param name="highlightFill"> /// The brush used to fill the path when the state is <see cref="RenderState.Highlighted"/>. /// </param> /// <param name="selectFill"> /// The brush used to fill the path when the state is <see cref="RenderState.Selected"/>. /// </param> /// <param name="outline"> /// The pen used to outline the path when the state is <see cref="RenderState.Normal"/>. /// </param> /// <param name="highlightOutline"> /// The pen used to outline the path when the state is <see cref="RenderState.Highlighted"/>. /// </param> /// <param name="selectOutline"> /// The pen used to outline the path when the state is <see cref="RenderState.Selected"/>. /// </param> public CairoRenderObject(String text, FontFace font, Rectangle bounds, StyleBrush fill, StyleBrush highlightFill, StyleBrush selectFill, StylePen outline, StylePen highlightOutline, StylePen selectOutline) { _state = RenderState.Normal; Path = null; Image = null; Bounds = new Rectangle(); AffineTransform = null; ColorTransform = null; Text = text; Font = font; Bounds = bounds; Fill = fill; HighlightFill = highlightFill; SelectFill = selectFill; Outline = outline; HighlightOutline = highlightOutline; SelectOutline = selectOutline; Line = null; HighlightLine = null; SelectLine = null; }
/// <summary> /// Creates a new GdiRenderObject instance. /// </summary> /// <param name="image">The symbol to draw.</param> /// <param name="imageBounds">The location and size to draw the symbol.</param> /// <param name="transform">The affine transform applied to the symbol before drawing.</param> /// <param name="colorTransform">The color transform applied to the symbol before drawing.</param> public CairoRenderObject(Surface image, Rectangle imageBounds, CairoMatrix transform, CairoMatrix colorTransform) { _state = RenderState.Normal; Image = image; Bounds = imageBounds; AffineTransform = transform; ColorTransform = colorTransform; Path = null; Fill = null; HighlightFill = null; SelectFill = null; Line = null; HighlightLine = null; SelectLine = null; Outline = null; HighlightOutline = null; SelectOutline = null; Text = null; Font = null; }
/// <summary> /// Creates a new CairoRenderObject instance. /// </summary> /// <param name="path">The path to draw.</param> /// <param name="fill"> /// The brush used to fill the path when the state is <see cref="RenderState.Normal"/>. /// </param> /// <param name="highlightFill"> /// The brush used to fill the path when the state is <see cref="RenderState.Highlighted"/>. /// </param> /// <param name="selectFill"> /// The brush used to fill the path when the state is <see cref="RenderState.Selected"/>. /// </param> /// <param name="line"> /// The pen used to draw a line when the state is <see cref="RenderState.Normal"/>. /// </param> /// <param name="highlightLine"> /// The pen used to draw a line when the state is <see cref="RenderState.Highlighted"/>. /// </param> /// <param name="selectLine"> /// The pen used to draw a line when the state is <see cref="RenderState.Selected"/>. /// </param> /// <param name="outline"> /// The pen used to outline the path when the state is <see cref="RenderState.Normal"/>. /// </param> /// <param name="highlightOutline"> /// The pen used to outline the path when the state is <see cref="RenderState.Highlighted"/>. /// </param> /// <param name="selectOutline"> /// The pen used to outline the path when the state is <see cref="RenderState.Selected"/>. /// </param> public CairoRenderObject(Path2D path, StyleBrush fill, StyleBrush highlightFill, StyleBrush selectFill, StylePen line, StylePen highlightLine, StylePen selectLine, StylePen outline, StylePen highlightOutline, StylePen selectOutline) { _state = RenderState.Normal; Path = path; Fill = fill; HighlightFill = highlightFill; SelectFill = selectFill; Line = line; HighlightLine = highlightLine; SelectLine = selectLine; Outline = outline; HighlightOutline = highlightOutline; SelectOutline = selectOutline; Image = null; Bounds = new Rectangle(); AffineTransform = new CairoMatrix(); ColorTransform = null; Text = null; Font = null; }
public ScaledFont(FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options) { handle = NativeMethods.cairo_scaled_font_create(fontFace.Handle, matrix, ctm, options.Handle); }
public void SetContextFontFace(FontFace value) { NativeMethods.cairo_set_font_face(handle, value == null ? IntPtr.Zero : value.Handle); }