本文整理汇总了C#中ICanvas.FillCircle方法的典型用法代码示例。如果您正苦于以下问题:C# ICanvas.FillCircle方法的具体用法?C# ICanvas.FillCircle怎么用?C# ICanvas.FillCircle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICanvas
的用法示例。
在下文中一共展示了ICanvas.FillCircle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Paint
public override void Paint(float cx, float cy, ICanvas canvas)
{
var blockWidth = 4 * Scale;
var top = cy + Y + Renderer.TopPadding;
var bottom = cy + Y + Renderer.Height - Renderer.BottomPadding;
var left = cx + X + 0.5f;
// big bar
var h = bottom - top;
canvas.FillRect(left, top, blockWidth, h);
// line
left += (blockWidth * 2) - 0.5f;
canvas.BeginPath();
canvas.MoveTo(left, top);
canvas.LineTo(left, bottom);
canvas.Stroke();
//circles
left += 3 * Scale;
var circleSize = _circleSize * Scale;
var middle = (top + bottom) / 2;
canvas.FillCircle(left, middle - (circleSize * _dotOffset), circleSize);
canvas.FillCircle(left, middle + (circleSize * _dotOffset), circleSize);
}
示例2: Paint
public override void Paint(float cx, float cy, ICanvas canvas)
{
cx += X;
cy += Y;
var noteY = cy + Renderer.Height * 0.75f;
canvas.Font = Renderer.Resources.EffectFont;
canvas.FillText("(", cx, cy + Renderer.Height * 0.3f);
var leftNoteX = cx + (10 * Scale);
var rightNoteX = cx + (40 * Scale);
switch (_tripletFeel)
{
case TripletFeel.NoTripletFeel:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full });
break;
case TripletFeel.Triplet8th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full });
canvas.FillMusicFontSymbol(rightNoteX, noteY, NoteScale, MusicFontSymbol.Tempo);
canvas.FillMusicFontSymbol(rightNoteX + (NoteSeparation * Scale), noteY, NoteScale, MusicFontSymbol.NoteEighth);
RenderTriplet(rightNoteX, cy, canvas);
break;
case TripletFeel.Triplet16th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.PartialRight });
RenderTriplet(rightNoteX, cy, canvas);
break;
case TripletFeel.Dotted8th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.PartialRight });
canvas.FillCircle(rightNoteX + (9 * Scale), noteY, Scale);
break;
case TripletFeel.Dotted16th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.Full, BarType.PartialRight });
canvas.FillCircle(rightNoteX + (9 * Scale), noteY, Scale);
break;
case TripletFeel.Scottish8th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.PartialLeft, });
canvas.FillCircle(rightNoteX + (NoteSeparation * Scale)+ (8 * Scale), noteY, Scale);
break;
case TripletFeel.Scottish16th:
RenderBarNote(leftNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.Full });
RenderBarNote(rightNoteX, noteY, NoteScale, canvas, new[] { BarType.Full, BarType.Full, BarType.PartialLeft, });
canvas.FillCircle(rightNoteX + (NoteSeparation * Scale) + (8 * Scale), noteY, Scale);
break;
}
canvas.FillText("=", cx + (30 * Scale), cy + (5 * Scale));
canvas.FillText(")", cx + (65 * Scale), cy + Renderer.Height * 0.3f);
}
示例3: Paint
public override void Paint(float cx, float cy, ICanvas canvas)
{
canvas.FillCircle(cx + X, cy + Y, _size);
}