Browse Source

Added some doc comments.

And removed some tabs.
pull/948/head
Steven Kirk 9 years ago
parent
commit
4a6deb7d8b
  1. 20
      src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs
  2. 26
      src/Avalonia.Visuals/Media/Typeface.cs
  3. 2
      src/Gtk/Avalonia.Cairo/Media/StreamGeometryImpl.cs

20
src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs

@ -2,8 +2,17 @@
namespace Avalonia.Media
{
/// <summary>
/// Describes the formatting for a span of text in a <see cref="FormattedText"/> object.
/// </summary>
public class FormattedTextStyleSpan
{
/// <summary>
/// Initializes a new instance of the <see cref="FormattedTextStyleSpan"/> class.
/// </summary>
/// <param name="startIndex">The index of the first character in the span.</param>
/// <param name="length">The length of the span.</param>
/// <param name="foregroundBrush">The span's foreground brush.</param>
public FormattedTextStyleSpan(
int startIndex,
int length,
@ -14,8 +23,19 @@ namespace Avalonia.Media
ForegroundBrush = foregroundBrush;
}
/// <summary>
/// Gets the index of the first character in the span.
/// </summary>
public int StartIndex { get; }
/// <summary>
/// Gets the length of the span.
/// </summary>
public int Length { get; }
/// <summary>
/// Gets the span's foreground brush.
/// </summary>
public IBrush ForegroundBrush { get; }
}
}

26
src/Avalonia.Visuals/Media/Typeface.cs

@ -1,10 +1,19 @@
using System;
using Avalonia.Media;
namespace Avalonia.Media
{
/// <summary>
/// Represents a typeface.
/// </summary>
public class Typeface
{
/// <summary>
/// Initializes a new instance of the <see cref="Typeface"/> class.
/// </summary>
/// <param name="fontFamilyName">The name of the font family.</param>
/// <param name="fontSize">The font size, in DIPs.</param>
/// <param name="style">The font style.</param>
/// <param name="weight">The font weight.</param>
public Typeface(
string fontFamilyName,
double fontSize,
@ -27,9 +36,24 @@ namespace Avalonia.Media
Weight = weight;
}
/// <summary>
/// Gets the name of the font family.
/// </summary>
public string FontFamilyName { get; }
/// <summary>
/// Gets the size of the font in DIPs.
/// </summary>
public double FontSize { get; }
/// <summary>
/// Gets the font style.
/// </summary>
public FontStyle Style { get; }
/// <summary>
/// Gets the font weight.
/// </summary>
public FontWeight Weight { get; }
}
}

2
src/Gtk/Avalonia.Cairo/Media/StreamGeometryImpl.cs

@ -52,7 +52,7 @@ namespace Avalonia.Cairo.Media
public Rect GetRenderBounds(double strokeThickness)
{
// TODO: Calculate properly.
return Bounds.TransformToAABB(Transform).Inflate(strokeThickness);
return Bounds.TransformToAABB(Transform).Inflate(strokeThickness);
}
public IStreamGeometryContextImpl Open()

Loading…
Cancel
Save