Question:You are developing a utility screen for a new client application. The utility screen displays a thermometer that conveys the current status of processes being carried out by the application. You need to draw a rectangle on the screen to serve as the background of the thermometer as shown in the exhibit. The rectangle must be filled with gradient shading. (Click the Exhibit button.) Which code segment should you choose?
 

A Rectangle= rectangle = gcnew Rectangle(10, 10, 450, 25); LinearGradientBrush= rectangleBrush = gcnew LinearGradientBrush(rectangle, Color::AliceBlue, Color::CornflowerBlue, LinearGradientMode::ForwardDiagonal);
Pen= rectanglePen = gcnew Pen(rectangleBrush);
Graphics= g = this->CreateGraphics();
g->FillRectangle(rectangleBrush, rectangle); 

B RectangleF= rectangle = gcnew RectangleF(10f, 10f, 450f, 25f); SolidBrush= rectangleBrush =
gcnew SolidBrush(Color::AliceBlue);
Pen= rectanglePen = gcnew Pen(rectangleBrush);
Graphics= g = this->CreateGraphics();
g->DrawRectangle(rectangleBrush, rectangle); 

C Rectangle= rectangle = gcnew Rectangle(10, 10, 450, 25); LinearGradientBrush= rectangleBrush = gcnew LinearGradientBrush(rectangle, Color::AliceBlue, Color::CornflowerBlue, LinearGradientMode::ForwardDiagonal);
Pen= rectanglePen = gcnew Pen(rectangleBrush);
Graphics= g = this->CreateGraphics();
g->DrawRectangle(rectanglePen, rectangle); 

D RectangleF= rectangle = gcnew RectangleF(10f, 10f, 450f, 25f); array= points = gcnew array= {gcnew Point(0, 0), gcnew Point(110, 145)};
LinearGradientBrush= rectangleBrush =
gcnew LinearGradientBrush(rectangle, Color::AliceBlue,
Color::CornflowerBlue,
LinearGradientMode::ForwardDiagonal);
Pen= rectanglePen = gcnew Pen(rectangleBrush);
Graphics= g = this->CreateGraphics();
g->DrawPolygon(rectanglePen, points); 

+ Answer
+ Report
Total Preview: 651

Copyright © 2024. Powered by Intellect Software Ltd