From 4a6deb7d8b2e2b5e7d733cb6ec7e3d980aadd262 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 5 Apr 2017 23:52:00 +0200 Subject: [PATCH] Added some doc comments. And removed some tabs. --- .../Media/FormattedTextStyleSpan.cs | 20 ++++++++++++++ src/Avalonia.Visuals/Media/Typeface.cs | 26 ++++++++++++++++++- .../Media/StreamGeometryImpl.cs | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs b/src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs index 75bf76c996..96a5c05c74 100644 --- a/src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs +++ b/src/Avalonia.Visuals/Media/FormattedTextStyleSpan.cs @@ -2,8 +2,17 @@ namespace Avalonia.Media { + /// + /// Describes the formatting for a span of text in a object. + /// public class FormattedTextStyleSpan { + /// + /// Initializes a new instance of the class. + /// + /// The index of the first character in the span. + /// The length of the span. + /// The span's foreground brush. public FormattedTextStyleSpan( int startIndex, int length, @@ -14,8 +23,19 @@ namespace Avalonia.Media ForegroundBrush = foregroundBrush; } + /// + /// Gets the index of the first character in the span. + /// public int StartIndex { get; } + + /// + /// Gets the length of the span. + /// public int Length { get; } + + /// + /// Gets the span's foreground brush. + /// public IBrush ForegroundBrush { get; } } } diff --git a/src/Avalonia.Visuals/Media/Typeface.cs b/src/Avalonia.Visuals/Media/Typeface.cs index b05d5d02e5..12540b67e7 100644 --- a/src/Avalonia.Visuals/Media/Typeface.cs +++ b/src/Avalonia.Visuals/Media/Typeface.cs @@ -1,10 +1,19 @@ using System; -using Avalonia.Media; namespace Avalonia.Media { + /// + /// Represents a typeface. + /// public class Typeface { + /// + /// Initializes a new instance of the class. + /// + /// The name of the font family. + /// The font size, in DIPs. + /// The font style. + /// The font weight. public Typeface( string fontFamilyName, double fontSize, @@ -27,9 +36,24 @@ namespace Avalonia.Media Weight = weight; } + /// + /// Gets the name of the font family. + /// public string FontFamilyName { get; } + + /// + /// Gets the size of the font in DIPs. + /// public double FontSize { get; } + + /// + /// Gets the font style. + /// public FontStyle Style { get; } + + /// + /// Gets the font weight. + /// public FontWeight Weight { get; } } } diff --git a/src/Gtk/Avalonia.Cairo/Media/StreamGeometryImpl.cs b/src/Gtk/Avalonia.Cairo/Media/StreamGeometryImpl.cs index 7d59988918..b0a8cd4fb0 100644 --- a/src/Gtk/Avalonia.Cairo/Media/StreamGeometryImpl.cs +++ b/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()