예제 #1
0
        protected override void DrawGlyph(RadialMenuGraphicsInfoArgs e)
        {
            CustomRadialMenuViewInfo viewInfo = (CustomRadialMenuViewInfo)e.ViewInfo;

            if (viewInfo.GlyphBounds != Rectangle.Empty && e.DrawOptions.AllowDrawGlyph)
            {
                DrawGlyphCore(e, viewInfo);
            }
        }
예제 #2
0
        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;
            }
        }