private void Draw(Graphics graphics, GraphicsPlus g) { int deltaH = ClientRectangle.Height / 5; GpRectF rc = new GpRectF(0, 0, ClientRectangle.Width, deltaH); g.FillRectangle(brPathGrad, rc); rc.Offset(0, deltaH); g.FillRectangle(brSolid, rc); rc.Offset(0, deltaH); g.FillRectangle(brHatch, rc); rc.Offset(0, deltaH); g.FillRectangle(brLinGrad, rc); rc.Offset(0, deltaH); g.FillRectangle(brTexture, rc); rc.Offset(0, deltaH); Rectangle rcText = new Rectangle(0, 0, ClientRectangle.Width, deltaH); StringFormat sf = new StringFormat(); sf.LineAlignment = sf.Alignment = System.Drawing.StringAlignment.Center; using (SolidBrush brText =new SolidBrush(Color.White)) using (Font fnt = new Font("Tahoma", 9, System.Drawing.FontStyle.Bold)) { graphics.DrawString("PathGradient Brush", fnt, brText, rcText, sf); rcText.Offset(0, deltaH); brText.Color = Color.Black; graphics.DrawString("Solid Brush", fnt, brText, rcText, sf); rcText.Offset(0, deltaH); graphics.DrawString("Hatch Brush", fnt, brText, rcText, sf); rcText.Offset(0, deltaH); graphics.DrawString("LinearGradient Brush", fnt, brText, rcText, sf); rcText.Offset(0, deltaH); graphics.DrawString("Texture Brush", fnt, brText, rcText, sf); rcText.Offset(0, deltaH); } }