{"id":24823,"date":"2017-09-07T18:20:37","date_gmt":"2017-09-07T12:50:37","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=24823"},"modified":"2017-09-07T18:20:37","modified_gmt":"2017-09-07T12:50:37","slug":"putpixel-function-c","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/putpixel-function-c\/","title":{"rendered":"putpixel function in c"},"content":{"rendered":"<p>putpixel function plots a pixel at location (x, y) of specified color.<\/p>\n<p>Declaration :- void putpixel(int x, int y, int color);<\/p>\n<p>For example if we want to draw a GREEN color pixel at (35, 45) then we will write putpixel(35, 35, GREEN); in our c program, putpixel function can be used to draw circles, lines and ellipses using various algorithms.<\/p>\n[ad type=\u201dbanner\u201d]\n<h2 id=\"c-programming-code-for-putpixel\">C programming code for putpixel<\/h2>\n[pastacode lang=\u201dc\u201d manual=\u201d%23include%3Cgraphics.h%3E%0A%23include%3Cconio.h%3E%0A%20%0Amain()%0A%7B%0A%20%20%20int%20gd%20%3D%20DETECT%2C%20gm%3B%0A%20%0A%20%20%20initgraph(%26gd%2C%20%26gm%2C%20%22C%3A%5C%5CTC%5C%5CBGI%22)%3B%0A%20%0A%20%20%20putpixel(25%2C%2025%2C%20RED)%3B%0A%20%0A%20%20%20getch()%3B%0A%20%20%20closegraph()%3B%0A%20%20%20return%200%3B%0A%7D\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Output of this program will be a RED pixel on screen at (25, 25) . Try to spot that pixel with your eyes at left top portion of your computer screen.<br \/>\n[ad type=\u201dbanner\u201d]\n","protected":false},"excerpt":{"rendered":"<p>putpixel function in c &#8211; c programming &#8211; putpixel function plots a pixel at location (x, y) of specified color. Declaration  void putpixel<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[82961,82964,7385,82959,82966,82962,82965,82960,82963],"class_list":["post-24823","post","type-post","status-publish","format-standard","hentry","category-coding","tag-difference-between-setpixel-and-putpixel","tag-draw-circle-using-putpixel","tag-functions-in-c","tag-putpixel-and-getpixel-in-graphics","tag-putpixel-definition","tag-putpixel-in-turbo-c","tag-putpixel-parameters-in-graphics","tag-setpixel-in-computer-graphics","tag-use-of-putpixel-in-graphics"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=24823"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24823\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=24823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=24823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=24823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}