![]() Available system colors are listed in Table 15.7 in the System Colors subsection. System colors are made available as properties of the SystemColors 19 class. For example, a given system might be set up with black text on a white background, or it couldīe set up with the opposite, white text on a black background. The use of system colors helps create consistencyīetween different programs. System colors are a set of colors used to draw the elements of the user interface. There are three ways to specify a color in a. They are indirectly specified through a pen or brush. So even though color parameters are not directly used as parameters to methods, When drawing lines, the line color is the color that is part of a pen.īrushes are also used to specify text color. For example, for filling areas, the color to use forįilling the area is the color that is part of a brush. Methods require other drawing attributes that have a built-in color. ![]() The most basic type of drawing attribute is color, yet few drawing methods accept colors directly as parameters. Then, we need to know how to define colors and how to create brushes. Before we can fill an area with any of these functions, 17 The other two methods accept a Brush 18 object as the parameter that identifies the color to use to fill the area. The Clear method accepts a single parameter, a structure of type Color. Three methods in the Graphics class to fill a rectangular area:įills a specified rectangle using a brush If you study any window onĪny display screen, you are likely to see that the background is a single color, often white or sometimes gray. On a display screen, this is one of the most common operations. The simplest raster operation is to fillĪ rectangle with a single color. We define raster graphics as those functions that operate on an array of pixels. NET Compact Framework Programming with C#
0 Comments
Leave a Reply. |