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

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

public CurveTo ( PointD p1, PointD p2, PointD p3 ) : void
p1 PointD
p2 PointD
p3 PointD
Результат void
        public void CurveTo(PointD p1, PointD p2, PointD p3)
        {
            CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
        }

Same methods

Context::CurveTo ( double x1, double y1, double x2, double y2, double x3, double y3 ) : void

Usage Example

Пример #1
0
        void DrawCurveTabs(Cairo.Context cr, Cairo.Rectangle rectangle)
        {
            if (IsSeparator)
            {
                return;
            }

            cr.MoveTo(rectangle.X, rectangle.Y);

            double bottom = rectangle.Y + rectangle.Height - 1;

            cr.CurveTo(
                rectangle.X + SpacerWidth / 2, rectangle.Y,
                rectangle.X + SpacerWidth / 2, bottom,
                rectangle.X + SpacerWidth, bottom);

            cr.LineTo(rectangle.X + rectangle.Width - SpacerWidth, bottom);

            cr.CurveTo(
                rectangle.X + rectangle.Width - SpacerWidth / 2, bottom,
                rectangle.X + rectangle.Width - SpacerWidth / 2, rectangle.Y,
                rectangle.X + rectangle.Width, rectangle.Y);

            cr.Color = (HslColor)parent.Style.Dark(StateType.Normal);
            cr.StrokePreserve();
            cr.ClosePath();
            if (Active)
            {
                cr.Color = (HslColor)parent.Style.Background(StateType.Prelight);
            }
            else if (HoverPosition.X >= 0)
            {
                double rx = rectangle.X + HoverPosition.X;
                double ry = rectangle.Y + HoverPosition.Y;
                Cairo.RadialGradient gradient = new Cairo.RadialGradient(rx, ry, rectangle.Height * 1.5,
                                                                         rx, ry, 2);
                var color = (HslColor)parent.Style.Mid(StateType.Normal);
                color.L *= 1.05;
                gradient.AddColorStop(0, color);
                color.L *= 1.07;
                gradient.AddColorStop(1, color);
                cr.Pattern = gradient;
            }
            else
            {
                cr.Color = (HslColor)parent.Style.Mid(StateType.Normal);
            }
            cr.Fill();

            cr.Save();
            cr.Translate(rectangle.X + (rectangle.Width - w) / 2, (rectangle.Height - h) / 2);
            cr.Color = (HslColor)parent.Style.Text(StateType.Normal);

            cr.ShowLayout(layout);

            cr.Restore();
        }
All Usage Examples Of Cairo.Context::CurveTo