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


C# ICanvas.FillCircle方法代码示例

本文整理汇总了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);
        }
开发者ID:eriser,项目名称:alphaTab,代码行数:26,代码来源:RepeatOpenGlyph.cs

示例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);
        }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:68,代码来源:TripletFeelGlyph.cs

示例3: Paint

 public override void Paint(float cx, float cy, ICanvas canvas)
 {
     canvas.FillCircle(cx + X, cy + Y, _size);
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:4,代码来源:CircleGlyph.cs


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