// ------------------------------------------------------------------ // Returns ArrayList of rectangles for the ContentElement e within the // list of paragraphs. If the element is not found, returns empty list. // start: int representing start offset of e // length: int representing number of positions occupied by e // ------------------------------------------------------------------ internal static List <Rect> GetRectanglesInParaList( PtsContext ptsContext, ContentElement e, int start, int length, PTS.FSPARADESCRIPTION[] arrayParaDesc) { List <Rect> rectangles = new List <Rect>(); for (int index = 0; index < arrayParaDesc.Length; index++) { BaseParaClient paraClient = ptsContext.HandleToObject(arrayParaDesc[index].pfsparaclient) as BaseParaClient; PTS.ValidateHandle(paraClient); if (start < paraClient.Paragraph.ParagraphEndCharacterPosition) { // Element lies within the paraClient boundaries. rectangles = paraClient.GetRectangles(e, start, length); // Rectangles collection should not be null for consistency Invariant.Assert(rectangles != null); if (rectangles.Count != 0) { // Element cannot span more than one para client in the same track, so we stop // if the element is found and the rectangles are calculated break; } } } return(rectangles); }
// Token: 0x06006936 RID: 26934 RVA: 0x001DC89C File Offset: 0x001DAA9C internal static List <Rect> GetRectanglesInParaList(PtsContext ptsContext, ContentElement e, int start, int length, PTS.FSPARADESCRIPTION[] arrayParaDesc) { List <Rect> list = new List <Rect>(); for (int i = 0; i < arrayParaDesc.Length; i++) { BaseParaClient baseParaClient = ptsContext.HandleToObject(arrayParaDesc[i].pfsparaclient) as BaseParaClient; PTS.ValidateHandle(baseParaClient); if (start < baseParaClient.Paragraph.ParagraphEndCharacterPosition) { list = baseParaClient.GetRectangles(e, start, length); Invariant.Assert(list != null); if (list.Count != 0) { break; } } } return(list); }