本文整理汇总了C#中gbrainy.Core.Main.CairoContextEx.MoveTo方法的典型用法代码示例。如果您正苦于以下问题:C# CairoContextEx.MoveTo方法的具体用法?C# CairoContextEx.MoveTo怎么用?C# CairoContextEx.MoveTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gbrainy.Core.Main.CairoContextEx
的用法示例。
在下文中一共展示了CairoContextEx.MoveTo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x = DrawAreaX + 0.2, y = DrawAreaY + 0.2, width = 0.4, height = 0.4;
base.Draw (gr, area_width, area_height, rtl);
gr.Rectangle (x, y, width, height);
gr.Stroke ();
gr.MoveTo (x, y + 0.1);
gr.LineTo (x + width, y + 0.1); // First horizontal
gr.Stroke ();
gr.MoveTo (x, y + 0.3);
gr.LineTo (x + width - 0.1, y + 0.3); // Second horizontal
gr.Stroke ();
gr.MoveTo (x + 0.1, y);
gr.LineTo (x + 0.1, y + height); // First vertical
gr.Stroke ();
gr.MoveTo (x + 0.3, y);
gr.LineTo (x + 0.3, y + height - 0.1); // Second vertical
gr.Stroke ();
}
示例2: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x = DrawAreaX + 0.1, y = DrawAreaY + 0.2;
const double witdh = 0.6, height = 0.5;
base.Draw (gr, area_width, area_height, rtl);
gr.MoveTo (x, y);
gr.LineTo (x + witdh, y);
gr.LineTo (x + witdh / 2, y + height / 2);
gr.LineTo (x, y);
gr.LineTo (x + 0.45, y + height /4);
gr.Stroke ();
if (type == 0) {
gr.MoveTo (x + witdh / 2, y);
gr.LineTo (x + witdh / 2, y + height / 2);
gr.Stroke ();
}
gr.MoveTo (x + 0.152, y + 0.125);
gr.LineTo (x + witdh, y);
gr.Stroke ();
if (Answer.Draw == false)
return;
// References
gr.MoveTo (x - 0.02, y);
gr.ShowPangoText ("a");
gr.MoveTo (x + witdh /2 - 0.02, y);
gr.ShowPangoText ("b");
gr.MoveTo (x + witdh, y);
gr.ShowPangoText ("c");
gr.MoveTo (x + witdh /2 - 0.03, y + 0.07 - 0.02);
gr.ShowPangoText ("d");
gr.MoveTo (x + 0.11, y + 0.16);
gr.ShowPangoText ("e");
gr.MoveTo (x + 0.47, y + 0.16);
gr.ShowPangoText ("f");
gr.MoveTo (x + (witdh /2) - 0.01, y + 0.26);
gr.ShowPangoText ("g");
}
示例3: DrawPossibleAnswers
public override void DrawPossibleAnswers(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x= DrawAreaX + 0.125, y = DrawAreaY + 0.1;
int cnt = 0;
for (int i = 0; i < showed; i++)
{
if (i == answer)
continue;
gr.MoveTo (x, y);
gr.ShowPangoText (animals[animals_order[i]]);
gr.Stroke ();
if ((cnt + 1) % 3 == 0) {
y += 0.2;
x = DrawAreaX + 0.125;
} else {
x+= 0.25;
}
cnt++;
}
gr.Color = new Color (0.9, 0.9, 0.9);
gr.DrawTextCentered (0.5, DrawAreaY, "This is an extension sample");
}
示例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, DrawAreaY);
gr.ShowPangoText (Translations.GetString ("Choose one of the following:"));
}
示例5: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x = 0.25, y = 0.25;
base.Draw (gr, area_width, area_height, rtl);
gr.Rectangle (x, y, width, height);
gr.Stroke ();
gr.MoveTo (x, y + height / 2);
gr.LineTo (x + width, y + height / 2);
gr.Stroke ();
gr.MoveTo (x + width / 2, y);
gr.LineTo (x + width / 2, y + height);
gr.Stroke ();
if (cover_zone1)
CoverZone (gr, x, y);
if (cover_zone2)
CoverZone (gr, x + width / 2, y);
if (cover_zone3)
CoverZone (gr, x, y + height / 2);
if (cover_zone4)
CoverZone (gr, x + width / 2, y + height / 2);
switch (partial_zone) {
case 1:
break;
case 2:
x += width / 2;
break;
case 3:
y += height / 2;
break;
case 4:
y += height / 2;
x += width / 2;
break;
}
DrawSection (gr, x, y);
}
示例6: 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:"));
}
示例7: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x = DrawAreaX + 0.15;
base.Draw (gr, area_width, area_height, rtl);
for (int i = 0; i < 2; i++)
DrawFigureSequence (gr, x, DrawAreaY + sub_figure * i , i, true);
DrawFigureSequence (gr, x, DrawAreaY + sub_figure * 2 , 2, false);
gr.MoveTo (0.1, 0.62);
gr.ShowPangoText (ServiceLocator.Instance.GetService <ITranslations> ().GetString ("Choose one of the following:"));
}
示例8: Draw
public override void Draw(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x = DrawAreaX, y = DrawAreaY + 0.1;
base.Draw (gr, area_width, area_height, rtl);
for (int i = 0; i < 4; i++) {
DrawQuestionFigures (gr, x, y, random_indices_questions [i]);
x += space_figures;
}
gr.MoveTo (0.1, 0.4 - 0.02);
gr.ShowPangoText (Translations.GetString ("Choose one of the following:"));
}
示例9: 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));
}
示例10: 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 () : "?");
}
示例11: 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"));
}
示例12: DrawObjectToMemorize
public override void DrawObjectToMemorize(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
base.DrawObjectToMemorize (gr, area_width, area_height, rtl);
if (Answer.Draw == false) {
for (int i = 0; i < indications.Length; i++)
{
gr.MoveTo (0.3, 0.2 + i * 0.08);
gr.ShowPangoText (indications[i].ToString ());
gr.Stroke ();
}
} else {
for (int i = 0; i < indications.Length; i++)
{
gr.MoveTo (0.1, 0.2 + i * 0.08);
gr.ShowPangoText (indications[i].ToString ());
gr.Stroke ();
}
DrawPossibleAnswers (gr, 0.7, 0.3, WhichAnswer (answers[ans]));
gr.MoveTo (0.7, 0.5);
gr.ShowPangoText (Answer.GetFigureName (ans));
gr.Stroke ();
}
}
示例13: 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);
}
}
示例14: DrawPossibleAnswers
public override void DrawPossibleAnswers(CairoContextEx gr, int area_width, int area_height, bool rtl)
{
double x= DrawAreaX + 0.125, y = DrawAreaY + 0.1;
int cnt = 0;
for (int i = 0; i < showed; i++)
{
if (i == answer)
continue;
gr.MoveTo (x, y);
gr.ShowPangoText (words[words_order[i]]);
gr.Stroke ();
if ((cnt + 1) % 3 == 0) {
y += 0.2;
x = DrawAreaX + 0.125;
} else {
x+= 0.25;
}
cnt++;
}
}
示例15: DrawSlice
private static void DrawSlice(CairoContextEx gr, double x, double y)
{
double degrees, x1, y1;
degrees = 0;
gr.MoveTo (x, y);
x1 = x + radius * Math.Cos (degrees);
y1 = y + radius * Math.Sin (degrees);
gr.LineTo (x1, y1);
gr.Stroke ();
degrees = radian * 60;
gr.MoveTo (x, y);
x1 = x + radius * Math.Cos (degrees);
y1 = y + radius * Math.Sin (degrees);
gr.LineTo (x1, y1);
gr.Stroke ();
gr.Arc (x, y, radius, 0, radian * 60);
gr.Stroke ();
}