Exemple #1
0
 public static void RoundedRect(
     Graphics aGraph,
     Rectangle aRect,
     int aR,
     Pen aPen,
     Brush aBrush,
     Color aShadowColor,
     TShadowMode aShadowMode
     )
 {
     RoundedRect(aGraph, aRect, aR, aPen, aBrush, aShadowColor, aShadowMode, 1);
 }
Exemple #2
0
                public static void RoundedRect(
                    Graphics aGraph,
                    Rectangle aRect,
                    int aR,
                    Pen aPen,
                    Brush aBrush,
                    Color aShadowColor,
                    TShadowMode aShadowMode,
                    int aDistance
                    )
                {
                    Rectangle lShRect, lRect;


                    switch (aShadowMode)
                    {
                    case TShadowMode.smLower:
                        lShRect = aRect;
                        lRect   = new Rectangle(
                            aRect.Left + aDistance,
                            aRect.Top + aDistance,
                            aRect.Width - aDistance,
                            aRect.Height - aDistance
                            );
                        break;

                    case TShadowMode.smRaise:
                        lRect = new Rectangle(
                            aRect.Left,
                            aRect.Top,
                            aRect.Width - aDistance,
                            aRect.Height - aDistance
                            );
                        lShRect = new Rectangle(
                            aRect.Left + aDistance,
                            aRect.Top + aDistance,
                            aRect.Width - aDistance,
                            aRect.Height - aDistance
                            );

                        break;

                    default: return;
                    }

                    // Drawing the shadow:
                    Draw.RoundedRect(aGraph, lShRect, aR, null, new SolidBrush(aShadowColor));

                    // Drawing the shape:
                    Draw.RoundedRect(aGraph, lRect, aR, aPen, aBrush);
                }
                public static void RoundedRect(
                    Graphics aGraph,
                    Rectangle aRect,
                    int aR,
                    Pen aPen,
                    Brush aBrush,
                    Color aShadowColor,
                    TShadowMode aShadowMode,
                    int aDistance
                    )
                {
                    Rectangle lShRect, lRect;

                    switch (aShadowMode)
                    {
                        case TShadowMode.smLower:
                            lShRect = aRect;
                            lRect = new Rectangle(
                                        aRect.Left + aDistance,
                                        aRect.Top + aDistance,
                                        aRect.Width - aDistance,
                                        aRect.Height - aDistance
                                    );
                            break;

                        case TShadowMode.smRaise:
                            lRect = new Rectangle(
                                        aRect.Left,
                                        aRect.Top,
                                        aRect.Width - aDistance,
                                        aRect.Height - aDistance
                                    );
                            lShRect = new Rectangle(
                                        aRect.Left + aDistance,
                                        aRect.Top + aDistance,
                                        aRect.Width - aDistance,
                                        aRect.Height - aDistance
                                    );

                            break;

                        default: return;
                    }

                    // Drawing the shadow:
                    Draw.RoundedRect(aGraph, lShRect, aR, null, new SolidBrush(aShadowColor));

                    // Drawing the shape:
                    Draw.RoundedRect(aGraph, lRect, aR, aPen, aBrush);
                }
 public static void RoundedRect(
     Graphics aGraph,
     Rectangle aRect,
     int aR,
     Pen aPen,
     Brush aBrush,
     Color aShadowColor,
     TShadowMode aShadowMode
     )
 {
     RoundedRect(aGraph, aRect, aR, aPen, aBrush, aShadowColor, aShadowMode, 1);
 }