示例#1
0
        void DrawHorizontalLines(BrickGraphics g, int y)
        {
            Pen TheLinePen = new Pen(System.Drawing.Color.Gray, 1);

            //if (TheDataGrid.GridLineStyle == DataGridLineStyle.None)
            //	return;

            //for (int i = 0;  i < lines.Count; i++)
            //{
            g.DrawLine(new PointF(20, y), new PointF(PageWidth - 40, y), TheLinePen.Color, TheLinePen.Width);
            //g.DrawLine(TheLinePen, 20, y, PageWidth - 40, y);
            //}
        }
        private void btnDrawLine_Click(object sender, EventArgs e)
        {
            // Prepare for creating a document.
            ps.Begin();
            BrickGraphics gr = ps.Graph;

            gr.Modifier = BrickModifier.Detail;

            // Draw a line with the specified coordinates, foreground color and thickness.
            LineBrick brick = gr.DrawLine(new PointF(0, 0), new PointF(200, 200), Color.Red, 5);

            // Change the line style to dash-dot-dot.
            brick.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;

            // Hide brick borders.
            brick.BorderWidth = 0;

            // Finish creating the document.
            ps.End();
        }
        void DrawHorizontalLines(BrickGraphics g, float y)
        {
            Pen TheLinePen = new Pen(System.Drawing.Color.Gray, 1);

            //if (TheDataGrid.GridLineStyle == DataGridLineStyle.None)
            //	return;

            //for (int i = 0;  i < lines.Count; i++)
            //{
                g.DrawLine(new PointF(20,y),new PointF(PageWidth-40, y),Color.Gray,1);

            //}
        }