REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    How to fit HMI to specific screen resolution

    REXYGEN HMI Designer
    hmi designer screen resolution
    2
    2
    465
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cechuratC
      cechurat
      last edited by

      The HMI Designer generates an HTML file with a SVG image. The SVG is using the "viewbox" attribute to fit the screen and preserve the aspect ratio.
      To optimize the SVG you need to elaborate with the Document Properties of the *.hmi.svg source file.

      1. Open the source document
      2. Open Document Properties dialog using File -> Document Properties or Shift + Ctrl + D 01 Document_protperties.jpg
      3. Change With and Height of the document
      4. Rearrange your HMI components
      5. Generate new HMI using REXYGEN Studio

      To fill the whole page with the HMI with small margins you have to have the same aspect ratio of the document as is the aspect ratio of the webpage without header and margins.

      You can use the Inspection tool which is included in all modern browsers (Chrome, Firefox, Opera, etc.). Just open the inspection tool, click on the left top corner icon and point to the whole SVG element. The tooltip will show the size of the current space. Use it to change the SVG document properties and rearrange the HMI components to fit new size.

      02 Webbrowser_get_size.png

      Resized HMI page example:
      03 Webbrowser_resized.png

      1 Reply Last reply Reply Quote 0
      • A
        Apollo
        last edited by

        Thanks for the explanation.
        First I did try to do it without the viewbox and it was working quite well until I opened the page on another PC with a monitor with a different aspect ratio... 😞
        But by simply enabling the viewbox checkbox and changing the width and height of the document by trial and error I managed to get something which is working fine on both PC's.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

        There is also an outdated REXYGEN community forum.

        Powered by NodeBB.