text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|> /// <param name="brush">The brush used to fill the ellipse, or <c>null</c> for no fill.</param>
/// <param name="pen">The pen used to stroke the ellipse, or <c>null</c> for no stroke.</param>
/// <param name="center">The location of the center of the ellipse.</param>
/// <para... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System.Collections.Generic;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// A brush that draws with a sweep gradient.
/// </summary>
public class ImmutableConicGradientBrush : ImmutableGradientBrush, IConicGradientBrush
{
/// <summary>
/// Initializes a n... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using System.Linq;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// Represents the sequence of dashes and gaps that will be applied by an
/// <see cref="ImmutablePen"/>.
/// </summary>
public class ImmutableDashStyle : IDashStyle,... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> TransformOrigin = transformOrigin.HasValue ? transformOrigin.Value : RelativePoint.TopLeft;
SpreadMethod = spreadMethod;
}
/// <summary>
/// Initializes a new instance of the <see cref="ImmutableGradientBrush"/> class.
/// </summary>
/// <param... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> Avalonia.Media.Immutable
{
/// <summary>
/// Describes the location and color of a transition point in a gradient.
/// </summary>
public class ImmutableGradientStop : IGradientStop
{
public ImmutableGradientStop(double offset, Color color)
{
if (MathUtiliti... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using Avalonia.Media.Imaging;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// Paints an area with an <see cref="IBitmap"/>.
/// </summary>
internal class ImmutableImageBrush : ImmutableTileBrush, IImageBrush
{
/// <summary>
/// Initializes a new instance of the... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System.Collections.Generic;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// A brush that draws with a linear gradient.
/// </summary>
public class ImmutableLinearGradientBrush : ImmutableGradientBrush, ILinearGradientBrush
{
/// <summary>
/// Initializes ... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>neJoin.Miter,
double miterLimit = 10.0) : this(new ImmutableSolidColorBrush(color), thickness, dashStyle, lineCap, lineJoin, miterLimit)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Pen"/> class.
/// </summary>
/// <param n... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// A brush that draws with a radial gradient.
/// </summary>
public class ImmutableRadialGradientBrush : ImmutableGradientBrush, IRadialGradientBrush
{
/// <summary>
//... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>utableSolidColorBrush left, ImmutableSolidColorBrush right)
{
return Equals(left, right);
}
public static bool operator !=(ImmutableSolidColorBrush left, ImmutableSolidColorBrush right)
{
return !Equals(left, right);
}
/// <summary>... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>c ImmutablePen Pen { get; }
/// <summary>
/// Gets the units in which the Thickness of the text decoration's <see cref="Pen"/> is expressed.
/// </summary>
public TextDecorationUnit PenThicknessUnit { get; }
/// <summary>
/// Gets or sets the pen offset.
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>inheritdoc/>
public AlignmentX AlignmentX { get; }
/// <inheritdoc/>
public AlignmentY AlignmentY { get; }
/// <inheritdoc/>
public RelativeRect DestinationRect { get; }
/// <inheritdoc/>
public double Opacity { get; }
/// <summary>
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using Avalonia.VisualTree;
namespace Avalonia.Media.Immutable
{
/// <summary>
/// Represents a transform on an <see cref="Visual"/>.
/// </summary>
public class ImmutableTransform : ITransform
{
public Matrix Value { get; }
/// <summary>
/// Initializes a new... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>= (hash * 23) + BackgroundSource.GetHashCode();
hash = (hash * 23) + FallbackColor.GetHashCode();
hash = (hash * 23) + MaterialColor.GetHashCode();
return hash;
}
}
public static bool operator ==(ImmutableExperimentalAcrylicMate... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ryImpl? platformImpl)
: base(platformImpl)
{
}
public override Geometry Clone() => new ImmutableGeometry(PlatformImpl);
private protected override IGeometryImpl? CreateDefiningGeometry()
{
return PlatformImpl;
}
}
<|fim_prefix|>using System;
using Avalonia.Platfo... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Avalonia.SourceGenerator;
namespace Avalonia.Media
{
internal static partial class KnownColors
{
private static readonly IReadOnlyDictionary<string, KnownColor> _knownColorNames;
private s... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> get => GetValue(EndPointProperty);
set => SetValue(EndPointProperty, value);
}
/// <inheritdoc/>
public override Geometry Clone()
{
return new LineGeometry(StartPoint, EndPoint);
}
/// <inheritdoc/>
private protec... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
namespace Avalonia.Media
{
public sealed class LineSegment : PathSegment
{
/// <summary>
/// Defines the <see cref="Point"/> property.
/// </summary>
public static readonly StyledProperty<Point> PointProperty
= AvaloniaProperty... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Media.Immutable;
using Avalonia.Rendering.Composition;
using Avalonia.Rendering.Composition.Server;
using Avalonia.Rendering.Composition.Transport;
namespace Avalonia.Media
{
/// <summary>
/// A brush that draws with a linear gradient.
/// </summary>
public se... | fim | AvaloniaUI/Avalonia | csharp |
using System;
namespace Avalonia.Media
{
public static class MaterialExtensions
{
/// <summary>
/// Converts a brush to an immutable brush.
/// </summary>
/// <param name="material">The brush.</param>
/// <returns>
/// The result of calling <see cref="IMutableBr... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Reactive;
using Avalonia.VisualTree;
namespace Avalonia.Media
{
/// <summary>
/// Transforms an <see cref="Visual"/> according to a <see cref="Matrix"/>.
/// </summary>
public sealed class MatrixTransform : Transform
{
/// <summary>
/// Def... | fim | AvaloniaUI/Avalonia | csharp |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Avalonia.Animation;
using Avalonia.Reactive;
namespace Avalonia.Media;
internal partial class MediaContext
{
private readonly MediaContextClock _clock;
public IGlobalClock Clock => _clock;
private readonly Stopwatch _time = St... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Avalonia.Platform;
using Avalonia.Rendering.Composition;
using Avalonia.Rendering.Composition.Transport;
using Avalonia.Threading;
using Avalonia.Utilities;
namespace Avalonia.Media;
p... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>== null)
_invokeOnRenderCallbacks =
_invokeOnRenderCallbackListPool.Count > 0 ? _invokeOnRenderCallbackListPool.Pop() : new();
_invokeOnRenderCallbacks.Add(callback);
if (!_isRendering)
ScheduleRender(true);
}
}
<|fim_prefix|>using Sys... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Utilities;
namespace Avalonia.Media
{
/// <summary>
/// Provides extension methods for Avalonia media.
/// </summary>
public static class MediaExtensions
{
/// <summary>
/// Calculates scaling based on a <see cref="Stretch"/> value.
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ummary>
/// Gets or sets the segments.
/// </summary>
/// <value>
/// The segments.
/// </value>
[Content]
public PathSegments? Segments
{
get { return _segments; }
set { SetAndRaise(SegmentsProperty, ref _segments, va... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Collections;
using Avalonia.Metadata;
using Avalonia.Platform;
using Avalonia.Visuals.Platform;
namespace Avalonia.Media
{
public class PathGeometry : StreamGeometry
{
/// <summary>
/// Defines the <see cref="Figures"/> property.
/// </summary>... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>AvaloniaList<PathSegment>
{
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> class.
/// </summary>
public PathSegments()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> cla... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using Avalonia.Platform;
namespace Avalonia.Media
{
/// <summary>
/// Parses a path markup string.
/// </summary>
public class PathMarkupParser : IDisposable... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>}
<|fim_prefix|>namespace Avalonia.Media
{
<|fim_middle|> public abstract class PathSegment : AvaloniaObject
{
internal abstract void ApplyTo(StreamGeometryContext ctx);
public static readonly StyledProperty<bool> IsStrokedProperty =
AvaloniaProperty.Register<PathSegmen... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using Avalonia.Collections;
using Avalonia.Media.Immutable;
using Avalonia.Rendering.Composition;
using Avalonia.Rendering.Composition.Drawing;
using Avalonia.Rendering.Composition.Server;
using Avalonia.Rendering.Compos... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>,
Round,
Square
}
}
<|fim_prefix|>namespace Avalonia.Media
{
public enum PenLine<|fim_middle|>Cap
{
Flat<|endoftext|> | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> Round
}
}
<|fim_prefix|>namesp<|fim_middle|>ace Avalonia.Media
{
public enum PenLineJoin
{
Bevel,
Miter,
<|endoftext|> | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using Avalonia.Logging;
using Avaloni<|fim_suffix|> {
Logger.TryGet(LogEventLevel.Error, LogArea.Visual)
?.Log(custom, $"Exception in {custom.GetType().Name}.{nameof(ICustomDrawOperation.Render)} {{0}}", e);
}
}... | fim | AvaloniaUI/Avalonia | csharp |
using Avalonia.Platform;
namespace Avalonia.Media
{
internal sealed class PlatformGeometry : Geometry
{
private readonly IGeometryImpl _geometryImpl;
public PlatformGeometry(IGeometryImpl geometryImpl)
{
_geometryImpl = geometryImpl;
}
public override Geom... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>id number of points. Last {Math.Abs(delta)} points will be ignored.");
}
}
}
public override string ToString()
{
var builder = StringBuilderCache.Acquire();
if (_points is { Count: > 0 } points)
{
builder.Append('C').Append(' ');
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System.Collections.Generic;
namespace Avalonia.Media
{
/// <summary>
/// Represents a set of line segments defined by a points collection with each Point specifying the end point of a line segment.
/// </summary>
public sealed class PolyLineSegment : PathSegment
{
/// <... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> _fillRule = fillRule;
}
/// <summary>
/// Gets or sets the figures.
/// </summary>
/// <value>
/// The points.
/// </value>
[Content]
public IList<Point> Points
{
get => _points;
set => Set... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>param name="x">Abscissa of the upper-left corner of the test rectangle</param>
/// <param name="y">Ordinate of the upper-left corner of the test rectangle</param>
/// <param name="w">Width of the test rectangle</param>
/// <param name="h">Height of the test rectangle</p... | fim | AvaloniaUI/Avalonia | csharp |
using System;
namespace Avalonia.Media
{
public sealed class QuadraticBezierSegment : PathSegment
{
/// <summary>
/// Defines the <see cref="Point1"/> property.
/// </summary>
public static readonly StyledProperty<Point> Point1Property
= AvaloniaProperty.... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Media.Immutable;
using Avalonia.Metadata;
using Avalonia.Rendering.Composition;
using Avalonia.Rendering.Composition.Server;
using Avalonia.Rendering.Composition.Transport;
namespace Avalonia.Media
{
/// <summary>
/// Paints an area with a radial gradient.
/// </s... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> public double RadiusX
{
get => GetValue(RadiusXProperty);
set => SetValue(RadiusXProperty, value);
}
/// <summary>
/// Gets or sets the radius on the Y-axis used to round the corners of the rectangle.
/// Corner radii are represented b... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Media.Imaging;
namespace Avalonia.Media
{
/// <summary>
/// Provides a set of options that control rendering behavior for visuals, including text rendering, bitmap
/// interpolation, edge rendering, blending, and opacity handling.
/// </summary>
<|fim_suffix|... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> }
/// <summary>
/// Gets or sets the y-coordinate of the rotation center point. The default is 0 which is the <see cref="Visual.RenderTransformOrigin"/> point (center by default).
/// </summary>
public double CenterY
{
get => GetValue(CenterYProperty)... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> AvaloniaProperty.Register<ScaleTransform, double>(nameof(ScaleY), 1);
/// <summary>
/// Initializes a new instance of the <see cref="ScaleTransform"/> class.
/// </summary>
public ScaleTransform()
{
}
/// <summary>
/// Initializes a... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Reactive;
using Avalonia.VisualTree;<|fim_suffix|>ef="Matrix"/>.
/// </summary>
public override Matrix Value => Matrix.CreateSkew(Matrix.ToRadians(AngleX), Matrix.ToRadians(AngleY));
protected override void OnPropertyChanged(AvaloniaPropertyCh... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>// <summary>
/// Gets or sets the color of the brush.
/// </summary>
public Color Color
{
get { return GetValue(ColorProperty); }
set { SetValue(ColorProperty, value); }
}
/// <summary>
/// Parses a brush string.
/// ... | fim | AvaloniaUI/Avalonia | csharp |
using System;
using Avalonia.Platform;
namespace Avalonia.Media
{
/// <summary>
/// Represents the geometry of an arbitrarily complex shape.
/// </summary>
public class StreamGeometry : Geometry
{
IStreamGeometryImpl? _impl;
/// <summary>
/// Initializes a new instance of t... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> /// Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure. If you wonder why, ask Direct2D guys about their design decisions.
/// </summary>
/// <param name="fillRule"></param>
public void SetFillRule(FillRule fillRule)
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>reserved.
/// </summary>
Fill,
/// <summary>
/// The content is resized to fit in the destination dimensions while preserving its
/// native aspect ratio.
/// </summary>
Uniform,
/// <summary>
/// The content is resized to completel... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media
{
/// <summary>
/// Describes the type of scaling that can be<|fim_suffix|> /// </summary>
DownOnly,
/// <summary>
/// Always stretches to fit the available space according to the stretch mode.
/// </summary>
Both,
}
}
<|fim_mi... | fim | AvaloniaUI/Avalonia | csharp |
namespace Avalonia.Media
{
/// <summary>
/// Defines the direction an which elliptical arc is drawn.
/// </summary>
public enum SweepDirection
{
/// <summary>
/// Specifies that arcs are drawn in a counter clockwise (negative-angle) direction.
/// </summary>
CounterCl... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media
{
/// <summary>
/// Defines how text is aligned.
/// </summary>
public enum TextAlignment
{
/// <summary>
/// The text is left-aligned.
/// </summary>
Left,
/// <summary>
/// The text is centered.
/// </s... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>
{
Width = width;
TextRunProperties = textRunProperties;
FlowDirection = flowDirection;
}
}
}
<|fim_prefix|>using Avalonia.Media.TextFormatting;
namespace Avalonia.Media
{
public readonly record struct TextCollapsingCreateInfo
{
pub... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>eCap
{
get { return GetValue(StrokeLineCapProperty); }
set { SetValue(StrokeLineCapProperty, value); }
}
/// <summary>
/// The stroke's offset.
/// </summary>
/// <value>
/// The pen offset.
/// </value>
publi... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ref="TextDecoration"/> objects.
/// </summary>
public class TextDecorationCollection : AvaloniaList<TextDecoration>
{
public TextDecorationCollection()
{
}
public TextDecorationCollection(IEnumerable<TextDecoration> textDecorations) : base(textDeco... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalon<|fim_suffix|>tion"/> object.
/// </summary>
public enum TextDecorationLocation
{
/// <summary>
/// The underline position.
/// </summary>
Underline = 0,
/// <summary>
/// The over line position.
/// </summary>
O... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media
{
/// <summary>
/// Specifies the unit type of either a <see cref="TextDecoration.StrokeOffset"/> or a <see cref="TextDecoration.StrokeThickness"/> value.
/// </summary>
public enum TextDecorationUnit
{
/// <summary>
/// A unit value that is re... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>s a <see cref="TextDecorationCollection"/> containing a baseline.
/// </summary>
public static TextDecorationCollection Baseline { get; }
}
}
<|fim_prefix|>namespace Avalonia.Media
{
/// <summary>
/// Defines a set of commonly used text decorations.
/// </summary>
publ... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Diagnost<|fim_suffix|> _ranges[rangeIndex].Level >= run.Level)
{
// Attach run to the range.
if ((run.Level & 1) != 0)
{
// Odd, range goes to the right of run.
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A text run that supports drawing conten<|fim_suffix|> <see cref="DrawableTextRun"/> at the given origin.
/// </summary>
/// <param name="drawingContext">The drawing context.</param>
/// <param name="origin">The or... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using Avalonia.Media.TextFormatting.Unicode;
using Avalonia.Utilities;
namespace Avalonia.Media.TextFormatting
{
internal readonly struct FormattedTextSource : ITextSource
{
private readonly string _text;
private readonly TextRunPro... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>r<TKey, TValue>>(approximateCapacity))
{
dictionary.TrimExcess();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static bool IsBufferTooLarge<T>(uint capacity)
=> (long) (uint) Unsafe.SizeOf<T>() * capacity > MaxK... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> returned to the pool.</item>
/// <item>AVOID storing an instance of this type into a field or property.</item>
/// <item>AVOID casting an instance of this type to another type.</item>
/// <item>
/// AVOID passing an instance of this type as an argument to a metho... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ining block box.</param>
/// <param name="lineHeight">Paragraph's line spacing.</param>
/// <param name="letterSpacing">The amount of letter spacing.</param>
public GenericTextParagraphProperties(TextRunProperties defaultTextRunProperties,
TextAlignment textAlignment = ... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ackgroundBrush { get; }
/// <inheritdoc />
public override FontFeatureCollection? FontFeatures { get; }
/// <inheritdoc />
public override BaselineAlignment BaselineAlignment { get; }
/// <inheritdoc />
public override CultureInfo? CultureInfo { get; }
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> GlyphCluster;
/// <summary>
/// Get the glyph advance.
/// </summary>
public double GlyphAdvance { get; } = GlyphAdvance;
/// <summary>
/// Get the glyph offset.
/// </summary>
public Vector GlyphOffset { get; } = GlyphOffset;
}
}
<|fi... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Produces <see cref="TextRun"/> objects that are used by the <see cref="TextFormatter"/>.
/// <|fim_suffix|> /// <summary>
/// Gets a <see cref="TextRun"/> for specified text source index.
/// </summary>
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> public int RunIndex { get; set; }
public int NextRunIndex { get; set; }
public TextRun? TextRun { get; init; }
}
}
<|fim_prefix|><|fim_middle|>namespace Avalonia.Media.TextFormatting
{
internal class IndexedTextRun
{
public int TextSourceCharacterIndex { get; init; ... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> if (textRun is ShapedTextRun shapedText)
{
var glyphRun = shapedText.GlyphRun;
var shapedBuffer = shapedText.ShapedBuffer;
while (breakOportunities.Count > 0)
{
var character... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>extLine);
}
}
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
public abstract class JustificationProperties
{
/// <summary>
<|fim_middle|> /// Gets the width in which the range is justified.
/// </summary>
public abstract double Width { get; }
/... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
public enum LogicalDirection
{
/// <summary>
/// Backward, or from right to left.
/// </summary>
Backward,
/// <summar<|fim_suffix|>ard, or from left to right.
/// </summary>
Forward
}
}
<|fim_mi... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>s.Count;
}
if (backward)
{
_step = -1;
_end = -1;
_index = Count;
}
else
{
_step = 1;
_end = Count;
_index = -1;
}
}
public bool MoveNext([MaybeNullWhen(false)] out Tex... | fim | AvaloniaUI/Avalonia | csharp |
using System;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using Avalonia.Utilities;
namespace Avalonia.Media.TextFormatting
{
public sealed class ShapedBuffer : IReadOnlyList<GlyphInfo>, I... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>dTextRun>(first, second);
}
internal GlyphRun CreateGlyphRun()
{
return new GlyphRun(
ShapedBuffer.GlyphTypeface,
ShapedBuffer.FontRenderingEmSize,
Text,
ShapedBuffer,
biDiLevel: BidiLevel)... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>Deconstruct(out T? first, out T? second)
{
first = First;
second = Second;
}
}
}
<|fim_prefix|>namespac<|fim_middle|>e Avalonia.Media.TextFormatting
{
#pragma warning disable CA1815 // Override equals and operator equals on value types
public readonly struc... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> }
}
<|fim_prefix|>using System.Collections.Generic;
using System.Diagnostics;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// The bounding rectangle of a range of characters
/// </summary>
public sealed class TextBounds
<|fim_middle|> {
/// <summary>
//... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Media.TextFormatting.Unicode;
using static Avalonia.Media.TextFormatting.FormattingObjectPool;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A text run that holds text characters.
/// </summary>
public class TextCharacters : TextRun
{
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>
var textRunEnumerator = new LogicalTextRunEnumerator(textLine);
var textRunsLength = 0;
while (textRunEnumerator.MoveNext(out var textRun))
{
if (textRunsLength >= collapsedLength)
{
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using Avalonia.Media.TextFormatting.Unicode;
namespace Avalonia.Media.TextFormatting
{
internal static class TextEllipsisHelper
{
public static TextRun[]? Collapse(TextLine textLine, TextCollapsingProperties properties, bool isWordEllipsis)
{
var textRunsEnumerator = ... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>c TextEndOfLine(int textSourceLength = DefaultTextSourceLength)
{
Length = textSourceLength;
}
public override int Length { get; }
}
}
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A text run that indicates the end of a line.
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A text run that indicates the end of a paragraph.
/// </summary>
public class TextEndOfParagraph : TextEndOfLine
{
public TextEndOfParagraph()
{
}
public TextEndOfPa<|fim... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Represents a base class for text formatting.
/// </summary>
public abstract class TextFormatter
{
/// <summary>
/// Gets the current <see cref="TextFormatter"/> that is used for non complex text formatting.
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>// ReSharper disable ForCanBeConvertedToForeach
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Avalonia.Media.TextFormatting.Unicode;
using Avalonia.Utilities;
using static Avalonia.Media.TextFormatting.FormattingObjectPool;
namespace Ava... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using Avalonia.Utilities;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Represents a multi line text layout.
/// </summary>
public class TextLayout : IDisposable
{
private readonly ITextSource _textSource;
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>// ReSharper disable ForCanBeConvertedToForeach
using System;
using System.Collections.Generic;
using Avalonia.Utilities;
using static Avalonia.Media.TextFormatting.FormattingObjectPool;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Ellipsis based on a fixed length leading prefix a... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Represents a line of text that is used for text rendering.
/// </summary>
public abstract class TextLine : IDisposable
{
/// <summary>
/// Gets the text runs th... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
public class TextLineBreak
{
public TextLineBreak(TextEndOfLine? textEndOfLine = null,
FlowDirection flowDirection = FlowDirection.LeftToRight, bool isSplit = false)
{
TextEndOfLine = textEndOfLine;
Flow... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Collections.Generic;
using System.Diagnostics;
using Avalonia.Media.TextFormatting.Unicode;
using Avalonia.Utilities;
namespace Avalonia.Media.TextFormatting
{
internal class TextLineImpl : TextLine
{
internal static Comparer<TextBounds> TextBoundsComparer { get... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>espaceLength { get; init; }
/// <summary>
/// Gets the width of a line of text, excluding trailing whitespace characters.
/// </summary>
public double Width { get; init; }
/// <summary>
/// Gets the width of a line of text, including trailing whitespace ch... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A metric that holds information about text specific measurements.
/// </summary>
public readonly record struct TextMetrics
{
public TextMetrics(GlyphTypeface glyphTypeface, double fontRenderingEmSize)
{
... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Provides a set of properti<|fim_suffix|> /// Gets a value that indicates whether a formatted line can always be collapsed.
/// </summary>
/// <remarks>
/// If true, the formatted line may always be collapsed. If f... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Diagnostics;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Represents a portion of a <see cref="TextLine"/> object.
/// </summary>
[DebuggerTypeProxy(typeof(TextRunDebuggerProxy))]
public abstract class TextRun
{
public const int D... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>f text run
/// </summary>
public readonly record struct TextRunBounds
{
/// <summary>
/// Constructing TextRunBounds
/// </summary>
internal TextRunBounds(Rect bounds, int firstCharacterIndex, int length, TextRun textRun)
{
Rectangle = bounds... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Buffers;
using System.Collections.Generic;
using Avalonia.Metadata;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Caches shaped text runs and bidi processing results to avoid redundant shaping
/// when only the paragraph width constraint changes (e.g.,... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using System.Globalization;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// Provides a set of properties, such as typeface or foreground brush, that can be applied to a TextRun object. This is an abstract class.
/// </summary>
/// <remarks>
/// The text layo... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_prefix|>using System;
using Avalonia.Platform;
namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A class that is responsible for text shaping.
/// </summary>
public class TextShaper
{
private readonly ITextShaperImpl _platformImpl;
public TextShaper(ITextShaperImpl... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|> sbyte bidiLevel = 0,
CultureInfo? culture = null,
double incrementalTabWidth = 0,
double letterSpacing = 0,
IReadOnlyList<FontFeature>? fontFeatures = null)
{
GlyphTypeface = typeface;
FontRenderingEmSize = fontRen... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>isHelper.Collapse(textLine, this, false);
}
}
}
<|fim_prefix|>namespace Avalonia.Media.TextFormatting
{
/// <summary>
/// A collapsing properties to collapse whole line toward the end
/// at character granularity.
/// </summary>
public sealed class TextTrailingCharacterEll... | fim | AvaloniaUI/Avalonia | csharp |
<|fim_suffix|>ry>
/// Construct a text trailing word ellipsis collapsing properties.
/// </summary>
/// <param name="ellipsis">Text used as collapsing symbol.</param>
/// <param name="width">width in which collapsing is constrained to.</param>
/// <param name="textRunProperties">... | fim | AvaloniaUI/Avalonia | csharp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.