static Point GetGlobalLocationStatic(RenderElement re)
{
RenderElement parentVisualElement = re.ParentRenderElement;
if (parentVisualElement != null)
{
Point parentGlobalLocation = GetGlobalLocationStatic(parentVisualElement);
re.parentLink.AdjustLocation(ref parentGlobalLocation);
if (parentVisualElement.MayHasViewport)
{
return new Point(
re.b_left + parentGlobalLocation.X - parentVisualElement.ViewportX,
re.b_top + parentGlobalLocation.Y - parentVisualElement.ViewportY);
}
else
{
return new Point(re.b_left + parentGlobalLocation.X, re.b_top + parentGlobalLocation.Y);
}
}
else
{
return re.Location;
}
}
//-----------------------------------------------