-
Notifications
You must be signed in to change notification settings - Fork 2
Drawing Three view Panels
LIU Lin edited this page Jun 16, 2020
·
1 revision
sizeOfCloseIcon = tab.Height - 2 * verticalPaddingForCloseIcon
tabHeaderName.Width = tab.Width - leftPadding - middleMargin - rightPadding - sizeOfCloseIcon
tabHeaderName.Height = tab.Height - 2 * verticalPaddingForHeaderName
To calculate the scaling factor of trajectory, imagine using the smallest cuboid (cubT
) to hold the trajectory in 3D space.
The three panels also form as a cuboid (cubP
) with same length and width.
And then calculate the scaling factor by shrinking or magnifying cubT
as much as possible to be fitly holded up by cubP
.
In our case,
Single zoomInAxisParameter
{
get
{
float zoomInAxisParameter;
if (zoomZ * (Width - leftPaddingX - rightPaddingX) > zoomXY * (Height - 2 * paddingY - spaceHeightForViewName))
{
zoomInAxisParameter = (Height - 2 * paddingY - spaceHeightForViewName) / zoomZ;
}
else
{
zoomInAxisParameter = (Width - leftPaddingX - rightPaddingX) / zoomXY;
}
return zoomInAxisParameter;
}
}