Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GeUserArea looks different on Mac and PC

    SDK Help
    0
    3
    354
    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.
    • H
      Helper
      last edited by

      On 07/06/2016 at 15:19, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Hi, I have a very simple GeUserArea, where I'm just drawing a rectangle.  I have a column of them being drawn and then I have a column of ComboBoxs being drawn next to it.  I want the two of the columns lining up with each other. I need them in separate columns instead of rows because I want the GeUserAreas to take up the gap between rows.

      On my Mac the GeUserArea is correctly spaced, being equal height to each ComboBox, on my PC though the spacing is wrong and I'm not sure why.

      Here are screenshots of my outputs, the Mac is correctly lined up with the top.

      Mac                                    PC

      Here's my DrawMsg function.

        
      void TestArea::DrawMsg(Int32 x1, Int32 y1, Int32 x2, Int32 y2, const BaseContainer& msg)  
      {  
        DrawSetPen(Vector(1,1,1));  
        DrawRectangle(x1, y1, x2, y2);  
        
        DrawSetPen(Vector(0,0,0));  
        DrawLine(x1, y1, x2, y1);  
        DrawLine(x1, y2-1, x2, y2-1);  
      }  
      

      I'm not sure where to look to fix this, I assume I'm not taking into account resolution or something like that?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 13/06/2016 at 04:02, xxxxxxxx wrote:

        Hi,

        I think your problem is related top different font rendering on the two systems. Looking at the screenshots, you can already see, that the ComboBoxes don't align without your boxes.
        So I'm wondering what code you use to determine the height you want to draw the boxes with.
        To circumvent this problem, I suggest to restructure the layout. Instead of having two column groups, one for the rectangles and one for the ComboBoxes, I'd instead use only one column and inside have horizontal groups, combining a rectangle and a ComboBox for each row.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 22/06/2016 at 13:23, xxxxxxxx wrote:

          Thanks for the help, I ended up just putting them back in the rows and working out the other problem.s

          Dan

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