Chapter 8

 < Day Day Up > 

A1:

The Graphics object encapsulates the drawing surface and is used to draw; the ClipRectangle represents the area that needs to be redrawn.

A2:

 Control.Invalidate(). 

A3:

C

A4:

b fails because Brush is an abstract class.

A5:

b is more transparent because its alpha value (200) is less than the value (255) of color a.

A6:

100%. The image is scaled to fit the rectangle.

A7:

Here is one solution:

 Graphics g = panel1.CreateGraphics(); g.SmoothingMode = SmoothingMode.AntiAlias; GraphicsPath gp = new GraphicsPath(); gp.AddLine(10, 170, 30, 170); gp.AddLine(16, 100, 100, 100); gp.AddLine(100, 100, 190, 180); gp.AddLine(40, 50, 50, 20); gp.StartFigure(); gp.AddLine(50, 20, 145, 100); gp.StartFigure(); gp.AddArc(65, 10, 120, 180, 180, 80); gp.StartFigure(); gp.AddArc(65, 5, 120, 100, 200, 70); g.DrawPath(new Pen(Color.Black, 2), gp); 

A8:

D

     < Day Day Up > 


    Core C# and  .NET
    Core C# and .NET
    ISBN: 131472275
    EAN: N/A
    Year: 2005
    Pages: 219

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net