Height() public method

Returns a screen height from an absolute height.
public Height ( double height ) : double
height double
return double
Exemplo n.º 1
0
        private static Rectangle? Rect( Circle c, ImageSpace i )
        {
            if( double.IsInfinity( c.Radius ) )
                return null;

            Vector3D upperLeft = i.Pixel( new Vector3D( c.Center.X - c.Radius, c.Center.Y + c.Radius, 0 ) );
            double width = i.Width( c.Radius * 2 );
            double height = i.Height( c.Radius * 2 );
            Rectangle rect = new Rectangle( (int)upperLeft.X, (int)upperLeft.Y, (int)width, (int)height );
            return rect;
        }
Exemplo n.º 2
0
        static private Rectangle?Rect(Circle c, ImageSpace i)
        {
            if (double.IsInfinity(c.Radius))
            {
                return(null);
            }

            Vector3D  upperLeft = i.Pixel(new Vector3D(c.Center.X - c.Radius, c.Center.Y + c.Radius, 0));
            double    width     = i.Width(c.Radius * 2);
            double    height    = i.Height(c.Radius * 2);
            Rectangle rect      = new Rectangle((int)upperLeft.X, (int)upperLeft.Y, (int)width, (int)height);

            return(rect);
        }
Exemplo n.º 3
0
        static public void DrawCircle(Circle c, Graphics g, ImageSpace i)
        {
            if (double.IsInfinity(c.Radius))
            {
                return;
            }

            Vector3D  upperLeft = i.Pixel(new Vector3D(c.Center.X - c.Radius, c.Center.Y + c.Radius, 0));
            double    width     = i.Width(c.Radius * 2);
            double    height    = i.Height(c.Radius * 2);
            Rectangle rect      = new Rectangle((int)upperLeft.X, (int)upperLeft.Y, (int)width, (int)height);

            using (Pen pen = new Pen(Color.Black, 1.0f))
                g.DrawEllipse(pen, rect);
        }