Presentation is loading. Please wait.

Presentation is loading. Please wait.

ARC, BAR AND CIRCLE FUNCTIONS IN C++ The presentation defines the usage of the functions shown above OBJECT ORIENTED PROGRAMMING IN C++ BY: MUHAMMAD DANIYAL.

Similar presentations


Presentation on theme: "ARC, BAR AND CIRCLE FUNCTIONS IN C++ The presentation defines the usage of the functions shown above OBJECT ORIENTED PROGRAMMING IN C++ BY: MUHAMMAD DANIYAL."— Presentation transcript:

1 ARC, BAR AND CIRCLE FUNCTIONS IN C++ The presentation defines the usage of the functions shown above OBJECT ORIENTED PROGRAMMING IN C++ BY: MUHAMMAD DANIYAL QURESHI BS(CS)-1 ROLL NO. 32 SHAH ABDUL LATIF UNIVERSITY, KHAIRPUR MIRS

2 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message What is ? ■ is header file in which many graphical functions are included ■Therefore, is prototype of all of those functions. ■We can create a diagram or any figure if we include this header file in our program. ■Three of those functions are “ arc() ”. “ Bar() “ and “ circle() “. That are defined ahead.

3 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message What is arc()? ■Arc basically means a part of circumference of a circle or a curve. ■arc() function is used to create a curve. ■We can also create a circle through arc() on some extent. ■Syntax: arc(x,y,stangle,endangle,radius) ■In the given syntax, x and y are set to be the centre of the arc. Stangle is angle you want the arc to start from endangle is angle you want the arc to end at. & radius is distance of from the centre.

4 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message What is bar()? ■Basically, a piece of any material like wood or chocolate having 4 corners is called bar. ■In this manner, bar() function is used to draw a bar. Or figure like square or rectangle. ■Syntax: bar( a, b, c, d) ■a, b, c and d are used to set the corners of the bar. ■(a, b) is upper left corner of the bar and (c, d) is lower right corner of the bar.

5 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message What is circle()? ■Circle is basically a figure bounded by one line, it's a figure, every point of which is equal to the distance from the centre. ■So, circle() is a function used to draw a circle. ■Syntax: circle(x, y, radius) ■x and y are set to be the centre of the circle and radius is distance of the circumference of the circle from the centre of the circle.

6 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message Program Example: #include void main(void) { int gdriver = DETECT,gmode; initgraph(&gdriver,&gmod e,"C:\\Turboc3\\BGI"); arc(0,0,270,360,100); bar(150,150,200,200); circle(300,300,50); getch(); }

7 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message Output of the given Program:

8 Graphics.h What is arc()? What is bar()? What is circle()? Programming Output Message THANKS TO ALL OF YOU I hope I have been able to explain all aspects of the given presentation. If there are any questions left regarding this presentation, I’m very willing to answer them.


Download ppt "ARC, BAR AND CIRCLE FUNCTIONS IN C++ The presentation defines the usage of the functions shown above OBJECT ORIENTED PROGRAMMING IN C++ BY: MUHAMMAD DANIYAL."

Similar presentations


Ads by Google