
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Draw a line in C++ graphics
In this tutorial, we will be discussing a program to draw a line in C++ graphics.
To implement different shapes and sizes, animations, graphics.h library is used in C++.
Example
#include <graphics.h> int main(){ int gd = DETECT, gm; initgraph(&gd, &gm, ""); line(150, 150, 450, 150); line(150, 200, 450, 200); line(150, 250, 450, 250); getch(); closegraph(); return 0; }
Output
- Related Questions & Answers
- How to draw a line in OpenCV using C++?
- How to draw a line in Android?
- How to apply a gamma correction to a Graphics Draw (GD) image in PHP?
- How can we draw a rounded rectangle using the Graphics object in Java?
- How to draw a line in HTML5 SVG?
- bar() function in C graphics
- Draw a line on an image using OpenCV
- How to draw a line with lineTo() in HTML5?
- How to draw a line in OpenCV using Java?
- How to draw a line in Android using Kotlin?
- How to draw a line on a Tkinter canvas?
- Java Program to draw a line on a JFrame in Java
- How to draw a dashed line on a Tkinter canvas?
- How to draw a line using imageline() function in PHP?
- Flood fill algorithm using C graphics
Advertisements