GeUserArea looks different on Mac and PC
-
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?
-
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. -
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