SlideShare a Scribd company logo
1 of 32
Graphics in C++
Graphics
It is used to create different
shapes in different colours.
2Computer Science Department
.
Requirements
IT requires a graphics monitor, and also graphics
card such as VGA, SVGA, EGA.
Graphics includes:
• Lines in different colors and styles.
• Different shapes like circles, rectangles in different
styles.
• Text in different fonts, sizes, and style.
3Computer Science Department
Files needed with C++ compiler to work in Graphics
• The header file “graphics.h” it contains built-in graphic
functions.
• Borland Graphics Interface (BGI) files. These files
contain graphics driver programs that initialize the
computer monitor into graphics mode.
• BGI files have BGI extension.
4Computer science Department
Display Mode
• Text mode
• Graphics mode
5Computer Science Department
Text Mode
In text mode only text can be displayed .
The images and the other graphics can not be displayed.
6Computer Science Department
Graphics Mode
• Images and other graphics can be displayed.
• The output is displayed on the computer
screen in points or pixels.
VGA Monitor
In the VGA monitor, the screen is divided into
480 rows and 640 columns of dots. Thus the
VGA monitor screen is divided into 640x480
pixels. The number of dots per inch is called
resolution of the screen
Resolutions
MONITOR
TYPE
Resolution Colors
CGA 640x200 16
VGA 640x480 16
SVGA 800x600 256
9Computer Science Department
Initialization of Graphics Mode
initigraph () it is used to initialize the display
into a graph mode.
Syntax:
initigraph (&driver, &mode," path”);
Driver
• It must be install in computer.
• It may be an integer variable or an integer
constant identifier.
Like CGA, EGA, SVGA.
It is automatically detected by using keyword
“DETECT”.
int driver, mode;
Driver=DETECT;
Mode
• It represents output resolution on the
computer screen.
• The normal mode of VGA is VGAHI. It
gives high resolution.
&
• Represents the address of constant
numerical identifier.
• If constants (VGA,VGAHI) are used,
then this operator will not used.
Initgraph(VGA,VGAHI, “path”);
Path
• It represent the path of graphics drivers.
• It is the directory on the disk where BGI files
are located.
• BGI files are stored in “C:TCBGI”.
Intigraph(VGA,VGAHI, “C:TCBGI”);
.
FUNCTIONS
“Cleardevice”
• It is used to clear the screen in graphics
mode.
• Similar to “clrscr” function.
Syntax:
cleardevice();
Closing graphics Mode
“closegraph” function is used to restore
the screen to the text mode.
Syntax:
closegraph();
Text in graphics Mode
Text can also be written in different
fonts, styles, sizes, colors and
directions.
“outtext” Function
It is used to print text on the computer
screen in graphics mode.
Syntax:
outtext(string);
String: it represents the characters.
it enclosed into a double quotes.
“moveto” Functions
It is used to move the current cursor position to the
specified location on the screen where output is to
be print.
It is similar to “gotoxy” function used in text mode.
Syntax:
moveto(x, y);
x and y are co-ordinates.
“outtextxy” Function
• It is similar to the “outtext” function but it is
used to print text on the screen at the
specified location.
• It serves the purpose of both the “moveto”
and “outtext” functions.
Syntax:
outtext(x,y,string);
“Settextstyle” Function
• It is used to define the text style in a
graph mode.
• Text style includes the font type, font
size and the text direction.
Syntax:
Settextstyle(style, dir, size);
Value Range
• Style: 0-10
• Dir: 0-1
• size: 0-72
“setcolor” Function
• It is used to define color of the object and
the text in graphics mode.
Syntax:
Setcolor(co);
• co: represent the color.
Its value from 0-15, it may also be numerical
constant identifier, like BLUE,GREEN etc…
“setbkcolor” Function
• It is used to define the background
color of the screen.
Syntax:
setbkcolor(co);
Creating Objects in Graphics Mode
Different objects like lines, circles,
rectangles and many other shapes are
created in graph mode using various
built-in functions.
“circle” Function
It is use to draw a circle on the screen.
Syntax:
circle(x,y,radious);
“arc” Function
It is used to draw a circular arc starting
from a specified angle and up to
another specified angle.
Syntax:
arc(x,y,stangle,endangle,radius)
• All parameters are of int types.
“line” Function
• To draw a line between two points.
Syntax:
Line(x1,y1,x2,y2);
“rectangle” Function
• It is used to draw a rectangle between
two points.
Syntax:
rectangle(x1,y1,x2,y2);
“setlinestyle” Function
• It is used to set the line style of different
objects that are drawn.
• The lines objects can be drawn in different
styles, patterns and thickness.
Syntax:
setlinestyle(style, pattern, thickness);
Value Range
• Style: 0-4
• pattern: 0-12
• thickness: 1-3

More Related Content

What's hot

What's hot (9)

Graphics file
Graphics fileGraphics file
Graphics file
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
 
Graphics Programming in C
Graphics Programming in CGraphics Programming in C
Graphics Programming in C
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics Practical
 
Turbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingTurbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse Programming
 
C graphics programs file
C graphics programs fileC graphics programs file
C graphics programs file
 
1 introduction computer graphics
1 introduction computer graphics1 introduction computer graphics
1 introduction computer graphics
 
Computer graphics file
Computer graphics fileComputer graphics file
Computer graphics file
 

Similar to Graphics mod

아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdfsunwooindia
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphicsLOKESH KUMAR
 
Circles graphic
Circles graphicCircles graphic
Circles graphicalldesign
 
Graphics software
Graphics softwareGraphics software
Graphics softwareMohd Arif
 
Computer graphics
Computer graphics Computer graphics
Computer graphics shafiq sangi
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).pptHIMANKMISHRA2
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.pptHIMANKMISHRA2
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - ShadersNick Pruehs
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsAdri Jovin
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)JAINAM KAPADIYA
 
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptxRamanathanSabesan
 
12.m3 cms content-updating-pt1
12.m3 cms content-updating-pt112.m3 cms content-updating-pt1
12.m3 cms content-updating-pt1tarensi
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfSamiraKids
 

Similar to Graphics mod (20)

Graphics in C++
Graphics in C++Graphics in C++
Graphics in C++
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
1.2.3.pptx
1.2.3.pptx1.2.3.pptx
1.2.3.pptx
 
아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdf
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
 
Circles graphic
Circles graphicCircles graphic
Circles graphic
 
Graphics software
Graphics softwareGraphics software
Graphics software
 
Computer graphics
Computer graphics Computer graphics
Computer graphics
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).ppt
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.ppt
 
Chapter-3.pdf
Chapter-3.pdfChapter-3.pdf
Chapter-3.pdf
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
 
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx
2GKS, Open GL and IGES_Video Lect Given by Renjin.pptx
 
12.m3 cms content-updating-pt1
12.m3 cms content-updating-pt112.m3 cms content-updating-pt1
12.m3 cms content-updating-pt1
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 
10java 2d
10java 2d10java 2d
10java 2d
 
graphics
graphicsgraphics
graphics
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

Graphics mod

  • 2. Graphics It is used to create different shapes in different colours. 2Computer Science Department .
  • 3. Requirements IT requires a graphics monitor, and also graphics card such as VGA, SVGA, EGA. Graphics includes: • Lines in different colors and styles. • Different shapes like circles, rectangles in different styles. • Text in different fonts, sizes, and style. 3Computer Science Department
  • 4. Files needed with C++ compiler to work in Graphics • The header file “graphics.h” it contains built-in graphic functions. • Borland Graphics Interface (BGI) files. These files contain graphics driver programs that initialize the computer monitor into graphics mode. • BGI files have BGI extension. 4Computer science Department
  • 5. Display Mode • Text mode • Graphics mode 5Computer Science Department
  • 6. Text Mode In text mode only text can be displayed . The images and the other graphics can not be displayed. 6Computer Science Department
  • 7. Graphics Mode • Images and other graphics can be displayed. • The output is displayed on the computer screen in points or pixels.
  • 8. VGA Monitor In the VGA monitor, the screen is divided into 480 rows and 640 columns of dots. Thus the VGA monitor screen is divided into 640x480 pixels. The number of dots per inch is called resolution of the screen
  • 9. Resolutions MONITOR TYPE Resolution Colors CGA 640x200 16 VGA 640x480 16 SVGA 800x600 256 9Computer Science Department
  • 10. Initialization of Graphics Mode initigraph () it is used to initialize the display into a graph mode. Syntax: initigraph (&driver, &mode," path”);
  • 11. Driver • It must be install in computer. • It may be an integer variable or an integer constant identifier. Like CGA, EGA, SVGA. It is automatically detected by using keyword “DETECT”. int driver, mode; Driver=DETECT;
  • 12. Mode • It represents output resolution on the computer screen. • The normal mode of VGA is VGAHI. It gives high resolution.
  • 13. & • Represents the address of constant numerical identifier. • If constants (VGA,VGAHI) are used, then this operator will not used. Initgraph(VGA,VGAHI, “path”);
  • 14. Path • It represent the path of graphics drivers. • It is the directory on the disk where BGI files are located. • BGI files are stored in “C:TCBGI”. Intigraph(VGA,VGAHI, “C:TCBGI”);
  • 16. “Cleardevice” • It is used to clear the screen in graphics mode. • Similar to “clrscr” function. Syntax: cleardevice();
  • 17. Closing graphics Mode “closegraph” function is used to restore the screen to the text mode. Syntax: closegraph();
  • 18. Text in graphics Mode Text can also be written in different fonts, styles, sizes, colors and directions.
  • 19. “outtext” Function It is used to print text on the computer screen in graphics mode. Syntax: outtext(string); String: it represents the characters. it enclosed into a double quotes.
  • 20. “moveto” Functions It is used to move the current cursor position to the specified location on the screen where output is to be print. It is similar to “gotoxy” function used in text mode. Syntax: moveto(x, y); x and y are co-ordinates.
  • 21. “outtextxy” Function • It is similar to the “outtext” function but it is used to print text on the screen at the specified location. • It serves the purpose of both the “moveto” and “outtext” functions. Syntax: outtext(x,y,string);
  • 22. “Settextstyle” Function • It is used to define the text style in a graph mode. • Text style includes the font type, font size and the text direction. Syntax: Settextstyle(style, dir, size);
  • 23. Value Range • Style: 0-10 • Dir: 0-1 • size: 0-72
  • 24. “setcolor” Function • It is used to define color of the object and the text in graphics mode. Syntax: Setcolor(co); • co: represent the color. Its value from 0-15, it may also be numerical constant identifier, like BLUE,GREEN etc…
  • 25. “setbkcolor” Function • It is used to define the background color of the screen. Syntax: setbkcolor(co);
  • 26. Creating Objects in Graphics Mode Different objects like lines, circles, rectangles and many other shapes are created in graph mode using various built-in functions.
  • 27. “circle” Function It is use to draw a circle on the screen. Syntax: circle(x,y,radious);
  • 28. “arc” Function It is used to draw a circular arc starting from a specified angle and up to another specified angle. Syntax: arc(x,y,stangle,endangle,radius) • All parameters are of int types.
  • 29. “line” Function • To draw a line between two points. Syntax: Line(x1,y1,x2,y2);
  • 30. “rectangle” Function • It is used to draw a rectangle between two points. Syntax: rectangle(x1,y1,x2,y2);
  • 31. “setlinestyle” Function • It is used to set the line style of different objects that are drawn. • The lines objects can be drawn in different styles, patterns and thickness. Syntax: setlinestyle(style, pattern, thickness);
  • 32. Value Range • Style: 0-4 • pattern: 0-12 • thickness: 1-3