{"id":321,"date":"2017-11-23T21:04:27","date_gmt":"2017-11-23T20:04:27","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=321"},"modified":"2019-08-19T22:49:43","modified_gmt":"2019-08-19T20:49:43","slug":"19-lcd_graphic-library-stm32f429","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f429\/komplette-library-liste-stm32f429\/19-lcd_graphic-library-stm32f429\/","title":{"rendered":"19-LCD_Graphic-Library (STM32F429)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f429\/komplette-library-liste-stm32f429\/18-i2c_slave-library-stm32f429\/\" title=\"18-I2C_Slave-Library (STM32F429)\"><span class=\"meta-nav\">\u2190<\/span> 18-I2C_Slave-Library (STM32F429)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f429\/komplette-library-liste-stm32f429\/20-spi_l3gd20-library-stm32f429\/\" title=\"20-SPI_L3GD20-Library (STM32F429)\">20-SPI_L3GD20-Library (STM32F429) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p>Diese Library dient zum zeichnen von Punkten, Linien und Kreisen auf dem LC-Display.<br \/>\nEs k\u00f6nnen auch im Flash gespeicherte Bilder auf das Display gezeichnet werden.<\/p>\n<p>Sie ben\u00f6tigt dazu die LCD-Library \u201c<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=295\">STM32_UB_LCD_ILI9341<\/a>\u2033<\/p>\n<p>Im Moment werden 3 Bildformate unterst\u00fctzt :<br \/>\n1. = 16Bit (RGB565) \u2013 Image-Files<br \/>\n2. = Bitmap Files (BMP, 24bpp, unkompremiert)<br \/>\n3. = JPG Files<\/p>\n<p>F\u00fcr das Format Nr. 1 habe ich das PC-Programm \u201c<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=140#P02\">ImageGenerator<\/a>\u201d geschrieben. Das wandelt beliebige BMP-Files in das RGB565-Format um und erzeugt ein C-File, das in der CooCox-IDE eingebunden werden kann.<\/p>\n<p>F\u00fcr die beiden anderen Formate (2 und 3) habe ich das PC-Programm \u201c<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=140#P03\">FileConverter<\/a>\u201d geschrieben. Dieses lie\u00dft ein beliebiges Hex-File (z.B. ein JPG-File) und erzeugt daraus ein C-File,\u00a0\u00a0das in der CooCox-IDE eingebunden werden kann.<\/p>\n<p><span style=\"text-decoration: underline;\">Speicherverbrauch :<\/span><br \/>\nEin Image-Bild mit 240\u00d7320 Pixel braucht 153.600 Bytes<br \/>\nEin BMP-Bild mit 240\u00d7320 Pixel braucht\u00a0230.454 Bytes<br \/>\nEin JPG-Bild mit 240\u00d7320 Pixel braucht ca. 15.323 Bytes<\/p>\n<p><strong>Beispielbild :<\/strong><\/p>\n<p><a href=\"wp-content\/uploads\/2013\/11\/graphic_f429.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2947\" src=\"wp-content\/uploads\/2013\/11\/graphic_f429-179x300.jpg\" alt=\"graphic_f429\" width=\"179\" height=\"300\" \/><\/a><\/p>\n<p><strong>Enumerationen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">typedef enum {\r\n  GRAPHIC_OK =0,\r\n  GRAPHIC_FILE_ERR,\r\n  GRAPHIC_SIZE_ERR,\r\n  GRAPHIC_ID_ERR,\r\n  GRAPHIC_HEAD_ERR,\r\n  GRAPHIC_WIDTH_ERR,\r\n  GRAPHIC_HEIGHT_ERR,\r\n  GRAPHIC_BPP_ERR,\r\n  GRAPHIC_COMPR_ERR\r\n}GRAPHIC_ERR_t;<\/pre>\n<p><strong>Funktionen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void UB_Graphic_DrawPixel(int16_t xpos, int16_t ypos, uint16_t color);                       \/\/ zeichnet einen Pixel\r\nvoid UB_Graphic_DrawLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);    \/\/ zeichnet eine Linie zwischen zwei Punkten\r\nvoid UB_Graphic_DrawCircle(int16_t x0, int16_t y0, int16_t radius, uint16_t color);          \/\/ zeichnet einen Kreis an Punkt x,y mit Radius r\r\nGRAPHIC_ERR_t UB_Graphic_DrawImage(UB_Image *img, int16_t xpos, int16_t ypos);               \/\/ zeichnet ein Image aus dem Flash\r\nGRAPHIC_ERR_t UB_Graphic_DrawBmp(UB_Picture *bmp, uint16_t xpos, uint16_t ypos);             \/\/ zeichnet ein BMP-File aus dem Flash\r\nGRAPHIC_ERR_t UB_Graphic_DrawJpg(UB_Picture *jpg, uint16_t xpos, uint16_t ypos);<\/pre>\n<p><strong>Beispiel :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">\/\/--------------------------------------------------------------\r\n\/\/ File     : main.c\r\n\/\/ Datum    : 06.11.2013\r\n\/\/ Version  : 1.0\r\n\/\/ Autor    : UB\r\n\/\/ EMail    : mc-4u(@)t-online.de\r\n\/\/ Web      : www.mikrocontroller-4u.de\r\n\/\/ CPU      : STM32F429\r\n\/\/ IDE      : CooCox CoIDE 1.7.4\r\n\/\/ GCC      : 4.7 2012q4\r\n\/\/ Module   : CMSIS_BOOT, M4_CMSIS_CORE\r\n\/\/ Funktion : Demo der LCD-Graphic-Library\r\n\/\/ Hinweis  : Diese zwei Files muessen auf 8MHz stehen\r\n\/\/              \"cmsis_boot\/stm32f4xx.h\"\r\n\/\/              \"cmsis_boot\/system_stm32f4xx.c\"\r\n\/\/ In Configuration diese Define hinzuf\u00fcgen :\r\n\/\/ \"STM32F429_439xx\" , \"__ASSEMBLY__\" , \"USE_STDPERIPH_DRIVER\"\r\n\/\/--------------------------------------------------------------\r\n\r\n#include \"main.h\"\r\n#include \"stm32_ub_lcd_ili9341.h\"\r\n#include \"stm32_ub_graphic.h\"\r\n\r\nint main(void)\r\n{\r\n  SystemInit(); \/\/ Quarz Einstellungen aktivieren\r\n\r\n  \/\/ Init vom LCD\r\n  UB_LCD_Init();\r\n  \/\/ Init der Layer\r\n  UB_LCD_LayerInit_Fullscreen();\r\n  \/\/ auf Hintergrund schalten\r\n  UB_LCD_SetLayer_1();\r\n  \/\/ Hintergrund komplett mit einer Farbe f\u00fcllen\r\n  UB_LCD_FillLayer(RGB_COL_WHITE);\r\n  \/\/ auf Vordergrund schalten\r\n  UB_LCD_SetLayer_2();\r\n  \/\/ Vordergrund komplett mit einer Farbe f\u00fcllen\r\n  UB_LCD_FillLayer(RGB_COL_GREEN);\r\n\r\n  UB_LCD_Rotate_180();\r\n\r\n  \/\/ Ein Image (aus dem Flash) Zeichnen\r\n  UB_Graphic_DrawImage(&amp;Emo2_Image,0,0);\r\n\r\n  \/\/ Ein BMP-File (aus dem Flash) Zeichnen\r\n  UB_Graphic_DrawBmp(&amp;Emo2_Bmp,30,95);\r\n\r\n  \/\/ Ein JPG-File (aus dem Flash) Zeichnen\r\n  UB_Graphic_DrawJpg(&amp;Emo2_Jpg,60,190);\r\n\r\n  \/\/ rote Linie zeichnen\r\n  UB_Graphic_DrawLine(10,20,100,150,RGB_COL_RED);\r\n\r\n  \/\/ wei\u00dfen kreis zeichnen\r\n  UB_Graphic_DrawCircle(70,75,50,RGB_COL_WHITE);\r\n\r\n  while(1)\r\n  {\r\n\r\n  }\r\n}\r\n<\/pre>\n<p>Hier die Library zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"wp-content\/uploads\/2013\/11\/bilder_flash_f429_v100.zip\">bilder_flash_f429_v100<\/a><\/p>\n<p>Hier der komplette CooCox-Projektordner zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"wp-content\/uploads\/2013\/11\/Demo_F429_19.zip\">Demo_F429_19<\/a><\/p>\n<p>Hier der Link zu meinen PC-Programmen :<\/p>\n<p><a title=\"PC-Programme von mir\" href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=140\">PC-Programme<\/a><\/p>\n<hr \/>\n<h3 id=\"comments-title\">27 Antworten auf <em>19-LCD_Graphic-Library (STM32F429)<\/em><\/h3>\n<ol class=\"commentlist\">\n<li id=\"li-comment-986\" class=\"comment even thread-even depth-1\">\n<div id=\"comment-986\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/b6559687cf16fca453433255d848f827?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">whitecrane18<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">8. November 2013 um 00:01<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Wie k\u00f6nnte man am einfachsten die Lib um einen Kreis gef\u00fcllt mit Farbe erweitern? Oder w\u00e4re die Funktion DrawPixel da vllt. einfacher f\u00fcr ein Zeichenprogramm zu handhaben?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-996\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-996\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">8. November 2013 um 21:07<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>bei den STM-Beispielen sind alle m\u00f6glichen Funktionen dabei, auch gef\u00fcllte Kreise.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-999\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-999\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/b6559687cf16fca453433255d848f827?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">whitecrane18<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">8. November 2013 um 23:44<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Habe mich dem fertigen Paint bedient, wobei ich das Ganze nichdiri Libs kopiert habe, sondern einfach alle zus\u00e4tzlichen Funktion in der main untergebracht ha.<\/p>\n<p>Der 3 Achsen Sensor ist ja mal genial. Danke fur die lib 20.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-1692\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-1692\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/ddd465b2e7f541b9936633743ec6e8f0?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\"><a class=\"url\" href=\"http:\/\/ugfx.org\/\" rel=\"external nofollow\">Tectu<\/a><\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">10. Mai 2014 um 22:24<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Nice work.<br \/>\nHave you ever bothered with using uGFX as your graphics and GUI library? <a href=\"http:\/\/ugfx.org\/\" rel=\"nofollow\">http:\/\/ugfx.org<\/a><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1703\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-1703\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Mai 2014 um 19:24<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>no<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1864\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-1864\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/418fc492f484a9b1d6b793f8e2d88873?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">piker<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. Juni 2014 um 11:37<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>First off your work is amazing helpful to people that are not STM32F4 experts. The examples ST provides especially graphics and touch for the STM32F429 are so unnecessarily complex while your code makes it so much easier to grasp the concepts behind the functions.<\/p>\n<p>I devised a rounded rectangle function using a combination of your 2d functions. It is not as optimized as it should be because I cheat by drawing filled circles in each corner but it is easy to use. I thought I would share it below.<\/p>\n<p><code><br \/>\nvoid UB_Graphic2D_DrawRoundedRecDMA(uint16_t xp, uint16_t yp, uint16_t w, uint16_t h, uint16_t r, uint16_t c)<br \/>\n{<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+r, yp, w-2*r, h, c);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp, yp+r, r, h-2*r, c);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+w-r, yp+r, r, h-2*r, c);<br \/>\nUB_Graphic2D_DrawFullCircleDMA(xp+r, yp+r, r, c);<br \/>\nUB_Graphic2D_DrawFullCircleDMA(xp+w-r-1, yp+r, r, c);<br \/>\nUB_Graphic2D_DrawFullCircleDMA(xp+r, yp+h-r-1, r, c);<br \/>\nUB_Graphic2D_DrawFullCircleDMA(xp+w-r-1, yp+h-r-1, r, c);<br \/>\n}<br \/>\n<\/code><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1865\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-1865\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. Juni 2014 um 18:32<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>nice idea<br \/>\nfor a outline version you need a arc function<br \/>\n(perhaps you can modify the circle function to draw only one quarter <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":-)\" \/><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1866\" class=\"comment odd alt depth-3\">\n<div id=\"comment-1866\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/418fc492f484a9b1d6b793f8e2d88873?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Bruce Duncan<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Juni 2014 um 00:37<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>I love a challenge.<br \/>\nHere is a more optimized filled rounded rectangle and also a rounded rectangle outline version<br \/>\n<code><br \/>\nvoid UB_Graphic2D_RoundedRect(uint16_t xp, uint16_t yp,uint16_t width,uint16_t height, uint16_t radius, uint16_t color)<br \/>\n{<br \/>\nint32_t  D;\/* Decision Variable *\/<br \/>\nuint32_t  CurX;\/* Current X Value *\/<br \/>\nuint32_t  CurY;\/* Current Y Value *\/ <\/code><\/p>\n<p>if(xp&gt;=LCD_MAXX) xp=LCD_MAXX-1;<br \/>\nif(yp&gt;=LCD_MAXY) yp=LCD_MAXY-1;<br \/>\nif(radius==0) return;<br \/>\nD = 3 &#8211; (radius &lt;&lt; 1);<br \/>\nCurX = 0;<br \/>\nCurY = radius;<br \/>\n\/*<br \/>\n*<br \/>\nQ4 * Q1<br \/>\n*<br \/>\n*************<br \/>\n*<br \/>\nQ3 * Q2<br \/>\n*<br \/>\n*\/<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius, yp, width-2*radius, LCD_DIR_HORIZONTAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius, yp+height-1, width-2*radius, LCD_DIR_HORIZONTAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp, yp+radius, height-2*radius, LCD_DIR_VERTICAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+width-1, yp+radius, height-2*radius, LCD_DIR_VERTICAL, color);<br \/>\nwhile (CurX &lt;= CurY)<br \/>\n{<\/p>\n<p>UB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurX, yp+radius &#8211; CurY, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurY, yp+radius &#8211; CurX, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurX, yp +height-radius-1+ CurY, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurY, yp + height-radius-1+CurX, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurX, yp+height-radius-1+ CurY, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurY, yp+height-radius-1+ CurX, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurX, yp+radius &#8211; CurY, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurY, yp+radius &#8211; CurX, color); \/\/Q4<\/p>\n<p>if (D &lt; 0)<br \/>\n{<br \/>\nD += (CurX &lt;&lt; 2) + 6;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nD += ((CurX &#8211; CurY) &lt;=LCD_MAXX) xp=LCD_MAXX-1;<br \/>\nif(yp&gt;=LCD_MAXY) yp=LCD_MAXY-1;<br \/>\nif(radius==0) return;<br \/>\nD = 3 &#8211; (radius &lt;&lt; 1);<br \/>\nCurX = 0;<br \/>\nCurY = radius;<br \/>\n\/*<br \/>\n*<br \/>\nQ4 * Q1<br \/>\n*<br \/>\n*************<br \/>\n*<br \/>\nQ3 * Q2<br \/>\n*<br \/>\n*\/<br \/>\n\/\/Draw filled rectangles first<br \/>\n\/*<br \/>\n________<br \/>\n__| |__<br \/>\n| |<br \/>\n|__ __|<br \/>\n|________|<br \/>\n*\/<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+radius, yp, width-2*radius, height, color);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp, yp+radius, radius, height-2*radius, color);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+width-radius, yp+radius, radius, height-2*radius, color);<\/p>\n<p>\/\/draw 1\/4 filled circles in each corner<br \/>\nwhile (CurX &lt;= CurY)<br \/>\n{<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+radius &#8211; CurY, radius-(radius-CurX), LCD_DIR_HORIZONTAL, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+radius &#8211; CurX, radius-(radius-CurY), LCD_DIR_HORIZONTAL, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+height-radius-1 + CurY, radius-(radius-CurX), LCD_DIR_HORIZONTAL, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+height-radius-1 + CurX, radius-(radius-CurY), LCD_DIR_HORIZONTAL, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurX,yp+radius &#8211; CurY, xp-radius + CurX, LCD_DIR_HORIZONTAL, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurY,yp+radius &#8211; CurX, xp-radius + CurY, LCD_DIR_HORIZONTAL, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurX, yp+height-radius-1+ CurY,xp-radius + CurX,LCD_DIR_HORIZONTAL, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurY, yp+height-radius-1+ CurX,xp-radius + CurY,LCD_DIR_HORIZONTAL, color); \/\/Q3<\/p>\n<p>if (D &lt; 0)<br \/>\n{<br \/>\nD += (CurX &lt;&lt; 2) + 6;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nD += ((CurX &#8211; CurY) &lt;&lt; 2) + 10;<br \/>\nCurY&#8211;;<br \/>\n}<br \/>\nCurX++;<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-1867\" class=\"comment even depth-3\">\n<div id=\"comment-1867\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/418fc492f484a9b1d6b793f8e2d88873?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Piker<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Juni 2014 um 00:42<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Sorry that really got screwed up. Here it is again<br \/>\n<code><br \/>\nvoid UB_Graphic2D_FullRoundedRect(uint16_t xp, uint16_t yp,uint16_t width,uint16_t height, uint16_t radius, uint16_t color)<br \/>\n{<br \/>\nint32_t  D;\/* Decision Variable *\/<br \/>\nuint32_t  CurX;\/* Current X Value *\/<br \/>\nuint32_t  CurY;\/* Current Y Value *\/ <\/code><\/p>\n<p>if(xp&gt;=LCD_MAXX) xp=LCD_MAXX-1;<br \/>\nif(yp&gt;=LCD_MAXY) yp=LCD_MAXY-1;<br \/>\nif(radius==0) return;<br \/>\nD = 3 &#8211; (radius &lt;&lt; 1);<br \/>\nCurX = 0;<br \/>\nCurY = radius;<br \/>\n\/*<br \/>\n*<br \/>\nQ4 * Q1<br \/>\n*<br \/>\n*************<br \/>\n*<br \/>\nQ3 * Q2<br \/>\n*<br \/>\n*\/<br \/>\n\/\/Draw filled rectangles first<br \/>\n\/*<br \/>\n________<br \/>\n__| |__<br \/>\n| |<br \/>\n|__ __|<br \/>\n|________|<br \/>\n*\/<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+radius, yp, width-2*radius, height, color);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp, yp+radius, radius, height-2*radius, color);<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp+width-radius, yp+radius, radius, height-2*radius, color);<\/p>\n<p>\/\/draw 1\/4 filled circles in each corner<br \/>\nwhile (CurX &lt;= CurY)<br \/>\n{<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+radius &#8211; CurY, radius-(radius-CurX), LCD_DIR_HORIZONTAL, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+radius &#8211; CurX, radius-(radius-CurY), LCD_DIR_HORIZONTAL, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+height-radius-1 + CurY, radius-(radius-CurX), LCD_DIR_HORIZONTAL, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + width-radius, yp+height-radius-1 + CurX, radius-(radius-CurY), LCD_DIR_HORIZONTAL, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurX,yp+radius &#8211; CurY, xp-radius + CurX, LCD_DIR_HORIZONTAL, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurY,yp+radius &#8211; CurX, xp-radius + CurY, LCD_DIR_HORIZONTAL, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurX, yp+height-radius-1+ CurY,xp-radius + CurX,LCD_DIR_HORIZONTAL, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius &#8211; CurY, yp+height-radius-1+ CurX,xp-radius + CurY,LCD_DIR_HORIZONTAL, color); \/\/Q3<\/p>\n<p>if (D &lt; 0)<br \/>\n{<br \/>\nD += (CurX &lt;&lt; 2) + 6;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nD += ((CurX &#8211; CurY) &lt;=LCD_MAXX) xp=LCD_MAXX-1;<br \/>\nif(yp&gt;=LCD_MAXY) yp=LCD_MAXY-1;<br \/>\nif(radius==0) return;<br \/>\nD = 3 &#8211; (radius &lt;&lt; 1);<br \/>\nCurX = 0;<br \/>\nCurY = radius;<br \/>\n\/*<br \/>\n*<br \/>\nQ4 * Q1<br \/>\n*<br \/>\n*************<br \/>\n*<br \/>\nQ3 * Q2<br \/>\n*<br \/>\n*\/<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius, yp, width-2*radius, LCD_DIR_HORIZONTAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+radius, yp+height-1, width-2*radius, LCD_DIR_HORIZONTAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp, yp+radius, height-2*radius, LCD_DIR_VERTICAL, color);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp+width-1, yp+radius, height-2*radius, LCD_DIR_VERTICAL, color);<br \/>\nwhile (CurX &lt;= CurY)<br \/>\n{<\/p>\n<p>UB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurX, yp+radius &#8211; CurY, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurY, yp+radius &#8211; CurX, color); \/\/Q1<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurX, yp +height-radius-1+ CurY, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + width-radius-1+CurY, yp + height-radius-1+CurX, color); \/\/Q2<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurX, yp+height-radius-1+ CurY, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurY, yp+height-radius-1+ CurX, color); \/\/Q3<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurX, yp+radius &#8211; CurY, color); \/\/Q4<br \/>\nUB_Graphic2D_DrawPixelNormal(xp+radius &#8211; CurY, yp+radius &#8211; CurX, color); \/\/Q4<\/p>\n<p>if (D &lt; 0)<br \/>\n{<br \/>\nD += (CurX &lt;&lt; 2) + 6;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nD += ((CurX &#8211; CurY) &lt;&lt; 2) + 10;<br \/>\nCurY&#8211;;<br \/>\n}<br \/>\nCurX++;<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-1868\" class=\"comment odd alt depth-3\">\n<div id=\"comment-1868\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/418fc492f484a9b1d6b793f8e2d88873?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Piker<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Juni 2014 um 00:48<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>I can\u2019t seem to post it complete as the site is messing with my code. If you know a better way I will try.<\/p>\n<p>Thanks<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1870\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-4\">\n<div id=\"comment-1870\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Juni 2014 um 08:19<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>use Code-Tags or send it over email<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1872\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-1872\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/fe4b0511a47c9944febd4221049ad403?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Milas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. Juni 2014 um 10:01<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hier meine Methoden:<\/p>\n<p>F\u00fcr das abgerundete Rechteck werden zun\u00e4chst die verk\u00fcrzten geraden gezeichnet<br \/>\nund die Ecken mittels modifizierten Bresenham Kreis (Offset f\u00fcr jeden Quadranten) gezeichnet.<\/p>\n<p><code><br \/>\n\/\/--------------------------------------------------------------<br \/>\n\/\/ Zeichnet ein abgerundetes Rechteck mit einer Farbe<br \/>\n\/\/ Ecke = xp, yp [x = 0...LCD_MAXX, y = 0...LCD_MAXY]<br \/>\n\/\/ Breite = w<br \/>\n\/\/ Hoehe = h<br \/>\n\/\/ Radius = r<br \/>\n\/\/ Color = c<br \/>\n\/\/--------------------------------------------------------------<br \/>\nvoid UB_Graphic2D_DrawRoundedRectDMA(uint16_t xp, uint16_t yp, uint16_t w, uint16_t h, uint16_t r, uint16_t c)<br \/>\n{<br \/>\nint16_t d;<br \/>\nint16_t f = 1 - r, ddF_x = 0, ddF_y = -2 * r, x = 0, y = r;<\/code><\/p>\n<p>\/\/ check auf Limit<br \/>\nif (xp &gt;= LCD_MAXX) xp = LCD_MAXX &#8211; 1;<br \/>\nif (yp &gt;= LCD_MAXY) yp = LCD_MAXY &#8211; 1;<br \/>\nif (w == 0 || h == 0) return;<br \/>\nif (w &lt; 2 * r || h w || 2 * r &gt; h) r = h \/ 2;<\/p>\n<p>if (LCD_DISPLAY_MODE == LANDSCAPE)<br \/>\n{<br \/>\n\/\/ Richtung Drehen<br \/>\nd = w;<br \/>\nw = h;<br \/>\nh = d;<br \/>\n}<\/p>\n<p>\/\/ check auf Limit<br \/>\nif ((xp + w) &gt; LCD_MAXX) w = LCD_MAXX &#8211; xp;<br \/>\nif ((yp + h) &gt; LCD_MAXY) h = LCD_MAXY &#8211; yp;<\/p>\n<p>if (LCD_DISPLAY_MODE == LANDSCAPE)<br \/>\n{<br \/>\nUB_Graphic2D_DrawStraightDMA(xp, yp + r, h &#8211; 2 * r, LCD_DIR_HORIZONTAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA((xp + w &#8211; 1), yp + r, h &#8211; 2 * r, LCD_DIR_HORIZONTAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r, yp, w &#8211; 2 * r, LCD_DIR_VERTICAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r, yp + h &#8211; 1, w &#8211; 2 * r, LCD_DIR_VERTICAL, c);<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r, yp, w &#8211; 2 * r, LCD_DIR_HORIZONTAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r, yp + h &#8211; 1, w &#8211; 2 * r, LCD_DIR_HORIZONTAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp, yp + r, h &#8211; 2 * r, LCD_DIR_VERTICAL, c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + w &#8211; 1, yp + r, h &#8211; 2 * r, LCD_DIR_VERTICAL, c);<br \/>\n}<\/p>\n<p>\/\/ check auf Limit<br \/>\nif (r == 0) return;<\/p>\n<p>while(x = 0)<br \/>\n{<br \/>\ny&#8211;;<br \/>\nddF_y += 2;<br \/>\nf += ddF_y;<br \/>\n}<br \/>\nx++;<br \/>\nddF_x += 2;<br \/>\nf += ddF_x + 1;<\/p>\n<p>UB_Graphic2D_DrawPixelNormal(xp &#8211; r + w &#8211; 1 + x,yp &#8211; r + h &#8211; 1 + y,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + r &#8211; x,yp &#8211; r + h &#8211; 1 + y,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp &#8211; r + w &#8211; 1 + x,yp + r &#8211; y,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + r &#8211; x,yp + r &#8211; y,c);<\/p>\n<p>UB_Graphic2D_DrawPixelNormal(xp &#8211; r + w &#8211; 1 + y,yp &#8211; r + h &#8211; 1 + x,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + r &#8211; y,yp &#8211; r + h &#8211; 1 + x,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp &#8211; r + w &#8211; 1 + y,yp + r &#8211; x,c);<br \/>\nUB_Graphic2D_DrawPixelNormal(xp + r &#8211; y,yp + r &#8211; x,c);<br \/>\n}<\/p>\n<p>}<\/p>\n<p>F\u00fcr das abgerundete gef\u00fcllte Viereck wird zu\u00e4nchst das \u201cinnere\u201d gef\u00fcllte Rechteck gezeichnet. F\u00fcr den Rest wird der \u201cBresenham Kreis\u201d zum Zeichnen der Linien benutzt.<\/p>\n<p><code><br \/>\n\/\/--------------------------------------------------------------<br \/>\n\/\/ Zeichnet ein gefuelltes abgerundetes Rechteck mit einer Farbe<br \/>\n\/\/ Ecke = xp, yp [x = 0...LCD_MAXX, y = 0...LCD_MAXY]<br \/>\n\/\/ Breite = w<br \/>\n\/\/ Hoehe = h<br \/>\n\/\/ Radius = r<br \/>\n\/\/ Farbe = c<br \/>\n\/\/ Farbe der Umrandung = oc<br \/>\n\/\/--------------------------------------------------------------<br \/>\nvoid UB_Graphic2D_DrawFullRoundedRectDMA(uint16_t xp, uint16_t yp, uint16_t w, uint16_t h, uint16_t r, COLOR_TYPE c, uint16_t oc)<br \/>\n{<br \/>\nint16_t f = 1 - r, ddF_x = 0, ddF_y = -2 * r, x = 0, y = r;<\/code><\/p>\n<p>\/\/ check auf Limit<br \/>\nif (xp &gt;= LCD_MAXX) xp = LCD_MAXX &#8211; 1;<br \/>\nif (yp &gt;= LCD_MAXY) yp = LCD_MAXY &#8211; 1;<br \/>\nif (w == 0 || h == 0) return;<br \/>\nif (w &lt; 2 * r || h w || 2 * r &gt; h) r = h \/ 2;<\/p>\n<p>\/\/ check auf Limit<br \/>\nif (r == 0)<br \/>\n{<br \/>\n\/\/ keine Rundung =&gt; zeichne normale Rechteck<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp, yp, w, h, c, oc);<br \/>\nreturn;<br \/>\n}<\/p>\n<p>\/\/ Zeichne inneres Rechteck<br \/>\nUB_Graphic2D_DrawFullRectDMA(xp, yp + r, w, h &#8211; 2 * r, c, c);<\/p>\n<p>\/\/ Zeichne den Rest<br \/>\nwhile(x = 0)<br \/>\n{<br \/>\ny&#8211;;<br \/>\nddF_y += 2;<br \/>\nf += ddF_y;<br \/>\n}<br \/>\nx++;<br \/>\nddF_x += 2;<br \/>\nf += ddF_x + 1;<\/p>\n<p>UB_Graphic2D_DrawStraightDMA(xp + r &#8211; x,yp &#8211; r + h &#8211; 1 + y,w &#8211; 1 &#8211; 2 * (r &#8211; x),LCD_DIR_HORIZONTAL,c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r &#8211; x,yp + r &#8211; y,w &#8211; 1 &#8211; 2 * (r &#8211; x),LCD_DIR_HORIZONTAL,c);<\/p>\n<p>UB_Graphic2D_DrawStraightDMA(xp + r &#8211; y,yp &#8211; r + h &#8211; 1 + x,w &#8211; 1 &#8211; 2 * (r &#8211; y),LCD_DIR_HORIZONTAL,c);<br \/>\nUB_Graphic2D_DrawStraightDMA(xp + r &#8211; y,yp + r &#8211; x,w &#8211; 1 &#8211; 2 * (r &#8211; y),LCD_DIR_HORIZONTAL,c);<br \/>\n}<\/p>\n<p>\/\/ Zeichne Au\u00dfenlinie<br \/>\nUB_Graphic2D_DrawRoundedRectDMA(xp, yp, w, h, r, oc);<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1876\" class=\"comment even depth-2\">\n<div id=\"comment-1876\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/4e23e9f52929626cd12cdfc16250e0a7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Piker<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">14. Juni 2014 um 22:23<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Looks good thanks. I\u2019ll try it out and see if it\u2019s more efficient than mine<br \/>\nBTW I just found an amazing font tool called LCD bitmap converter<br \/>\nIt does proportional fonts as we\u2019ll. the draw string functions get next char sub function on the website needs tweeting to work as the font data size is not defined by the generated code but is easy to add and the counter needs to be zeroed at the beginning of each width for loop. It doesn\u2019t work otherwise. The font tool on this site is also great but the above program is a lot more comprehensive. I haven\u2019t figured out how to do anti aliased fonts with it yet but it looks possible<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-1908\" class=\"comment odd alt depth-2\">\n<div id=\"comment-1908\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/418fc492f484a9b1d6b793f8e2d88873?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Piker<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">26. Juni 2014 um 11:01<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>I tried your code and there are a few weird parts that may have been messed up by this web site like<br \/>\n<code>if (w  h) r = h \/ 2;   <\/code><br \/>\nhw?<\/p>\n<p>and this part<br \/>\n<code><br \/>\nwhile(x = 0)<br \/>\n{<br \/>\ny--;<br \/>\nddF_y += 2;<br \/>\nf += ddF_y;<br \/>\n}<br \/>\nx++;<br \/>\nddF_x += 2;<br \/>\nf += ddF_x + 1;<br \/>\n<\/code><\/p>\n<p>The result I get is more like a bevel or 45 degree corner than a radius<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1909\" class=\"comment even depth-3\">\n<div id=\"comment-1909\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/fe4b0511a47c9944febd4221049ad403?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Milas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. Juni 2014 um 08:43<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>The code output on this website looks strange<br \/>\nthe GT and LT signs cut some other signs, so the code seems useless with a lot of errors compared to my original<\/p>\n<p>so unfortunately the code take does not work very good<\/p>\n<p>I have modified the ub-libraries for RGB16, RGB24 and ARGB32 color modes and also added a lot of functions like flood fill, edge fill, ellipse, \u2026 but have not fond the time check them all<\/p>\n<p>If I have, I will post the source<\/p>\n<p>Is there a place to link Source or text files?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1910\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-4\">\n<div id=\"comment-1910\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. Juni 2014 um 10:57<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>sorry, the code tags do not work correctly in wordpress. please send the sourcefiles per email and i will upload it here with a \u201cuntested\u201d comment<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-2848\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-2848\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/656bb93d7eea76ebd6d09c7b00a083d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Johnny Dreher<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">19. Januar 2015 um 19:30<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hello. I\u2019m trying to use this example with STM32F405VG, this is possible? Some libraries isn\u2019t available for this. Do you sugest some example to try to put this working?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2854\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-2854\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. Januar 2015 um 21:29<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>try this lib<br \/>\n<a href=\"index7dca.html?page_id=507\" rel=\"nofollow\">http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=507<\/a><br \/>\ni think the f405 dont have a ltdc controller<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2855\" class=\"comment even depth-3\">\n<div id=\"comment-2855\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/656bb93d7eea76ebd6d09c7b00a083d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Johnny Dreher<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. Januar 2015 um 22:02<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>This library is used with a LCD with controller. I\u2019m trying to use a LCD without controller, like this example for STM32F429Disco\u2026<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2856\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-4\">\n<div id=\"comment-2856\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. Januar 2015 um 22:33<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>as i wrote the stm32f405 dont have a internal lcd controller (like the stm32f429) so you can\u2019t connect a lcd directly. perhaps you can generate the signals with the cpu (two timers and the dma like in my vga lib) but this isnt a good way. use another lcd or another cpu.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2859\" class=\"comment even depth-5\">\n<div id=\"comment-2859\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/656bb93d7eea76ebd6d09c7b00a083d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Johnny Dreher<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">21. Januar 2015 um 03:40<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Well, I\u2019ll try another soluction. Thank you. Your sites helps me a lot<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-2967\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-2967\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/bf30e169224e064a88f9720cdf86d608?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ryan<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. M\u00e4rz 2015 um 14:34<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi again UB,<\/p>\n<p>I would like to store some images in memory IS42S16400J.<br \/>\nHow can I do this using this library?<\/p>\n<p>Thanks Again!!<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2977\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-2977\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">14. M\u00e4rz 2015 um 12:13<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>this library is only for \u201cpainting\u201d an image (bmp, jpg, raw) on a display.<br \/>\ni dont understand your task. what sort of \u201cimage\u201d and where they come from ?<br \/>\nIn a RAM you can only store temporarily. So you need a ROM as source.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2985\" class=\"comment odd alt depth-3\">\n<div id=\"comment-2985\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/bf30e169224e064a88f9720cdf86d608?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ryan<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">16. M\u00e4rz 2015 um 15:49<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Now I saw that IS42S16400J is not ROM.<\/p>\n<p>I am very beginner, loved their libraries, I\u2019m doing a little game to play with my brother.<\/p>\n<p>We are struggling to insert multiple images, the memory becomes full after a few images.<\/p>\n<p>When we used the PIC18 microchip we used SD cards, but do not know how I could do with STM, if we insert Flash Memory or if we can use SD card.<\/p>\n<p>Some personal suggestions?<\/p>\n<p>Thanks again..<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2988\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-4\">\n<div id=\"comment-2988\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">16. M\u00e4rz 2015 um 19:09<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>You can go both ways. Flash or SD-Card.<br \/>\nThis Lib can draw JPG-Files. So you need only 15kByte<br \/>\nfor a complete picture. The F429 has 2MByte Flash !!<br \/>\nis this enough ? <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_wink.gif\" alt=\";-)\" \/> If not, load the pictures from a 2GB Card.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-4994\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-4994\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/1a3f7a60c68e07bffed9448be653b00a?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Armin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">10. April 2017 um 20:21<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi Uwe,<\/p>\n<p>ich hab in der Funktion \u201cUB_Graphic_DrawImage\u201d einen Fehler entdeckt.<br \/>\n\u201cUB_LCD_SetCursor2Draw(img-&gt;height+xpos-ypos-1,ypos);\u201d m\u00fcsste korrekterweise<br \/>\n\u201cUB_LCD_SetCursor2Draw(img-&gt;height+xpos-1,ypos+yn);\u201d hei\u00dfen, ansonsten wird permanent die selbe Zeile \u00fcberschrieben und das Bild wird nicht gezeichnet.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-4995\" class=\"comment even depth-2\">\n<div id=\"comment-4995\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/1a3f7a60c68e07bffed9448be653b00a?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Armin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">10. April 2017 um 20:23<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>* Korrektur: die Funktion hei\u00dft eigentlich<\/p>\n<p>UB_LCD_SetCursor2Draw(img-&gt;height+xpos-yn-1,ypos);<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Diese Library dient zum zeichnen von Punkten, Linien und Kreisen auf dem LC-Display. Es k\u00f6nnen auch im Flash gespeicherte Bilder auf das Display gezeichnet werden. Sie ben\u00f6tigt dazu die LCD-Library \u201cSTM32_UB_LCD_ILI9341\u2033 Im Moment werden 3 Bildformate unterst\u00fctzt : 1. = &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f429\/komplette-library-liste-stm32f429\/19-lcd_graphic-library-stm32f429\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":160,"menu_order":19,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[129],"tags":[169,141,139,9,102],"class_list":["post-321","page","type-page","status-publish","hentry","category-stm32f429","tag-grafik","tag-graphic","tag-lcd","tag-library","tag-stm32f429"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/comments?post=321"}],"version-history":[{"count":9,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/321\/revisions"}],"predecessor-version":[{"id":2642,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/321\/revisions\/2642"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/160"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/media?parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/categories?post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/tags?post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}