Hi, To draw a line in C, follow steps given below- 1. Load graphics Driver using the syntax: int gd,gm; initgraph(&gd,&gm,""); In this initgraph is a function defined in graphics.h header file. In this function gd is for graphics driver and gm is for graphics mode.Third argument is path to your .bgi file. You are preferred to keep your all .bgi and .chr files in bin folder so no need to give path for these things. .BGI files are graphics adapter so for good graphics you should use enhanced adapter you can take more details about these from help of turbo C++ IDE. Well, you can use EGAVGA.bgi. 2.Now You can use any graphics function like line, circle, rectangle etc. For drawing a line you can use following syntax: line(100,100,300,100); These are initial point and final points of a line respectively. 3.Finally you should close the graphics environment by using closegraph(); ,so control will return back to the text mode. It is not mandatory , but it is a good practice. Thanx n Regards Ajay vijaywargiya(SE) BMC s/w pune(INDIA)
C++ is a generic, cross-platform language, but graphics are platform-dependant. thus C++ has no built-in methods for graphics output. To draw graphics in C++ you need a low-level API and library specific to the platform and hardware you intend to target. Some libraries are highly abstract and therefore support cross-platform development, but most are platform-specific. Consult the documentation that came with your library.
There are no built-in functions that can draw lines since C++ is a generic language and graphics are platform-dependent. Even the standard library does not provide any line drawing methods aside from printing ASCII line-drawing characters on the console. Even so, consoles are also platform-dependent; there are no generic methods of printing a specific character at a specific position. To draw lines -- that is to say a straight line between two points within a viewport -- you will need a graphics library that supports your platform. OpenGL is your best option as it provides a generic interface.
If you mean how do you draw a curve in C++, you can't. C++ does not have any built-in graphics support of any kind. All graphics are platform-specific so, to be able to draw graphics, you need a graphics API and library suitable for your platform and hardware. As a result, the code you use will not be portable. In most graphics libraries you will draw curves as a series of arcs, so you want to look up the arc() function in your library documentation.
You don't: the C and C++ languages do not have any built-in graphics tool. Further, it is impossible to draw a concentric circle. Multiple circles are concentric when they share the same center.In C or C++, graphic functions such as the drawing of lines, rectangles or circles are provided through third party libraries, or through wrappers which provide access to the operating system's graphics functions.
C++ has no built-in function to draw lines, nor indeed to perform any type of graphics output. The standard library is designed to be as generic as possible, and is therefore capable of supporting all platforms using text output only. Graphics output is obviously possible, but it is platform-specific so you will need a graphics API that provides functions that are specific to your operating system and/or hardware.
first you draw a horizontal line, the on the left side of the line draw a line going down, then at the end of the line draw a curve which looks like a inverted c. Then you have 5 then put a dot on the bottom side of the 5 then draw a curve which looks like and inverted c, then on the bottom draw a line which goes horizontally, now you have 5.2 then you make a curve which looks like a sphere but the end of the line touches the middle of the line, forming a loop. Now you have 5.26 then draw a line horizontally, then at the right side draw a line which goes diagonally. Now you have wrote 5.267
Give me food and I will live give me water and I will die what am I?
How do you get 1000000 robux for free?
What is 8 divided by 2(2 plus 2)?
Baseball players with 3000 hits 300 home runs and a 300 batting average?
40 thousandths equals how many hundredths?
Who was Hillary Clintons running mate in the 2008 presidential elections?
How many triangles in a pentagram?
Which is greater 1500 mL or 1.5 L?
What are the dog days of summer?
What is the toughest academic course according to the Guinness Book of World Records 2011?
Why do so many foods "taste like chicken"?
Who invented Lincoln Logs?
How did chickenpox get its name?
What is doomscrolling?
How did the Wiffle Ball get its name?
Do schools still teach cursive writing?
WHAT IS THE EXPECTATION ON THE SUBJECT NSTP AND TO THE INSTRUCTOR AND CLASSMATE?
What are the manifestation of a satisfactory selling career?
How does the dwarves music affect Bilbo?
An inverted image is the characteristics of a?
Why is there a need to familiarize yourselves with morphology of fishes?
What is the grammatical name and function of this sentence before the harvest began?
How should the state react the violation of law?
How is medium a factor in representing the filipino identity in a work of art?
Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.