本文整理汇总了C#中Altaxo.Geometry.PointD2D.WithYPlus方法的典型用法代码示例。如果您正苦于以下问题:C# PointD2D.WithYPlus方法的具体用法?C# PointD2D.WithYPlus怎么用?C# PointD2D.WithYPlus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo.Geometry.PointD2D
的用法示例。
在下文中一共展示了PointD2D.WithYPlus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MeasuredLabelItem
public MeasuredLabelItem(Graphics g, FontX font, StringFormat strfmt, string itemtext, double lineSpacing, StringAlignment horizontalAlignment, StringAlignment verticalAlignment, StringAlignment textBlockAligment)
{
_text = itemtext.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
_stringSize = new PointD2D[_text.Length];
_font = font;
_horizontalAlignment = horizontalAlignment;
_verticalAlignment = verticalAlignment;
_textBlockAligment = textBlockAligment;
_strfmt = strfmt;
_lineSpacing = lineSpacing;
_size = SizeF.Empty;
var bounds = RectangleD2D.Empty;
var position = new PointD2D();
for (int i = 0; i < _text.Length; ++i)
{
_stringSize[i] = g.MeasureString(_text[i], GdiFontManager.ToGdi(_font), new PointF(0, 0), strfmt);
bounds.ExpandToInclude(new RectangleD2D(position, _stringSize[i]));
position = position.WithYPlus(_stringSize[i].Y * _lineSpacing);
}
_size = bounds.Size;
}