/// <summary> /// Constructor which specified ideal maximum sizes. /// </summary> /// <param name="maxWidth">The ideal maximum width.</param> /// <param name="maxHeight">The ideal maximum height, or null if not specified.</param> public Paragraph(double maxWidth, double?maxHeight) { MaximumWidth = maxWidth; MaximumHeight = maxHeight; Lines = new List <Line>(); Margins = new MarginSet(); }
/// <summary> /// Constructor for cell with margins. /// </summary> /// <param name="content">The cell content.</param> /// <param name="font">The font to use to draw the content.</param> /// <param name="margins">The cell margins.</param> /// <param name="graphicsContext">The graphics context which will be used to draw the cell.</param> public PlainTextTableCell(string content, IFontDescriptor font, MarginSet margins, IGraphicsContext graphicsContext) { Content = content; Font = font; if (margins != null) { MarginLeft = margins.Left; MarginRight = margins.Right; MarginTop = margins.Top; MarginBottom = margins.Bottom; } MeasureSize(graphicsContext); }
/// <summary> /// Constructor with all available parameters. /// </summary> /// <param name="maxWidth">The ideal paragraph width.</param> /// <param name="maxHeight">The ideal paragraph height, or null if not specified.</param> /// <param name="orientation">The orientation of the paragraph.</param> /// <param name="hAlignment">The horizontal alignment of the paragraph content.</param> /// <param name="vAlignment">The vertical alignment of the paragraph content.</param> /// <param name="margins">The margins to use for this paragraph.</param> public Paragraph(double maxWidth, double?maxHeight, Orientation orientation, HorizontalAlignment hAlignment, VerticalAlignment vAlignment, MarginSet margins) : this(maxWidth, maxHeight, orientation, hAlignment, vAlignment) { Margins = margins; }