Cairo.Context.Rectangle C# (CSharp) Метод

Rectangle() публичный Метод

public Rectangle ( PointD p, double width, double height ) : void
p PointD
width double
height double
Результат void
        public void Rectangle(PointD p, double width, double height)
        {
            Rectangle (p.X, p.Y, width, height);
        }

Same methods

Context::Rectangle ( Rectangle rectangle ) : void
Context::Rectangle ( double x, double y, double width, double height ) : void

Usage Example

Пример #1
0
        void ExposeTitle(Cairo.Context c)
        {
            // The primary title background
            c.SetSourceRGBA(0, 0, 0, 0.3);
            c.Rectangle(0, m_titleOffset, this.Allocation.Width, m_titleHeight);
            c.Fill();

            // The title shadow (lip)
            c.SetSourceRGBA(0, 0, 0, 0.1);
            c.Rectangle(0, m_titleOffset + m_titleHeight, this.Allocation.Width, m_titleLip);
            c.Fill();

            // Paint the title text
            using (var p = Pango.CairoHelper.CreateLayout(c))
            {
                int w = 0, h = 0, pad = 0;

                p.SetText(m_Title);
                p.GetPixelSize(out w, out h);
                pad = (m_titleHeight - h) / 2;
                c.MoveTo(pad, m_titleOffset + pad);
                c.SetSourceRGB(1.0, 1.0, 1.0);
                Pango.CairoHelper.ShowLayout(c, p);
            }
        }
All Usage Examples Of Cairo.Context::Rectangle