当前位置: 首页>>代码示例>>C#>>正文


C# CairoContextEx.SetPangoLargeFontSize方法代码示例

本文整理汇总了C#中gbrainy.Core.Main.CairoContextEx.SetPangoLargeFontSize方法的典型用法代码示例。如果您正苦于以下问题:C# CairoContextEx.SetPangoLargeFontSize方法的具体用法?C# CairoContextEx.SetPangoLargeFontSize怎么用?C# CairoContextEx.SetPangoLargeFontSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gbrainy.Core.Main.CairoContextEx的用法示例。


在下文中一共展示了CairoContextEx.SetPangoLargeFontSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            gr.DrawTextCentered (0.5, DrawAreaY + 0.3, formula);
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:7,代码来源:PuzzleEquation.cs

示例2: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            base.Draw (gr, area_width, area_height, rtl);

            gr.DrawClock (DrawAreaX + 0.15, DrawAreaY + 0.1, figure_size,0, 0 /* No hands */);
            gr.SetPangoLargeFontSize ();
            gr.DrawTextCentered (0.5, DrawAreaY + 0.2 + figure_size, Translations.GetString ("Sample clock"));
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:8,代码来源:PuzzleTimeNow.cs

示例3: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            gr.MoveTo (0.1, DrawAreaY);
            gr.ShowPangoText (Translations.GetString ("Choose one of the following:"));
        }
开发者ID:dineshkummarc,项目名称:gbrainy,代码行数:8,代码来源:PuzzlePredicateLogic.cs

示例4: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();

            gr.MoveTo (0.1, 0.15);
            gr.ShowPangoText (ServiceLocator.Instance.GetService <ITranslations> ().GetString ("Choose one of the following:"));
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:9,代码来源:CalculationProportions.cs

示例5: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            double x = DrawAreaX + 0.1;

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();

            gr.MoveTo (x, DrawAreaY + 0.22);
            gr.ShowPangoText (String.Format (Translations.GetString ("x + y = {0}"), number_a + number_b));

            gr.MoveTo (x, DrawAreaY + 0.44);
            gr.ShowPangoText (String.Format (Translations.GetString ("have a ratio of {0}:{1}"), ratio_a, ratio_b));
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:14,代码来源:CalculationRatio.cs

示例6: DrawObjectToMemorize

        public override void DrawObjectToMemorize(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            StringBuilder sequence = new StringBuilder (64);

            base.DrawObjectToMemorize (gr, area_width, area_height, rtl);
            gr.SetPangoLargeFontSize ();

            for (int num = 0; num < Challenge.Numbers.Length - 1; num++)
            {
                sequence.Append (Challenge.Numbers [num]);
                sequence.Append (", ");
            }
            sequence.Append (Challenge.Numbers [Challenge.Numbers.Length - 1]);

            gr.DrawTextCentered (0.5, DrawAreaY + 0.3, sequence.ToString ());
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:16,代码来源:MemoryNumbers.cs

示例7: Draw

        public void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            gr.Scale (area_width, area_height);

            gr.LineWidth = 0.01;
            gr.Color = new Cairo.Color (0, 0, 0, 1);

            gr.SetPangoLargeFontSize ();
            gr.DrawTextCentered (0.5, 0.1, ServiceLocator.Instance.GetService <ITranslations> ().GetString ("Get ready to memorize the next objects..."));
            gr.Stroke ();

            gr.SetPangoFontSize (0.35);
            gr.DrawTextCentered (0.5, 0.5, countdown_time.ToString ());
            gr.Stroke ();

            gr.Arc (0.5, 0.5, 0.25, 0, 2 * Math.PI);
            gr.Stroke ();
            gr.Arc (0.5, 0.5, 0.28, 0, 2 * Math.PI);
            gr.Stroke ();
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:20,代码来源:CountDownView.cs

示例8: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            double operand_y = DrawAreaY + 0.2;
            const double operand_space = 0.1;
            const double aligned_pos = 0.58;

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            for (int i = 0; i < operands.Length - 1; i++)
            {
                gr.DrawTextAlignedRight (aligned_pos, operand_y, operands[i].ToString ());
                gr.MoveTo (DrawAreaX + 0.2, operand_y + 0.03);

                switch (operation) {
                case Operation.Addition:
                    gr.ShowPangoText ("+");
                    break;
                case Operation.Subtraction:
                    gr.ShowPangoText ("-");
                    break;
                case Operation.Multiplication:
                    gr.ShowPangoText ("*");
                    break;
                }

                operand_y += operand_space;
            }

            gr.DrawTextAlignedRight (aligned_pos, operand_y, operands[operands.Length - 1].ToString ());

            operand_y += 0.08;
            gr.MoveTo (DrawAreaX + 0.2, operand_y);
            gr.LineTo (DrawAreaX + 0.5, operand_y);
            gr.Stroke ();

            if (Answer.Draw) {
                gr.DrawTextAlignedRight (aligned_pos, operand_y + 0.03, Answer.Correct);
            }
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:40,代码来源:CalculationArithmetical.cs

示例9: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            const double aligned_pos = 0.58;

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.2, number_a.ToString ());
            gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.3, number_b.ToString ());
            gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.4, number_c.ToString ());

            gr.MoveTo (DrawAreaX + 0.2, DrawAreaY + 0.5);
            gr.LineTo (DrawAreaX + 0.5, DrawAreaY + 0.5);
            gr.Stroke ();

            gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.55, total.ToString ());

            gr.MoveTo (DrawAreaX + 0.2, DrawAreaY + 0.25);
            gr.ShowPangoText ((Answer.Draw == true) ? oper1.ToString () : "?");

            gr.MoveTo (DrawAreaX + 0.2, DrawAreaY + 0.35);
            gr.ShowPangoText ((Answer.Draw == true) ?  oper2.ToString () : "?");
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:23,代码来源:CalculationOperator.cs

示例10: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            double x = DrawAreaX, y = 0.05;

            base.Draw (gr, area_width, area_height, rtl);

            gr.MoveTo (0.05, y);
            gr.SetPangoLargeFontSize ();
            gr.ShowPangoText (Translations.GetString ("Numbers"));
            y += 0.08;

            for (int n = 0; n < numbers.Length; n++)
            {
                gr.MoveTo (x, y);
                gr.ShowPangoText (numbers[n].ToString ());
                gr.Stroke ();
                x += 0.17;
            }

            y += 0.16;

            gr.MoveTo (0.05, y);
            gr.ShowPangoText (Translations.GetString ("Possible divisors"));
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:24,代码来源:CalculationGreatestDivisor.cs

示例11: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            StringBuilder sequence = new StringBuilder (64);

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();

            for (int num = 0; num < max_num - 1; num++)
            {
                if (num == question) {
                    sequence.Append ("?, ");
                } else {
                    sequence.Append (numbers[num]);
                    sequence.Append (", ");
                }
            }
            sequence.Append (numbers[max_num - 1]);
            gr.DrawTextCentered (0.5, DrawAreaY + 0.3, sequence.ToString ());
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:20,代码来源:PuzzleNumericRelation.cs

示例12: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            double x = DrawAreaX + 0.25;

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            gr.MoveTo (x, DrawAreaY + 0.22);

            switch (type) {
            case SubGameTypes.Addition:
                gr.ShowPangoText (String.Format (ServiceLocator.Instance.GetService <ITranslations> ().GetString ("x + y = {0}"), op1));
                break;
            case SubGameTypes.Subtraction:
                gr.ShowPangoText (String.Format (ServiceLocator.Instance.GetService <ITranslations> ().GetString ("x - y = {0}"), op1));
                break;
            default:
                throw new InvalidOperationException ();
            }

            gr.MoveTo (x, DrawAreaY + 0.44);
            gr.ShowPangoText (String.Format (ServiceLocator.Instance.GetService <ITranslations> ().GetString ("x * y = {0}"), op2));
        }
开发者ID:syoubin,项目名称:gbrainy_android,代码行数:23,代码来源:CalculationTwoNumbers.cs

示例13: Draw

    public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
    {
        double x = DrawAreaX + 0.1;

        base.Draw (gr, area_width, area_height, rtl);

        gr.SetPangoLargeFontSize ();

        gr.MoveTo (x, DrawAreaY + 0.22);
        gr.ShowPangoText (String.Format ("number1 + number2 = {0}", op1));

        gr.MoveTo (x, DrawAreaY + 0.44);
        gr.ShowPangoText (String.Format ("number1 * number2 = {0}", op2));

        gr.Color = new Color (0.9, 0.9, 0.9);
        gr.DrawTextCentered (0.5, DrawAreaY, "This is an extension sample");
    }
开发者ID:GNOME,项目名称:gbrainy,代码行数:17,代码来源:CalculationSample.cs

示例14: DrawPossibleAnswers

        public override void DrawPossibleAnswers(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            double x= DrawAreaX, y = DrawAreaY + 0.085;
            int pos = 0;
            gr.Color = new Color (DefaultDrawingColor.R, DefaultDrawingColor.G, DefaultDrawingColor.B, 1);

            if (Answer.Draw ==  true) {
                DrawAllFigures (gr, start_x_ans, start_y);
                return;
            }

            gr.SetPangoNormalFontSize ();
            for (int i = 0; i < figures.Length; i++)
            {
                if (i == question_pos)
                    continue;

                gr.MoveTo (x, y);
                gr.ShowPangoText (converter.ToString (figures[i]));

                if ((pos + 1) % 4 == 0) {
                    y += 0.1;
                    x = DrawAreaX;
                } else {
                    x+= 0.25;
                }
                pos++;
            }

            base.DrawPossibleAnswers (gr,  area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();
            gr.MoveTo (0, 0.4);
            gr.ShowPangoText (Translations.GetString ("Choose one of the following:"));

            gr.MoveTo (0, 0.08);
            gr.ShowPangoText (Translations.GetString ("List of images shown before"));
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:38,代码来源:MemoryFiguresAndText.cs

示例15: Draw

        public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
        {
            const double fraction_size = 0.17;
            double x =  0.5  - (fractions_num * fraction_size / 2), y = DrawAreaY + 0.3;
            const double offset_x = 0.12;

            base.Draw (gr, area_width, area_height, rtl);

            gr.SetPangoLargeFontSize ();

            for (int i = 0; i < fractions_num; i++)
            {
                // Numerator
                gr.DrawTextAlignedRight (x + offset_x, y, fractions[i].Numerator.ToString ());

                // Sign
                gr.MoveTo (x, y + 0.04);
                switch (fractions[i].Operation) {
                case Operation.Addition:
                    gr.ShowPangoText ("+");
                    break;
                case Operation.Subtraction:
                    gr.ShowPangoText ("-");
                    break;
                }
                gr.Stroke ();

                // Line
                gr.MoveTo (x + 0.05, y + 0.08);
                gr.LineTo (x + offset_x + 0.02,  y + 0.08);
                gr.Stroke ();

                // Denominator
                gr.DrawTextAlignedRight (x + offset_x, y + 0.1, fractions[i].Denominator.ToString ());

                x += fraction_size;
            }
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:38,代码来源:CalculationFractions.cs


注:本文中的gbrainy.Core.Main.CairoContextEx.SetPangoLargeFontSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。