Revit.SDK.Samples.NewRoof.RoofForms.CS.FootPrintRoofWrapper.DrawFootPrint C# (CSharp) Méthode

DrawFootPrint() public méthode

Draw the footprint lines.
public DrawFootPrint ( Graphics graphics, Pen displayPen, Pen highlightPen ) : void
graphics System.Drawing.Graphics The graphics object.
displayPen System.Drawing.Pen A display pen.
highlightPen System.Drawing.Pen A highlight pen.
Résultat void
        public void DrawFootPrint(Graphics graphics, Pen displayPen, Pen highlightPen)
        {
            foreach (FootPrintRoofLine line in m_roofLines)
            {
                if (line.Id == m_footPrintLine.Id)
                {
                    line.Draw(graphics, highlightPen);
                }
                else
                {
                    line.Draw(graphics, displayPen);
                }
            }
        }

Usage Example

Exemple #1
0
        /// <summary>
        /// Display the footprint roof lines in the picture box control.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void picturebox_Paint(object sender, PaintEventArgs e)
        {
            Graphics graphics = e.Graphics;

            graphics.Clear(System.Drawing.Color.White);
            graphics.TranslateTransform(m_drawCenter.X, m_drawCenter.Y);
            graphics.ScaleTransform(m_scale, m_scale);
            graphics.PageUnit = GraphicsUnit.Pixel;
            m_footPrintRoofWrapper.DrawFootPrint(graphics, m_displayPen, m_highLightPen);
        }