This project is read-only.

The up-arrow: redesign

Apr 11, 2011 at 1:29 PM

I did a re-design on the up-arrow, maybe somebody is interested:

            if (isParentFolder) {
                Pen UpArrowPen = new Pen(new SolidBrush(UpArrowColor), UpArrowWidth);
                UpArrowPen.LineJoin = LineJoin.Round;
                UpArrowPen.StartCap = LineCap.Flat;
                UpArrowPen.EndCap = LineCap.Round;

                //g.DrawLines(UpArrowPen, new PointF[] {
                //    new PointF((float)drawXOffset - UpArrowSize * size, (float)drawYOffset + UpArrowSize * size),
                //    new PointF((float)drawXOffset + UpArrowSize * size, (float)drawYOffset + UpArrowSize * size),
                //    new PointF((float)drawXOffset + UpArrowSize * size, (float)drawYOffset - UpArrowSize * size),
                //    new PointF((float)drawXOffset + UpArrowSize * size * 2 / 3, (float)drawYOffset - UpArrowSize * size * 2 / 3),
                //    new PointF((float)drawXOffset + UpArrowSize * size, (float)drawYOffset - UpArrowSize * size),
                //    new PointF((float)drawXOffset + UpArrowSize * size * 4 / 3, (float)drawYOffset - UpArrowSize * size * 2 / 3)
                //});
                
                //   /\
                //  /  \
                //  -  -
                //   ||
                //   --
                
                g.DrawLines(UpArrowPen, new PointF[] {
                    new PointF((float)size / 2, 0.28F * (float) size),
                    new PointF(0.8F * (float) size, (float)size / 2),              //      \
                    new PointF(0.68F * (float) size, (float)size / 2),             //      _
                    new PointF(0.68F * (float) size, 0.7F * (float) size),         //     |
                    new PointF(0.32F * (float) size,0.7F * (float) size),          //    -
                    new PointF(0.32F * (float) size, (float)size / 2),             //    |
                    new PointF(0.2F * (float) size, (float)size / 2),              //   _
                    new PointF((float)size / 2, 0.28F * (float) size)               //   / 
                });

            }