protected override void DrawGlyph(RadialMenuGraphicsInfoArgs e) { CustomRadialMenuViewInfo viewInfo = (CustomRadialMenuViewInfo)e.ViewInfo; if (viewInfo.GlyphBounds != Rectangle.Empty && e.DrawOptions.AllowDrawGlyph) { DrawGlyphCore(e, viewInfo); } }
void DrawGlyphCore(RadialMenuGraphicsInfoArgs e, CustomRadialMenuViewInfo viewInfo) { Image glyph = GetActualGlyph(e); if ((e.ViewInfo.Menu as CustomRadialMenu).ActualBarLinksHolderEx != e.ViewInfo.Menu) { DrawColoredGlyph(e, (viewInfo.Menu as CustomRadialMenu).BackButtonImage); } else { e.Graphics.DrawImage(glyph, viewInfo.CalcGlyphClientBoundsEx(viewInfo.GlyphBounds, glyph)); } SmoothingMode mode = e.Graphics.SmoothingMode; e.Graphics.SmoothingMode = SmoothingMode.HighQuality; try { //e.Graphics.DrawEllipse(e.Cache.GetPen(Color.Red, 2), viewInfo.GlyphBounds); DrawGlyphSelection(e); } finally { e.Graphics.SmoothingMode = mode; } }