{"id":1397,"date":"2017-12-16T18:06:01","date_gmt":"2017-12-16T17:06:01","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1397"},"modified":"2018-01-07T19:46:36","modified_gmt":"2018-01-07T18:46:36","slug":"06-graphic_2d-library-stm32f746","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1397","title":{"rendered":"06-Graphic_2D-Library (STM32F746)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1395\" title=\"05-FONT-Library (STM32F746)\"><span class=\"meta-nav\">\u2190<\/span> 05-FONT-Library (STM32F746)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1399\" title=\"07-I2c-LoLevel-Library (STM32F746)\">07-I2c-LoLevel-Library (STM32F746) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p><strong>Beschreibung :<\/strong><\/p>\n<p>Mit dieser Library k\u00f6nnen 2D-Grafik Funktionen auf dem STM32F746 Discovery-Board benutzt werden.<\/p>\n<p><strong>Module :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">stm32_ub_graphic2d.h, stm32_ub_graphic2d.c\r\n<\/pre>\n<p><strong>Includes :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">#include \"stm32_ub_system.h\"\r\n#include \"stm32_ub_lcd_480x272.h\"\r\n<\/pre>\n<p><strong>Strukturen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">typedef enum {\r\n  LCD_DIR_HORIZONTAL =0,\r\n  LCD_DIR_VERTICAL\r\n}LCD_DIR_t;\r\n\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einem Image\r\n\/\/--------------------------------------------------------------\r\ntypedef struct UB_Image_t\r\n{\r\n  const uint16_t *table; \/\/ Tabelle mit den Daten\r\n  uint16_t width;        \/\/ Breite des Bildes (in Pixel)\r\n  uint16_t height;       \/\/ Hoehe des Bildes  (in Pixel)\r\n}UB_Image;\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Einbinden der benutzen Bilder\r\n\/\/ fuer alle Bilder muss das entsprechende File\r\n\/\/ auch in der CooCox-IDE hinzugef\u00fcgt werden\r\n\/\/--------------------------------------------------------------\r\nextern UB_Image Emo2_Image;\r\n\r\n\r\n\r\n\r\n\/\/--------------------------------------------------------------\r\n\/\/ Struktur von einer Kopie-Koordinate\r\n\/\/--------------------------------------------------------------\r\ntypedef struct DMA2D_Koord_t {\r\n  uint32_t source_xp; \/\/ Quelle X-Start\r\n  uint32_t source_yp; \/\/ Quelle Y-Start\r\n  uint32_t source_w;  \/\/ Quelle Breite\r\n  uint32_t source_h;  \/\/ Quelle H\u00f6he\r\n  uint32_t dest_xp;   \/\/ Ziel X-Start\r\n  uint32_t dest_yp;   \/\/ Ziel Y-Start\r\n}DMA2D_Koord;\r\n<\/pre>\n<p><strong>Funktionen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void UB_Graphic2D_ClearSreenDMA(uint16_t c);\r\nvoid UB_Graphic2D_DrawPixelNormal(uint16_t xp, uint16_t yp, uint16_t c);\r\nvoid UB_Graphic2D_DrawLineNormal(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);\r\nvoid UB_Graphic2D_DrawStraightDMA(uint16_t xp, uint16_t yp, uint16_t l, LCD_DIR_t d, uint16_t c);\r\nvoid UB_Graphic2D_DrawRectDMA(uint16_t xp, uint16_t yp, uint16_t w, uint16_t h, uint16_t c);\r\nvoid UB_Graphic2D_DrawFullRectDMA(uint16_t xp, uint16_t yp, uint16_t w, uint16_t h, uint16_t c);\r\nvoid UB_Graphic2D_DrawCircleNormal(uint16_t xp, uint16_t yp, uint16_t r, uint16_t c);\r\nvoid UB_Graphic2D_DrawFullCircleDMA(uint16_t xp, uint16_t yp, uint16_t r, uint16_t c);\r\nvoid UB_Graphic2D_CopyImgDMA(UB_Image *img, DMA2D_Koord koord);\r\n<\/pre>\n<p><strong>Beispiel :<\/strong><br \/>\nSiehe:\u00a0<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1449\">01-F746-Demo LED, Button, LCD, Text und Grafik<\/a><\/p>\n<p>Hier die Library zum\u00a0<strong>Download :<\/strong><\/p>\n<p>06 = Graphic_2D :\u00a0<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2015\/07\/f746_graphic2d_v101.zip\">f746_graphic2d_v101<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beschreibung : Mit dieser Library k\u00f6nnen 2D-Grafik Funktionen auf dem STM32F746 Discovery-Board benutzt werden. Module : stm32_ub_graphic2d.h, stm32_ub_graphic2d.c Includes : #include &#8222;stm32_ub_system.h&#8220; #include &#8222;stm32_ub_lcd_480x272.h&#8220; Strukturen : typedef enum { LCD_DIR_HORIZONTAL =0, LCD_DIR_VERTICAL }LCD_DIR_t; \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; \/\/ Struktur von einem Image \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=1397\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":182,"menu_order":6,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[130],"tags":[141,9,105],"class_list":["post-1397","page","type-page","status-publish","hentry","category-stm32f746","tag-graphic","tag-library","tag-stm32f746"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1397"}],"version-history":[{"count":3,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1397\/revisions"}],"predecessor-version":[{"id":1923,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/1397\/revisions\/1923"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/182"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}