Download presentation

Presentation is loading. Please wait.

Published byBrad Percifield Modified over 3 years ago

1
BY Kamran Yousaf Line Attributes (X1, Y1, X2, Y2, Color) The Line Based on Slope Decision on the dx and dy Loop on Greater (Counter of 1) Increment of other (Slope) Plot Pixels in the loop

2
BY Kamran Yousaf Line ‘dx’, ‘dy’ to calculate the diffrence along x and y axis ‘steps’ to calculate Loop counting ‘xInc’, ‘yInc’ to calculate the Difference covered in each step ‘x’, ‘y’ to store current pixel position ‘i’ as a loop variable

3
BY Kamran Yousaf Line Calculate ‘dx’ as x2-x1,‘dy’ as y2-y1 ‘steps’ will have the greater absolute value from ‘dx’ or ‘dy’ ‘xInc’ is ‘dx’/’steps’,‘yInc’ is ‘dy’/’steps’ ‘x’ is ‘x1’ ‘y’ is ‘y1’ Plot 1 st pixel at ‘x’,’y’ using ‘color’ Loop ‘k’ 1 to steps and ‘x’+=‘xInc’, ‘y’+=‘yInc’

4
BY Kamran Yousaf Rectangle Attributes (X1,Y1,X2,Y2,Color) Set of four Lines Line 1(X1,Y1,X2,Y1) Line 2(X1,Y2,X2,Y2) Line 3(X1,Y1,X1,Y2) Line 4(X2,Y1,X2,Y2)

5
BY Kamran Yousaf Button Set of 8 Lines Line 1(X1,Y1,X2,Y1, Silver) Line 2(X1,Y2,X2,Y2, Black) Line 3(X1,Y1,X1,Y2,Silver) Line 4(X2,Y1,X2,Y2, Black) Line 5(X1+1,Y1+1,X2-1,Y1+1, White) Line 6(X1+1,Y2-1,X2-1,Y2-1,Gray) Line 7(X1+1,Y1+1,X1+1,Y2-1,White) Line 8(X2-1,Y1+1,X2-1,Y2-1, Gray)

6
BY Kamran Yousaf PolyGon n no of Attributes Set of n/2 no of lines Filled or Open Shape Parameters Array, and count of points

7
BY Kamran Yousaf Circle Attributes ( xc, yc, radius, color) ‘x’, ‘y’ as current points ‘i’ to run loop 0 to 360 ‘x’ is calculated as xc+radius*cos(rad) ‘y’ is calculated as yc+radius*sin(rad) Where rad is PI*deg/180

8
BY Kamran Yousaf Arc Attributes ( xc, yc, radius,startAngle, endAngle, color) ‘x’, ‘y’ as current points ‘i’ to run loop start to end ‘x’ is calculated as xc+radius*cos(rad) ‘y’ is calculated as yc+radius*sin(rad) Where rad is PI*deg/180

9
BY Kamran Yousaf Ellipse Attributes ( xc, yc, Xradius,Yradius, color) ‘x’, ‘y’ as current points ‘i’ to run loop 0 to 360 ‘x’ is calculated as xc+Xradius*cos(rad) ‘y’ is calculated as yc+Yradius*sin(rad) Where rad is PI*deg/180

10
BY Kamran Yousaf Elliptical Arc Attributes ( xc, yc, Xradius,Yradius,start, end, color) ‘x’, ‘y’ as current points ‘i’ to run loop start to end ‘x’ is calculated as xc+Xradius*cos(rad) ‘y’ is calculated as yc+Yradius*sin(rad) Where rad is PI*deg/180

Similar presentations

Presentation is loading. Please wait....

OK

Copyright © Cengage Learning. All rights reserved.

Copyright © Cengage Learning. All rights reserved.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Ppt on culture of assam Ppt on 10 famous personalities of india Ppt on phonetic transcription practice Ppt on natural vegetation and wildlife of north america Hrm ppt on recruitment portal Ppt on tuberculosis Ppt on high voltage engineering ppt Ppt on drugs abused Ppt on db2 mainframes jobs Ppt on creativity and innovation