* Introduce TextOptions API
* Store BaselinePixelAlignment as byte. Move to a dedicated file.
* Update API suppressions
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Introduce a universal IGlyphTypeface implementation that does not rely on any platform implementation
* Revert changes
* Fix Android
* Make the test happy
* Fix build
* Update baseline
* Fix naming
* Fix headless
* Move interfaces to dedicated files
Make GlyphTypeface.GlyphCount an integer
* Fix GlyphCount
* Make IGlyphTypeface NotClientImplementable
* Make sure we cache platform typefaces by their desired name, style, weight and stretch
* Update baseline
* Only use IGlyphTypeface
* Fix Android
* Try to clear the buffer before we encode somethimg
* Add needed test font
* Add more unit tests
* Reduce allocations
* Remove Direct2D1 test files
* More tests
* More complete table implementations
* More adjustments
* Use batch APIs
* Handle invalid timestamps
* Update baseline
* Introduce a CharacterToGlyphMap struct for faster access
* Remove AggressiveInlining
* Remove AggressiveInlining
* Make the head table optional for legacy fonts
* Remove Load method. Fix TextBlockTests
* Fix nullables
* Remove redundant folder
* Update Api baseline
* revert diff helper changes
* revert changes
* Use bare minimum font for Headless platform and introduce a test font manager that uses the Inter font for testing.
* Add missing font file for Headless platform
---------
Co-authored-by: Gillibald <stebner@avaloniaui.net>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Update to xunit.v3
* Little more progress
* More fixes
* Keep VSTest supported
* Adjust Nuke
* Few fixes
* Fix for xunit 2
* Fix GetData override
* Adjust
* Use MTP for xunit 2
* Fix test
* Better fix
* --no-progress
* Few more fixes
* no progress
* Fix test
* Better fix
* TRX
* Move to Directory.Build.props
* Unify on MTP v2
* Update
* Update to stable
* 1.0.1
* 1.0.2
* Fix some warnings
* Fix more warnings
* Fix more warnings
* Added DrawingImage.Frame: a rectangular region of `Drawing`, in device independent pixels, to display when rendering the image
* Renamed Frame to Viewbox
Added test
* Enable nullability in RenderTests
* Enable nullability in LeakTests
* Enable nullability in Skia.UnitTests
* Enable nullability in Generators.Tests
* Enable nullability in DesignerSupport.Tests
* Enable nullability in Build.Tasks.UnitTests
* Implement FillRuleProperty on Polyline
* Implement FillRule Property on Polygon
* Add tests
* Added comments to new public APIs
* Added more comments
* More tests
* More tests
* Updated API
* Added render tests
* More render tests
* Reintroducing the original PolylineGeometry constructor
* Updated API file
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Do not treat spacing combining marks as whitespace
* Do not treat combining marks as whitespace
Try to find a matching typeface on a grapheme boundary
* Add embedded font for testing
* Remove using
* Fix naming and remove redundant code
* Apply default until we reach the next base character
* Retarget to SkiaSharp 3.0
* Replace SKFilterQuality with SKSamplingOptions
* Replace obsolete GRBackendRenderTarget ctor
* Replace SkiaMetalApi reflection with stable APIs
* Use SKMatrix4x4 where it makes more sense perf wise
* Add CS0618 warning as error for Skia
* Fix ToSKSamplingOptions implementation
* Remove hacky compile time condition
* Update API compat
* Remove maccatalyst hack
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Fix issue with MinTextWidth (Fixes#18372)
* Make sure that MeasureOverride for TextPresenter and TextBlock are using same textWidth
* Revert #16601 that is introducing an invalid calculation for the OverhangLeading
Add tests for OverhangLeading and OverhangTrailing
* Revert MinTextWidth
* Fix tests to not rely on fixed values
* Fix remaining issues
* Fix comment in Direct2D1 GlyphRunImpl.cs
* Fix Direct2D1 rendering
* Fix gold images
* Restore TextLineImpl
* Update gold image
* Restore Math.Max on OverhangLeading and Trailing
* Adopt similar behavior to WPF: don't use OverhangLeading/Trailing for measuring and remove clip by default.
But it requires further support with NeedsClipBounds
* Remove MinTextWidth
Keep ClipToBounds=true default for TextBlock
* Revert change
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Skia - Only reverse radial gradient stops if we cover the whole content bounds
* Skia - Only reverse radial gradient stops if we reach cover the whole content bounds
* Add some new lines
* Always measure TextBlock with infinite width
* Make sure the constraint is always fulfilled
* Add some tests
* Adjust tests because we no longer retain the TextLayout in the arrange pass
* Enable VisualBrush to be used as Visual's OpacityMask
* Add missing test file
---------
Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
* Make sure wrapper and platform DrawingContext have the same transform after Flush
* Add some tests
* Update Avalonia.RenderTests.WpfCompare.csproj
* Remove comments
* Use test font
* Added failing cross test.
For polyline segment with `IsStroked = false`.
* Fixed some issues with non-stroked segments
* Fix CombinedGeometryImpl with empty paths.
If an empty (but non-null) stroke was passed to `CombinedGeometryImpl` then its empty bounds would be used and the fill bounds ignored. Added a test and fixed that.
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Fix duplicated trimming attributes warning in Markup.Xaml.Loader
* Fix nullability warnings
* Update ImageSharp to 2.1.8
* Removed obsolete attributes on ValueStore
* Ignore CA1815 on private API RenderTargetProperties
* Fix switch expression warnings
* Fix warnings in Vulkan project
* Only include PThread for WasmEnableThreads
* Rename pollfd to PollFd to fix CS8981
* Fix incompatible packages being used in ControlCatalog.Desktop
---------
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* add isStroked overload for IGeometryContext
* move IGeometryContextEx
* fix Fill Path line
* remove added whitespaces
* close a figure to non-stroke lines with a line
* add geometry tests
* add wpf test files
* Added a test for tracking path closure with missing strokes for various line caps/joins
* add IsStroke overload for other segments
* update tests
* Skip line join test for closed geometry with holes for now
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Use 2.88.8-preview.1.1 skiasharp
* Use SKImageFilter directly, as we don't need compat anymore
* Add SkiaSharp 3 render tests
* Enable SkiaSharp 3 tests on CI
* Add IncludeLinuxSkia in Skia tests
* Update Skia version, remove SkiaCompat
* Remove Skia3 test project, reuse single Skia render test project, so they won't conflict
* Don't create a layer if the previous frame is retained by the render target
* D2D
* compile
* Only check PreviousFrameIsRetained if not using layer
* ABI
* Fixed relative mapping mode for brushes (skia only, pending radial)
* Implemented separate RadiusX/RadiusY with proper mapping modes for RadialGradientBrush
* tests for conic brush
* Added tests for geometry drawing
* Updated DrawingBrush test image since it now matches WPF
* Update obsolete property usage
* Fixed D2D, updated radial test with D2D results that actually match WPF ones
* Fixed RadiusX/Y for radial gradients with non-centered origin
* Updated obsolete property usage
* Code cleanup
* Typo
* ApiDiff suppression
* Removed files for skipped test
* More info in obsoletion warning
* clarify
---------
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* Modernized accessor syntax in several places
* Toned down the getter modernization
* Block body for properties with code
---------
Co-authored-by: Lehonti Ramos <lehonti@ramos>
* Fix HeadlessUnitTestSession creation race condition
* Bind Compositor/MediaContext to a fixed UI thread
* Fix dead lock in AvaloniaTestCase
* Rename Compositor.UIThreadDispatcher to Dispatcher