Page 6 - GDI PROGRA
P. 6

6




                                                     Ejemplos


                  Clase Rectangle

                  La clase Rectangle representa un rectángulo, o un cuadrado si el tamaño de
                  sus lados es igual. Contiene un punto de origen, que se encuentra en la
                  esquina superior izquierda del rectángulo (en coordenadas X e Y), y el tamaño
                  (ancho y alto) del rectángulo.






























                  Rectangle(int X, int Y, int Ancho, int Alto);

                  No solo se usa para dibujar rectángulos. También es necesario a la hora de
                  dibujar elipses, ya que GDI+ las dibuja alrededor del rectángulo.

                  Clase Pen



                   Ejemplo: 2 curvas

                  e.Graphics.DrawBezier(new Pen(Color.Blue, 12.0f), new Point(this.Width / 2, 0),
                  new Point(10, 80), new Point(this.Width / 2, 160), new Point(this.Height Width));
   1   2   3   4   5   6   7