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

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

public SetFontSize ( double scale ) : void
scale double
Результат void
        public void SetFontSize(double scale)
        {
            CheckDisposed ();
            NativeMethods.cairo_set_font_size (handle, scale);
        }

Usage Example

Пример #1
0
        //intro bottom tips
        public void IntroBottom(Cairo.Context g)
        {
            PointD p1, p2, p3, p4, s1, s2, s3, s4;

            p1 = new PointD(30, 10); p2 = new PointD(420, 10); s1 = new PointD(422, 12); s2 = new PointD(422, 88);
            p3 = new PointD(420, 90); p4 = new PointD(30, 90); s3 = new PointD(28, 88); s4 = new PointD(28, 12);

            g.Color = new Color(0.3, 0.4, 0.6, 0.8);
            g.MoveTo(p1); g.LineTo(p2); g.LineTo(s1); g.LineTo(s2); g.LineTo(p3); g.LineTo(p4); g.LineTo(s3); g.LineTo(s4); g.LineTo(p1);
            g.ClosePath(); g.LineWidth = 1; g.Stroke();

            g.MoveTo(p1); g.LineTo(p2); g.LineTo(s1); g.LineTo(s2); g.LineTo(p3); g.LineTo(p4); g.LineTo(s3); g.LineTo(s4); g.LineTo(p1);
            g.ClosePath();

            Cairo.Gradient pat = new Cairo.LinearGradient(80, 20, 80, 80);
            pat.AddColorStop(0, new Cairo.Color(0.3, 0.4, 0.6, 0));
            pat.AddColorStop(1, new Cairo.Color(0.3, 0.4, 0.6, 0.3));
            g.Pattern = pat;
            g.FillPreserve();


            g.Color = new Color(0, 0, 0, 0.8);
            g.SelectFontFace("", FontSlant.Italic, FontWeight.Bold);
            g.SetFontSize(18);
            g.MoveTo(new PointD(88, 28));
            g.ShowText(".");
            g.MoveTo(new PointD(88, 58));
            g.ShowText(".");
            g.SelectFontFace("", FontSlant.Italic, FontWeight.Normal);
            g.SetFontSize(10);
            g.MoveTo(new PointD(98, 30));
            g.ShowText("Use the navigation on the left to choose different categories");
            g.MoveTo(new PointD(98, 42));
            g.ShowText("of your computer and system information to display.");
            g.MoveTo(new PointD(98, 60));
            g.ShowText("When you click on a category in the navigation, the dynamic");
            g.MoveTo(new PointD(98, 72));
            g.ShowText("information is automatically refreshed.");

            g.MoveTo(new PointD(38, 35));
            g.Color = new Color(0.3, 0.4, 0.6, 1);
            g.SelectFontFace("", FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(18);
            g.ShowText("Tips");

            g.NewPath();

            /*
             * g.Color = new Color (0.3, 0.4, 0.6, 0.8);
             * g.Scale (34, 34);
             * g.LineWidth = 0.06;
             * g.Arc (1.0, 1.0, 0.6, 0, 360);
             * g.Stroke ();*/

            ((IDisposable)g.Target).Dispose();
            ((IDisposable)g).Dispose();
        }
All Usage Examples Of Cairo.Context::SetFontSize