/// <summary> /// 这里的绝对是指相对于viewport左上角 /// </summary> /// <param name="viewportRect"></param> /// <param name="rectRate"></param> /// <param name="matchedRelativeRect"></param> /// <returns></returns> public RECT GetMatchedAbsoluteRect(RECT viewportRect, Vec4f rectRate, RECT matchedRelativeRect) { var rect = viewportRect.GetChildRectByRate(rectRate); return(new RECT() { x1 = rect.x1 + matchedRelativeRect.x1, y1 = rect.y1 + matchedRelativeRect.y1, x2 = rect.x1 + matchedRelativeRect.x2, y2 = rect.y1 + matchedRelativeRect.y2, }); }