GrafitiDemo.DemoObject.Draw C# (CSharp) Method

Draw() public method

public Draw ( int layer ) : void
layer int
return void
        public void Draw(int layer)
        {
            Gl.glPushMatrix();
                Gl.glTranslatef(m_x, m_y, 0f);
                Gl.glRotatef((float)(m_angle / Math.PI * 180.0f), 0f, 0f, 1);

                if (layer == 1)
                {
                    Gl.glLineWidth(1);
                    Gl.glColor3d(m_color.R, m_color.G, m_color.B);
                    Utilities.DrawEmptyCircle(m_targetRadius);
                }

                if (layer == 2)
                {
                    if (m_selected)
                    {
                        Gl.glColor3d(1, 1, 0);
                        Utilities.DrawPlainSquare(m_size * 1.15f);
                    }
                    Gl.glColor3d(m_color.R, m_color.G, m_color.B);
                    Utilities.DrawPlainSquare(m_size);
                }

                //g.DrawString(m_id.ToString(), m_font, white, x - 10, y - 10);
            Gl.glPopMatrix();
        }