GetRect

Método Portion.GetRect

Obtenga las coordenadas del rectángulo que limita la porción. El rectángulo incluye todas las líneas de texto en la porción, incluidas las vacías.

public RectangleF GetRect()  

Ejemplos

Ejemplo:

[C#]  
using (Presentation pres = new Presentation())  

   ISlide slide = pres.Slides[0];  
   IAutoShape shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 200, 50);  

   shape.TextFrame.Paragraphs[0].Portions.Clear();  
   var portion0 = new Portion("Some text");  
   var portion1 = new Portion("GetRect text");  

   shape.TextFrame.Paragraphs[0].Portions.Add(portion0);  
   shape.TextFrame.Paragraphs[0].Portions.Add(portion1);  

   RectangleF rect = shape.TextFrame.Paragraphs[0].Portions[1].GetRect();  
   ...  

Véase También