コード例 #1
0
        private void DrawTextFrame(float xStart, float yStart, IGraphicContext graphicContext)
        {
            var textFramePoint1 = new Point(xStart, yStart + m_TextSize.Height + Style.Fragment.FramePadding / 2);
            var textFramePoint2 = new Point(xStart + m_TextSize.Width + Style.Fragment.FramePadding / 2, yStart + m_TextSize.Height + Style.Fragment.FramePadding / 2);
            var textFramePoint3 = new Point(xStart + m_TextSize.Width + Style.Fragment.FramePadding, yStart);

            graphicContext.FillPolygon(new[] { Location, textFramePoint1, textFramePoint2, textFramePoint3, Location }, Color.SemiTransparent);

            graphicContext.DrawLine(textFramePoint1, textFramePoint2, Style.Fragment.TextFrameWidth, Style.Fragment.TextFrameColor, Style.Common.LineStyle);
            graphicContext.DrawLine(textFramePoint2, textFramePoint3, Style.Fragment.TextFrameWidth, Style.Fragment.TextFrameColor, Style.Common.LineStyle);
        }
コード例 #2
0
 public override void Draw(IGraphicContext gc)
 {
     gc.FillPolygon(_points, Color.Red);
 }