homework2

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

SimpleDraw is a new 2D graphics drawing product. We are asked to write the core engine of the graphics system.

You must create software that implements the abstraction of a drawing. A drawing is defined as a 2D space that contains an unlimited number of drawing primitives. There are 2 drawing primitives defined:

1. An ellipse

2. A rectangle

Your software must represent a drawing containing an unlimited number of drawing primitives. Each primitive has a location (x, y coordinate) and a size (width, height). The drawing should be able to determine the size of the total drawing and should be able to display the drawing in the following format:

Drawing Name: Drawing 1

Total number of primitives: 59

Total size: 1020, 2780

Primitive 1: Ellipse

Location: 0, 10

Size: 100, 400

Primitive 2: Rectangle

Location: 30, 78

Size: 500, 800

.....

Primitive 59: Ellipse

Location 100, 600

Size: 300, 333

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航