The document discusses graphics functions in C including line, setlinestyle, setfillstyle, fillellipse and cleardevice. It provides examples of their usage and parameters. It also lists 3 programming questions asking to draw a triangle, pentagon and bus/car using the line function.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
28 views2 pages
C Graphics Part 3
The document discusses graphics functions in C including line, setlinestyle, setfillstyle, fillellipse and cleardevice. It provides examples of their usage and parameters. It also lists 3 programming questions asking to draw a triangle, pentagon and bus/car using the line function.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Graphics - 7
• Graph function :--
• Setlinestyle ( pattern , user pattern, line width ) : this function sets the style for a line, first parameter is pattern solid line , dashed line ( from 0 to 4 where 4 is user defined pattern. Second is user defined pattern number, and third is line width which may be 1 or 3. • Line (start x, start y , end x, end y) : first two cordinates make the start point and last two coordinates make the end point of the line. • Setfillstyle(style type,color) : this first paramter in this function has 0 to 11 fill style where 0 means no fill and 1 means solid fill etc. and second parameter is color of fill. • Fillellipse(midx,midy,xradius,yradius) : to this function fills the ellipse in the pattern which is mentioned by setfillstyle function or otherwise solid fill is used. • Cleardevice () : clears the drawing made upto. Assignment – 25-01-2022 • Q.1 WAP TO DRAW A TRIANGLE USING LINE FUNCTION ON THE SCREEN. • Q.2 WAP TO DRAW A PENTAGON USING LINE FUNCTION ON THE SCREEN. • Q.3 WAP TO DRAW A LOOK OF BUS/CAR ON THE SCREEN