Inheritance: IDisposable
コード例 #1
0
ファイル: ScaledFont.cs プロジェクト: nlhepler/mono
		public ScaledFont (FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options)
			: this (NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle), true)
		{
		}
コード例 #2
0
ファイル: Context.cs プロジェクト: knocte/gtk-sharp
 public void SetContextFontFace(FontFace value)
 {
     NativeMethods.cairo_set_font_face (handle, value == null ? IntPtr.Zero : value.Handle);
 }
コード例 #3
0
        /// <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;
        }
コード例 #4
0
        /// <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;
        }
コード例 #5
0
        /// <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;
        }
コード例 #6
0
 public ScaledFont(FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options)
 {
     handle = NativeMethods.cairo_scaled_font_create(fontFace.Handle, matrix, ctm, options.Handle);
 }
コード例 #7
0
ファイル: Context.cs プロジェクト: Tsalex71/mono-1
 public void SetContextFontFace(FontFace value)
 {
     NativeMethods.cairo_set_font_face(handle, value == null ? IntPtr.Zero : value.Handle);
 }