Search Results

Search results 1-20 of 256.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Create chinese font

    SEGGER - Florian - - emWin related

    Post

    Hi, I noticed a few things: 1. You must not comment out the super-loop in your main-task when using the Window Manager. This will only work when only using GUI_... functions in the MainTask. Otherwise emWin isn't kept alive and no more routines will be called after the MainTask finished. 2. You also have to initialize emFile and mount the external volume. Once again, have a closer look at the XBF font sample, the file is read exactly the same way. Best regards, Florian

  • Hi, widgets are essentially windows, but each with specific "widget properties" (like button color etc.). For the GIF animation it would normally make sense to use an IMAGE widget. But since you mentioned that the performance of the animation wasn't too good, it might make sense to use a normal window instead and display the animation by drawing each frame as a bitmap, like I mentioned above. See the attached example to see how this can be done. For 2D-drawings it would make sense to create a wi…

  • Hi, when calling WM_InvalidateRect() with the area specified to one of your drawings, only the parts in the area should be redrawed, as mentioned above. Is it possible to create a separate window for each of the three drawings you want to do? That way, you could redraw each drawing as you would like by invalidating the respective window. Best regards, Florian

  • Hi, a WM_PAINT case handles all the drawing operations that are done in a window. So you don't have to consider in the WM_PAINT case, which parts of the window you want to redraw. If you want to redraw a certain part of a window, you can use WM_InvalidateRect(). WM_InvalidateArea() redraws the specified area, but for all windows that are within the given area. When you're invalidating a rectangle/an area, the WM_PAINT case of the affected window (or windows) is executed as normal, except that th…

  • Hi, drawing of GIF images can become quite slow, depending on the GIF image. The more colors differ in a horizontal line, the longer it takes to draw the image. An animated gradient for example would have a big impact on performance. Also, the higher the index of one image to be drawn is, the longer it could take as well, since the search for the sub-image takes longer. To increase performance, I would suggest to convert and save the sub-images as C bitmaps or external XBF files, if your target …

  • Hi, unfortunately, the AppWizard does not currently offer the possibility to draw rounded rectangles via the Box object. But such a feature definitely makes sense and we will consider adding it with a future release. As for now, you can create a window in your application that draws a rounded rectangle. Add an interaction for your screen on INITDIALOG and set NULL as the job (e.g. ID_SCREEN_0 -> INITDIALOG -> NULL). This will generate a slot routine in the slot file of the screen, where you can …

  • Create chinese font

    SEGGER - Florian - - emWin related

    Post

    Hi, since a regular GUI_FONT is created from the XBF-file, the font can be used at any point where a font can be set, including widgets. Though it is crucial the pointers to GUI_FONT and GUI_XBF_DATA stay valid and the file is kept open while using the font. This is because, every time the font is redrawn (like when a widget uses it), the pixel data of the font is read from the file. When the font is not needed anymore (e.g. when the widget is deleted), GUI_XBF_DeleteFont() can be called and the…

  • Create chinese font

    SEGGER - Florian - - emWin related

    Post

    Hi, CreateFile() is a function provided by the Win32-API. It is used in the above example so it can be run in the emWin simulation on Windows. If you want to use an XBF font from external memory, your target needs a file system. You can then adapt the sample by replacing the Win32-functions by the equal functions provided by the target file system you are going to use. You can find an example in the SEGGER Wiki that demonstrates how external XBF fonts can be used in emWin, demonstrated via both …

  • Bitmap converter

    SEGGER - Florian - - emWin related

    Post

    Hi Pieter, The issue of incorrect output has been fixed since v5.50. You should note, when converting to best palette, the bitmap will be palette-based. This means, you will have to save the bitmap in an indexed format, such as 8bpp or RLE8. Otherwise, if choosing the "True color with alpha" format, the bitmap will be saved in the 32bpp format without a palette. Best regards, Florian

  • Hi, emWin v5.44 is three years old, but you should be able to update without complications. We're keeping in mind to keep old code compatible, e.g. by adding a macro if a function is removed or renamed. If you encounter any problems when updating, please let us know. Best regards, Florian

  • Hi, I was able to reproduce your issue. You are correct, the error occurs because the window still receives messages after being deleted. You can react on WM_TOUCH in the window that is to be deleted. When the window is touched and the state is pressed, you can safely delete the window: C Source Code (8 lines)Best regards, Florian

  • Hi, you can simply add the symbol to the text of the object. Then you will have to edit the codepoints of the fonts used for the project. This determines which characters will be included in the font. Go to Edit -> Preferences -> Edit default codepoints. Now you can define a range of characters that includes the characters you want to display, use a pattern file or only include the characters that are used in the project. When the codepoints have been updated, you will have to generate a new fon…

  • Hi, You can convert an image into 'best palette with transparency', but you should note that only 1 bit will be used to store the transparency. This means semi-transparency is not possible. An image with 'best palette (and transparency)' can be saved as 8BPP or compressed as RLE8. You can use the following command to save the bitmap with best palette and transparency as RLE8: Source Code (1 line) The RLE16 format does not support transparency. If you want to have semi-transparency in your bitmap…

  • MEMDEV Issue..

    SEGGER - Florian - - emWin related

    Post

    Hi, first of all, you should make sure that GUI_Init() has been called at the beginning of your program. Then, after your drawing operations in a memory device are finished, you have to deselect the memory device by calling GUI_MEMDEV_Select(0). If the above steps did not help you, you should make sure that you have enough memory for the PNG images and the memory device. Best regards, Florian

  • Hi, Did you make sure the VNC module files have been added to your solution? You should also check your include paths if they include GUI_VNC.h. Best regards, Florian

  • Hi, You can view and interact with your emWin application from your PC by the use of a VNC server. Note that emWin VNC routines are part of an additional module. Have a look at this example to learn how to start a VNC server from your board. Your board will need an Ethernet connection. Lastly, you need a VNC client to access your server. You can find our free VNC client on our website, but any VNC client should work. Best regards, Florian

  • Hi, the only way to do this with a YT graph is by clearing the data array when the limit has been reached. Then, newly added points will appear on the left side of the GRAPH again. You can clear the data object by calling GRAPH_DATA_YT_Clear(). Best regards, Florian

  • Hi, the easiest way would be to create a TEXT widget and place it above the IMAGE widget. If you want the TEXT widget to be drawn transparently (without a background), you can add the WM_CF_HASTRANS flag upon creation of the TEXT widget, or call WM_SetHasTrans(). Best regards, Florian

  • Hi, if you are using the same color conversion mode there's still a difference, then it is related to your target LCD. I have attached a sample for testing colors on a display. Best regards, Florian

  • Hi, can you provide me with your emWin version number and some code to reproduce the behavior? Best regards, Florian