Branch:
fixes/macos-owned-window-level-inheritance
0.10.0-diff-stable-0.9.11
0.8-backports
0.8-work
0.9/xamlx
5940-dragdrop-modal
7963-stable
Blaz
MikeCodesDotNET-coc-update
NumericUpDown_Fix_5318
Stylus
UnsafeAsSpan-logical-children
about-dialog-redesign
add-expanderAutomationPeer
add-integration-tests
add-missing-type-converters
add-remote-designer-test
android-profile
android_clipboard
android_naot
android_native_window_crash
android_previewer
android_text_client
animation-fill-modes-test
animations-property-path
aot-test-pipeline
api-diff-demo
appium2-vm-test
archive/wieslop-pr-to-prevent-him-from-deleting-the-repo-again-and-claiming-that-stuff-didnt-happen
attach-dev-tools-conditional
attempt-datacontext-application-class
backport-11096
backports/19939
backup/fixes/catalina-red-window-15-16-08
baget-ci-test
border-clip-test
bug/focus-within-not-cleared
bump-diagnosticssupport
castxml-0.2
chart-control
china
codefreeze-0.7
codice/preview4-plus-10064
comp-size-implicitanim-repro
compile-bindings-by-default-property
composition/license
consistent-names
context-menu-refactor
control-theme-idea
critical-time-visual
customers/chaos-11.0
customers/outsystems-11.1.X
customers/outsystems-11.1.x-without-2-prs-for-testing
customers/outsystems-11.2
customers/outsystems-branches/11.2-test-port-19132
customers/outsystems/11.2-test-port-19132
customers/se-eae
dans-repro
dans-repro-without-1284
datagrid-combobox-column
dbus-tray-icon-fix-2
debug-wasm-clicks
debug/gl-texture-mem-intercept
debug/skia-sharp-vmem
demo
demo1
designer_protocol_theme_variant
dev/timill/EglExternalObjectsFeature
dev/timill/catalyst
dev/timill/dma-buf
dev/timill/egl-take-two
dev/timill/macos-setup-app
dev/timill/metal
dev/timill/skiasharp-4-test
dev/timill/styles-animation
dev/timill/win-arm64-build
dev/timill/window-decorations-macos
dev/timill/winui-test
diagnose-ci
direct-comp-archive
disbar
dispatcher-scheduler
do-not-sign-rxui-attempt-2
doc-fixes
dont-self-register-font-manager
drawing-context-hack
droid
effective_viewport_bug_repro
emmaus/gradient_test
empty_text_run_fix
event-setter
exp/drawn-decorations-template
experiment-alpha-niner
experiment/fixing-key-events-macos-embedding
experiment/lazy-load-styles-resources
experiment/merged-fluent-theme
experiment/reflection-free
experiment/skia-known-extensions
experiment/styleinclude-filter
experiments/vulkan-interop-2025-10-29
expose-cut-copy-paste-textbox
feature-presentation-source-2
feature/17731-null-conditional-bindings
feature/2769-control-themes
feature/3109-listen
feature/ImePreeditText
feature/acrylic-brush-investigation
feature/add-get-pixels-to-IBitmapImpl
feature/backdrop-effects
feature/backdrop-experiment
feature/background-fb-transfer
feature/client-frame-in-titlebar
feature/composition-swapchain
feature/composition-tree-inspector
feature/crapium
feature/custom-visual-oob-message
feature/custom-visual-sync
feature/drawn-csd-template
feature/epoll-dispatcher-impl
feature/extract-harfbuzz
feature/flaui-webdriver
feature/fluent-calendar
feature/fluent-scrollbar
feature/fluent-slider
feature/fluent-slider-template
feature/fluent-text-box
feature/flyout-overlayinputpassthrough
feature/flyouts
feature/forced-csd
feature/fullscreen-window-state
feature/gh-actions
feature/gpu-improvements
feature/headless-touch
feature/heterogeneous-item-containers
feature/icons
feature/ilogicalvisualchildren
feature/integer-clip-bak-1
feature/integration-tests-vm-migration
feature/linux-automation
feature/linux-automation-backup
feature/managed-chrome-buttons-api
feature/media-queries
feature/microcom-get-managed-reference
feature/offthread-composition-interop
feature/opengl-image-api
feature/opengl-swapchain
feature/optimized-matrix
feature/pass-shadow-extents-to-platform
feature/pen-eraser-detection
feature/pluggable-input-methods
feature/presentation-source-2
feature/public-frost
feature/remove-legacy-renderers
feature/render-inside-windows-ui-composition-visual-tree
feature/render-thread-transparency
feature/resource-batch-update
feature/save-render-frames
feature/skia-cpu-copy
feature/staggeredlayout
feature/support-more-image-formats
feature/test-branch
feature/textbox-gestures-mac-cmd+
feature/typed-binding-2
feature/typedbinding
feature/ui-automation-atspi
feature/ui-automation-textprovider
feature/ui-automation-textprovider-2
feature/validate-draw-calls
feature/vulkan
feature/wayland-deps
feature/wayland-subcompositor
feature/wd/platform-specific-cookies-pointer-events
feature/windowstate-fullscreen
feature/wmt
feature/writablebitmap-drawingcontext
feature/x11-ime-preedit
feature/x11-incr
feature/x11-primary-selection
features/atspi-peering-mode
features/dbus+atspi2+kdeappiumdriver
features/instant-dark-light-mode-switch
features/manually-managed-layer-textures
features/modal-windows
features/net6-apple-sillicon-support
features/prep1-nullable-reference-types
fies/15433-itemscontrol-interactions-to-containers
fix-ci
fix-mac-special-character-input
fix-mousedevice-not-reporting-clicks-when-any-mouse-button-is-pressed
fix-popup-topmost-windows
fix-windowicon-crash-linuxdrm
fix/DataGridCopyClearsContent
fix/avnview-hittest
fix/ibus-committext-reset
fix/osx-ax-frame-window
fix/osx-ax-honor-ignored-elements
fix/osx-ax-offscreen-noncontrol-children
fix/osx-ax-visible-children
fix/render-stall
fix_colors_change_event_spam
fixes-data-validation-errors-use-datatemplates
fixes/11167-pagetransition-flicker
fixes/11484-coercevalue-called-multiple-times
fixes/1399-dispatchertimer-disposable
fixes/1440-menu-navigation
fixes/1758-implement-non-recycling-virtualization-mode
fixes/17699-uniformgrid-snapping
fixes/20845-tabitem-datacontext-binding-2
fixes/2129-grid-textwrapping
fixes/21746-update-target-explicit
fixes/2725-datatemplate-nested-types
fixes/2957-carousel-stackoverflow
fixes/2983-onewaytosource-twoway
fixes/4293-listbox-remove-item-selection
fixes/4496-selectionmodel-issues
fixes/6684-two-way-style-bindings-with-localvalue
fixes/7777-menu-accelerator
fixes/7925-attached-property-syntax
fixes/9007-priority-in-control-templates
fixes/971-selector-child-of-named
fixes/PreviewWithv12
fixes/add-fluent-theme-tests-and-several-fixes
fixes/android-perf-maybe
fixes/android-render-issue
fixes/appium2
fixes/automation-localization-issues
fixes/avalonia-win32-nullability
fixes/avdbus-impl2
fixes/build-stable-with-6.0.202
fixes/build-task-update-try-fix
fixes/caret-index-lost-when-selection-cleared
fixes/center-screen-maximized-parent
fixes/clear-batch-object-pool-sooner
fixes/compositing-renderer-invalidatevisual-sanity-checks
fixes/disable-fullscreen-overlay-for-border-only-mode
fixes/disable-fullscreenwindow-tests-osx
fixes/dispatcher-frame-dispatcher
fixes/dont-allow-focus-non-visible-elements
fixes/dragdrop-pointer-stuck
fixes/draw-line-on-deferred-renderer
fixes/effect-clip
fixes/effect-clip-rect
fixes/enable-multi-touch-by-default
fixes/fix-android-perf-maybe-2
fixes/gpu-interop-check-dedicated-allocation-needed
fixes/grcontext-options
fixes/hackfix-skia-gpu-interop
fixes/handle-invalid-dirty-rects
fixes/immutable-bitmap-bitmapmemory-backing
fixes/integration-tests-window-management
fixes/less-warnings
fixes/listbox-selecteditem-not-in-item-ignored
fixes/macos-dont-raise-text-input-if-key-handled
fixes/macos-duplicate-a11y-window
fixes/macos-owned-window-level-inheritance
fixes/macos-uri-handling
fixes/make-iinlinehost-public
fixes/metal-resize-jitter
fixes/microcom-bump
fixes/ncrunch-references
fixes/nsopenpanel-shortcut
fixes/osx-hidden-window-activation
fixes/osx-rendering-glitches
fixes/pendevice-remove-global-state
fixes/publish-avalonia-native-osx-package-seperately
fixes/pump-dispatcher-before-invoking-native-loop
fixes/re-enable-full-sharpgentools
fixes/readd-references-file
fixes/remove-adorner-hack
fixes/remove-loaded-virtual-method
fixes/render-layers
fixes/resizing-wasm
fixes/round-corner-clip-border
fixes/selectionmodel-handle-move
fixes/stable-disable-roll-forward
fixes/stack-overflow-resources
fixes/standalone-content-presenter
fixes/tcc-333
fixes/text-layout
fixes/textLineMetrics
fixes/ticket-745
fixes/tmp
fixes/too-many-layers
fixes/transitions-property-changes
fixes/tree-selectionmodel
fixes/treeview-nonmaterialized-selection
fixes/wasm-layout-render-sync
fixes/win-ui-comp-global-lock
fixes/win32-maximize-not-applied-initially-when-height-set
fixes/window-close-crash
fixes/window-close-crash-testcode
fixes/window-management-stage-manager
fixes/xamlx-generic-type-resolution
fixes/yet-another-dbus-typing-fix
flickerRepo
fluent-textbox-update
focus-and-keyboard
focus_prototype
focus_tree_state
font-tests
force-ci/composition-rework
force-ci/xaml-perf-improvements
foreign-embed-squash
foreign-embed-wip
foreign-embed2
git-pr_6982_rework
global-menu
gpu-optimised-deferred-rendering
grid-tests
grokys/experiment/appium-2
grokys/experiment/appium-2-2
grokys/experiment/more-benchmarks
grokys/experiment/new-itemscontrol
grokys/experiment/new-styling
grokys/framebuffer-skip-memcpy
grokys/trying-to-fix-integration-tests
grokys/update-net-5.0
gtk-solution
hack/emulate-touch-events
headless-tests
headless-timers
html-auto-port
ignore-capture-on-pointer-entered-exited
image-filters
image-scrolling-repro
implement-decorated-window-dragging
inlinesTheThird
integration-tests-selenium
ios-dev
ios-fix
issue-457
itemspresenterbase
jw/native-graphics
jw/wip/wayland
keyframe-binding
knock-knock-are-integration-tests-even-alive
layers-wtf-repro
linux-mono-down
main
managed-dialog-extras-0.9
managed-mouse-pointer
manual-fbo
maxkatz6-patch-1
memory-leak-repro-commit
menu-contexntmenu-slection-is-not-consistant
mergeWithDrawingRecording
microcom-net5-features
missing_content_repro
move
move_resize
nativeMenu-leak-fix
nativeMenuItem-leak-macOS-fix
nativeaot-llvm-experiment
ncomposition
net11-browser
new-weak-events
no-layer-hack
no-llvmpipe
no_composition_rounded
notify-test
old/2025-12-06
onformfactor_issue
open-contextmenu-with-keyboard
opentk-integration
osx-fixes
osx/maximised-set-in-xaml-fix
package-control-catalog
page_proto
parma-fixes-2020-10
pivot_touch
platform_feedback
popup-repro
port/wpf-uniformgrid
portable-xaml
pr4a/fvar-avar-parsing
pr4b/glyph-typeface-with-variation
pr4c/gvar-deformation
pr4d/hvar-advances
pr4f/mvar-metrics
pr4g/vvar-advances
pr4h/font-variations-user-api
pre-lifetime-fixes
property-path
property_transition_stops_repro
psp-repro
pull/14157
rc1-testing
refactor/avaloniapropertystore
refactor/binding-refactor-2025
refactor/binding-to-reflectionbinding
refactor/bindingexpressions-in-valuestore
refactor/bindings-are-expressions
refactor/compiledbinding-refactor-2025
refactor/datavalidation-plugins
refactor/iavaloniaobject-nongeneric
refactor/itemsrepeater-as-itemspresenter
refactor/itemsrepeater-as-itemspresenter2
refactor/layout
refactor/logical-child-optimize
refactor/more-nullable-avalonia-base
refactor/onpropertychanged-nongeneric
refactor/style-priorities
refactor/visual-child-optimize
refactor_pointerover_backportable
release/0.10.0
release/0.10.0-preview1
release/0.10.0-preview2
release/0.10.0-preview3
release/0.10.0-preview4
release/0.10.0-preview5
release/0.10.0-preview6
release/0.10.0-rc1
release/0.10.0-rc2
release/0.10.1
release/0.10.10
release/0.10.11
release/0.10.11-rc.1
release/0.10.11-rc.2
release/0.10.12
release/0.10.13
release/0.10.14
release/0.10.15
release/0.10.16
release/0.10.17
release/0.10.18
release/0.10.19
release/0.10.2
release/0.10.20
release/0.10.21
release/0.10.22
release/0.10.3
release/0.10.4
release/0.10.5
release/0.10.6
release/0.10.7
release/0.10.8
release/0.10.9
release/0.7.0
release/0.8.0
release/0.8.1
release/0.8.2
release/0.8.3
release/0.8.4
release/0.9.0
release/0.9.0-preview1
release/0.9.0-preview10
release/0.9.0-preview2
release/0.9.0-preview3
release/0.9.0-preview4
release/0.9.0-preview5
release/0.9.0-preview6
release/0.9.0-preview7
release/0.9.0-preview8
release/0.9.0-preview9
release/0.9.0-rc.1
release/0.9.0-rc.2
release/0.9.0-rc0001
release/0.9.1
release/0.9.10
release/0.9.11
release/0.9.12
release/0.9.2
release/0.9.3
release/0.9.4
release/0.9.5
release/0.9.6
release/0.9.7
release/0.9.8
release/0.9.8.1
release/0.9.9
release/11.0
release/11.0.0
release/11.0.0-preview1
release/11.0.0-preview2
release/11.0.0-preview3
release/11.0.0-preview4
release/11.0.0-preview5
release/11.0.0-preview6
release/11.0.0-preview7
release/11.0.0-preview8
release/11.0.0-rc1.1
release/11.0.0-rc2.1
release/11.0.0-rc2.2
release/11.0.1
release/11.0.10
release/11.0.11
release/11.0.12
release/11.0.13
release/11.0.2
release/11.0.3
release/11.0.4
release/11.0.5
release/11.0.5-rc1
release/11.0.6
release/11.0.7
release/11.0.8
release/11.0.9
release/11.1
release/11.1.0
release/11.1.0-beta1
release/11.1.0-beta2
release/11.1.0-rc1
release/11.1.0-rc2
release/11.1.1
release/11.1.2
release/11.1.3
release/11.1.4
release/11.1.5
release/11.2
release/11.2.0
release/11.2.0-beta1
release/11.2.0-beta2
release/11.2.0-rc1
release/11.2.0-rc2
release/11.2.1
release/11.2.2
release/11.2.3
release/11.2.4
release/11.2.5
release/11.2.6
release/11.2.7
release/11.2.8
release/11.3
release/11.3.0
release/11.3.0-beta1
release/11.3.0-beta2
release/11.3.0-rc1
release/11.3.1
release/11.3.10
release/11.3.11
release/11.3.12
release/11.3.13
release/11.3.14
release/11.3.15
release/11.3.16
release/11.3.17
release/11.3.18
release/11.3.19
release/11.3.2
release/11.3.20
release/11.3.21
release/11.3.22
release/11.3.3
release/11.3.4
release/11.3.5
release/11.3.6
release/11.3.7
release/11.3.8
release/11.3.9
release/12.0
release/12.0.0
release/12.0.0-preview1
release/12.0.0-preview2
release/12.0.0-rc1
release/12.0.0-rc2
release/12.0.1
release/12.0.2
release/12.0.3
release/12.0.4
release/12.0.5
release/12.1
release/12.1.0
release/12.1.1
release/12.1.2
release/latest
release/outsystems/0.9.11
remote-devtools
remove-acrylic-blur-from-old-win
removing-compositional-renderer-license
render-only-on-render-thread
repro-ap
repro-ap-1
repro-arcsegment-not-updating
repro-binding-window-state
repro-bindingprio-bug
repro-garbled-graphics
repro-ienumerable-menu-navigation
repro-invalid-draw-calls
repro-items-repeater-issue
repro-properties
repro-req-an-frame
repro-resource-recursion
repro-selected-items-not-working
repro-selecting-items-control-not-working-inside-popup
repro-window-close
repro/1326-data-binding-issue
repro/1436-layout-not-done-after-style-applied
repro/1707-listbox-virtualization-resize-performance
repro/1758-virtualizer-measured-items
repro/18104-drag-drop-flyout-placement
repro/20845-tabitem-datacontext-binding
repro/binding-attached-property-from-style
repro/binding-isfocused
repro/bound-listboxes
repro/caret-binding-failure
repro/carousel-not-materializing-content
repro/dynamic-resource-bug
repro/minimal-repro-stackoverflow-onewaytosource-binding
repro/outsys-sizing-issue
repro/properties-overhaul-bug
repro/radial-gradient-transform
repro/size-to-content
repro/window-not-obey-min-height
repros/content-presenter-regression
repros/custom-fonts-pr
repros/text-alignment-issue
repros/web-null-signature
revert-10284-feature/impl-IReadableBitmapImpl-in-SurfaceRenderTarget
revert-13066-fixes/13064-logical-scrollable
revert-14106
revert-18343-bump-dbus-stack
revert-2489-fixes/2432-carousel-insert
revert-2645-issue2613
revert-3221-undecorated-window
revert-selectionmodel
rtb-gl-fixes
scenegraph-after-breakage
scroll-measure
scroll_transition_repro
sdks-update
set-empty-x11-title-instead-of-null
simplify-testing
size-to-content-render-repro
skia-foreign-bitmap
sound
stable-test-mac-os-fix
stable/0.10.0
stable/0.10.x
stable/0.10.x-codice
stable/0.10.x-outsys
stable/0.10.x-se
stable/0.9
stable/outsystems-0.9
stable/parm-0.9
stable/tmp8
strongname
stx/0-preedit-reentrancy
stx/1-text-navigation
stx/10-macos-nstextinputclient
stx/11-android-inputconnection
stx/12-ios-responder
stx/13-win32-tsf
stx/2-automation-text-provider
stx/3-uia-text-pattern
stx/4-atspi-text
stx/5-grid-table-patterns
stx/6-structured-text-input
stx/7-composition-in-document
stx/9-win32-imm
styleable-grid-rowcoldefs
styles-not-getting-applied-repro
system-xaml
tabcontrol-bound-items
temp/implement-hdr
temp/rpi-slowness
temp/testbuild-skia-extensions
test-log-box-shadow
test-meta-packages
test-multiple-optimizations-together
test-package-run
test-saverestore-layer
test-styleable-rowcol-defs
test-sub-menu-item
test/suppressActivationEvents
test/trigger
test11
tests/animations-p1
tests/default-font-fail-nativeaot
testy-test
text-input
text_ime_client_direct
text_selector_adorner
text_selector_magnifier
text_selector_zindex
themes/fluent2
thread-issue-repro
timer-overload
tinywm
tmp-2
tmp-angle
tmp-build-dan
tmp-menu-disable
tmp-winuicomp_with_manual_fbo
tmp/11.0
tmp1
tmp4
tmp6
tmp9
transitions-bugfix-deux
transparency-hints-list
treeview-issue-repro
try-critical-branch-bringup-2
try-fix-3336
ui-automation-test
update-avalonia-dbus-submodule
update-submodules
upgrade-angle
use-net7-tizen
v0.8
virtualized_wrappanel
virtualizeing_wrappanel_rc1
virtualizing_grid
visual-extensions-fallback
visualbrush_recreate
vnc-mouse-drag-issue
vnext
wasm_editcontext
win-ui-comp-with-manual-fbo
win32-jitter-hack
win32_client_pos_test
win32_hidden_border_fix_test
win32_mouse_wheel_zoom
window_hide_test
windowing-prototype
windowing-prototype-drag-and-drop
winit-legacy
wip/use-selectionmodel
wip_snappoint_anchor
x11-mit-shm
x11-test-without-render-window
x11_allowed_actions
xaml_composition_animations
xaml_integrated_comp_animations
xamlil-debug-info
xclass-generator
xdatagrid-experiment
xi2-leave-event
xpf-old
xpf/composition-rework-branch
xpf/primary-mouse-device
xpf/screen-fix-21750
xpf_win32_test
xsd-generator
xy-focus-and-tvos
xy-focus-skiasharp-3
0.0.1-alpha
0.1.0-alpha2
0.1.1
0.1.10
0.1.2
0.1.3
0.1.4
0.1.9
0.10.0
0.10.0-preview1
0.10.0-preview2
0.10.0-preview3
0.10.0-preview4
0.10.0-preview5
0.10.0-preview6
0.10.0-rc1
0.10.0-rc2
0.10.0.10
0.10.0.4
0.10.1
0.10.10
0.10.11
0.10.12
0.10.12.23
0.10.13
0.10.13.24
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.2
0.10.20
0.10.21
0.10.22
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.2.0-preview
0.2.1-preview
0.3.1-preview
0.4.0
0.4.1
0.5.0
0.5.1
0.7.0
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.9.0
0.9.0-preview1
0.9.1
0.9.10
0.9.11
0.9.12
0.9.2
0.9.2.18
0.9.2.19
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
0.9.9
1.0.1
1.0.4
1.1.1
1.1.2
1.2.1
1.3.1
1.3.4
1.4.1
1.4.2
1.5.1
1.6.1
10367-checkpoint1
11.0.0
11.0.0-preview1
11.0.0-preview2
11.0.0-preview3
11.0.0-preview4
11.0.0-preview5
11.0.0-preview6
11.0.0-preview7
11.0.0-preview8
11.0.0-rc1.1
11.0.0-rc2.1
11.0.0-rc2.2
11.0.1
11.0.10
11.0.11
11.0.12
11.0.13
11.0.2
11.0.3
11.0.4
11.0.5
11.0.5-rc1
11.0.6
11.0.7
11.0.8
11.0.9
11.1.0
11.1.0-beta1
11.1.0-beta2
11.1.0-rc1
11.1.0-rc2
11.1.1
11.1.2
11.1.2-rc1
11.1.3
11.1.4
11.1.5
11.2.0
11.2.0-beta1
11.2.0-beta2
11.2.0-rc1
11.2.0-rc2
11.2.1
11.2.2
11.2.3
11.2.4
11.2.5
11.2.6
11.2.7
11.2.8
11.3.0
11.3.0-beta1
11.3.0-beta2
11.3.0-rc1
11.3.1
11.3.10
11.3.11
11.3.12
11.3.13
11.3.14
11.3.15
11.3.16
11.3.17
11.3.18
11.3.19
11.3.2
11.3.20
11.3.21
11.3.22
11.3.3
11.3.4
11.3.5
11.3.6
11.3.7
11.3.8
11.3.9
12.0.0
12.0.0-preview1
12.0.0-preview2
12.0.0-rc1
12.0.0-rc2
12.0.1
12.0.2
12.0.3
12.0.4
12.0.5
12.1.0
12.1.1
12.1.2
itemssource-checkpoint1
itemssource-checkpoint2
nuget-0.7.1.5
nuget-0.7.1.6
nuget-release-0.5.1
nuget-release-0.6.0
nuget-release-0.6.1
${ item.name }
${ noResults }
180 Commits (fixes/macos-owned-window-level-inheritance)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
0dbce40347
|
Add RelativeTransform to brushes (#21881)
* Apply tile brush transforms once the tile sits in target space Brush.Transform was concatenated into the shader matrix before the translation that moves the tile onto the painted area, so it acted in the tile's own space instead of the target's. A brush transform on a fill away from the origin - the common case, since a relative viewport resolves against the fill's bounds - came out displaced, and WPF, whose behaviour these brushes follow, disagrees. Both tile paths now place the tile first and let the transform act on the result. Where the placement is identity, which is what the existing goldens cover, the matrices are unchanged. The cross suite gains an image brush so the non-scalable path is covered too, plus a smooth ramp fixture: the star line drawing that was the only image asset survives resampling as sparse speckle, which the comparison metric cannot tell apart from a geometry error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Apply the conic gradient transform after its angle The sweep shader carried Angle as its local matrix and pre-concatenated Brush.Transform onto it, so the transform acted on the raw sweep and the angle then turned the result. Every other brush bakes its intrinsic geometry in first and lets the brush transform act on the finished pattern. The visible effect was that a translation moved the gradient in a direction rotated by Angle - 90 instead of the direction asked for. A sweep gradient is fully determined by its centre and angle, so the golden here is checked against the brush with its centre moved by the same offset and no transform: the two renders are pixel-identical, while the previous order is 0.169 rmse away against a 0.022 tolerance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Add RelativeTransform to every brush A brush transform expressed in the unit space of the painted bounds, applied before the absolute Transform - WPF's Brush.RelativeTransform. It lets one brush express a bounds-dependent transform, an SVG gradientTransform in objectBoundingBox units for instance, without baking any one consumer's bounds into a matrix, which is what makes a single brush per gradient definition possible. The property sits on IBrush and Brush, so every brush kind carries it and a consumer reads it without a type test. Each immutable brush takes it through a second constructor, leaving the existing signatures alone and marking them for collapse in v13. The gradient brush animator interpolates it alongside Transform, and the composition schema gains it on both brush bases so the value reaches the render thread as a live resource rather than a snapshot. IBrush is NotClientImplementable, so the added member is suppressed for API validation the way earlier additions to those interfaces are. Nothing consumes it yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Consume RelativeTransform in the Skia backend The relative matrix is conjugated into target space at draw time - the unit square maps onto the painted rect, whose origin translation and scale wrap the matrix - and composes before the absolute brush transform. All three gradient kinds and both tile brush paths read it; a solid colour brush has nothing for it to act on, matching WPF. With no relative transform every path reduces to the previous matrices, so existing goldens stay byte-identical. The cross suite compares the result against WPF for the linear and radial gradients, a drawing brush tiled and untiled, an image brush, the composition order against Transform, one brush shared by two differently sized fills, and the solid colour no-op. Goldens under Skia/Media additionally cover the immediate renderer and the GPU backends, which the cross suite does not exercise; each was measured against its WPF counterpart before being committed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
1 week ago |
|
|
b709c58c6b
|
[Text] Glyph Outline Part 2/13 - GlyphTypeface.GetGlyphOutline implementation (#21406)
* Harden cmap/name/post parsing against malformed fonts
Fonts are untrusted input, but several pre-existing table parsers throw out
of the GlyphTypeface constructor on hostile data, denying the whole font
instead of degrading the affected (cosmetic) table.
- name: wrap NameTable.Load in try/catch so a malformed table falls back to a
default family name (same outcome as an absent name), and bounds-check
NameRecord.GetValue's (offset,length) slice — the record array is validated
at load but each record's storage slice is read later during construction.
- post: wrap PostTable.Load so a malformed cosmetic-hint table degrades to
defaults rather than denying the font.
- cmap format 12/13: clamp the declared length and group count to the buffer,
computing the group span in long to avoid the nGroups*12 int overflow a
hostile count would wrap to a negative slice length.
- cmap format 4 selection: score a Windows Symbol subtable worse than any
Unicode subtable so ASCII resolves regardless of subtable order, while a
Symbol-only font still selects its only subtable.
maxp/cmap remain fatal by design. Behavioural hardening only; public API
unchanged. Backportable independently of the glyph-outline stack.
* Clamp cmap range contents and harden binary reader primitives
Format 12/13 group contents are attacker-controlled: TryGetRange used to
hand the raw uint32 end straight to per-codepoint consumers, so a group
with endCharCode 0x7FFFFFFF turned range enumeration into an unbounded
(for int.MaxValue, non-terminating) loop. Clamp ranges to the Unicode
range and map inverted/out-of-range groups to empty ranges so later
groups still enumerate.
Give the format 4 constructor the same treatment its format 12 sibling
already received: clamp the declared length and segment count to what
the buffer actually holds instead of slicing unchecked (debug asserts
replaced by the clamps).
In BigEndianBinaryReader, bounds-check array reads before allocating
(a hostile length is rejected instead of attempting the allocation),
make EnsureAvailable overflow-proof, and clamp ReadBytes against
negative counts.
* Add font parsing infrastructure for glyph outline/color drawing
Introduces shared utility types that subsequent PRs will use to
implement GetGlyphOutline (glyf table) and GetGlyphDrawing
(COLR v0/v1) on GlyphTypeface:
- ObjectPool<T>: thread-safe object pool used by Decyclers
- Decycler<T> / CycleGuard<T> / DecyclerException: generic
cycle-detection and depth-limiting utility for recursive
font-table traversal (composite glyphs, paint graphs)
- FontVariationSettings: parameter type for the upcoming
GetGlyphOutline / GetGlyphDrawing overloads
- IGlyphDrawing / GlyphDrawingType: return-type contract for color
glyph drawings (outline, color layers, SVG, bitmap)
- CharacterToGlyphMapDictionary: lightweight, allocation-free
IReadOnlyDictionary<int, ushort> view over the cmap, plus
CharacterToGlyphMap.AsReadOnlyDictionary() to expose it
No behavior change; types are not yet consumed in this PR.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Validate ObjectPool maxSize and add unit tests
The ObjectPool<T> constructor previously accepted any maxSize value.
A value of 0 or below silently caused every Return to be discarded,
which is hard to diagnose at the call site.
- Reject maxSize < 1 with ArgumentOutOfRangeException at construction.
- Document the new precondition in the XML comment.
- Add ObjectPoolTests covering: factory null guard, maxSize bounds,
Rent/Return basics, Return ignoring null, max-size enforcement,
validator invocation and rejection, validator-as-reset, plus
concurrent stress tests for cap enforcement and parallel use.
* Validate Decycler maxDepth and add unit tests
The Decycler<T> constructor previously accepted any maxDepth value.
A value of 0 or below made the very first Enter throw
DepthLimitExceeded, which presents as a cycle/depth error at use time
instead of pointing at the construction site.
- Reject maxDepth < 1 with ArgumentOutOfRangeException at construction.
- Document the new precondition in the XML comment.
- Add DecyclerTests covering: maxDepth bounds, Enter/Exit lifecycle,
nested depth, cycle detection, depth-limit-exceeded, depth-vs-cycle
ordering, no state mutation on failed Enter, Reset semantics,
guard idempotency, MaxDepth/CurrentDepth properties, and a struct
type other than int.
* Add tests for CharacterToGlyphMap.AsReadOnlyDictionary
Covers the IReadOnlyDictionary<int, ushort> view returned by
AsReadOnlyDictionary, using the existing Inter font asset:
- ContainsKey agrees with the underlying map for both mapped and
unmapped code points.
- Indexer returns the same glyph id as map.GetGlyph for several
representative ASCII characters.
- Indexer throws KeyNotFoundException for an unmapped code point.
- TryGetValue: positive and negative paths.
- Count is positive and matches the enumerated pair count.
- Enumeration yields (key, value) pairs that round-trip through the
underlying CharacterToGlyphMap.
- Keys enumeration and pair-key enumeration agree.
- Two AsReadOnlyDictionary() calls produce functionally equivalent
views (no identity assumption).
Tests live alongside the existing CharacterToGlyphMap tests in
GlyphTypefaceTests so they can reuse the CustomPlatformTypeface
helper.
* Redesign FontVariationSettings; add GlyphDrawingOptions
FontVariationSettings is changed from a public record to a sealed class
with internal factory methods (FromCoordinates / FromInstance), a
FrozenDictionary backing for NormalizedCoordinates, and structural
Equals/GetHashCode. The type now exclusively models variable-font axis
configuration; palette and bitmap-strike concerns are moved out.
GlyphDrawingOptions is a new public sealed record that carries the
drawing options that are independent of axis configuration: an optional
CPAL palette index (≥ 0) and an optional bitmap-strike pixel size (≥ 1).
Both properties validate at init time and the type participates in
record-equality and with-expressions.
Tests are added for both types (48 new assertions).
* Make FontVariationSettings factories public
FromCoordinates and FromInstance are promoted from internal to public.
They were kept internal while the consuming public API was being designed;
that design is now settled (GlyphTypeface.CreateVariationSettings /
VariationAxes / VariationInstances, planned for PR2).
Class-level remarks are updated to describe the typeface-agnostic design
rationale and point to GlyphTypeface.CreateVariationSettings as the
preferred entry point for user-space axis values.
* Tighten contracts and docs on font-parsing infra
Polish pass on the shared infrastructure types so the contract surface is
unambiguous before PR2 (GetGlyphOutline) and PR3 (GetGlyphDrawing) build
on it:
- IGlyphDrawing now exposes GlyphDrawingType Type so callers can branch
on format without downcasting. The GlyphDrawingType enum was already
defined but unreferenced by the interface; this closes the loop.
PR3's ColorGlyphDrawing and ColorGlyphV1Drawing already implement the
property, so the rebase is a no-op.
- IGlyphDrawing.Bounds and Draw(origin) get explicit coordinate-space
docs (drawing-space, Y-down; origin is the post-flipped glyph anchor).
- Decycler<T> gets a class-level remarks block stating it is not
thread-safe (one instance per traversal) and that Enter throws on
cycle / depth-limit so callers can catch at the outermost site.
- FontVariationSettings.Default documents that null and Default are
interchangeable for parameters typed as FontVariationSettings?.
- ObjectPool.Return documents that callers must not return the same
item twice without an intervening Rent — the pool does not detect
duplicate returns by design.
Tests:
- ObjectPool: validator must not be invoked on Rent (pins the
validate-on-return contract).
- GlyphDrawingOptions: parameterless ctor equals Default (record
equality should make them interchangeable).
- FontVariationSettings: FromCoordinates with both coordinates AND
instanceIndex populated (combined form documented in the API).
83 tests pass (was 76).
* Reshape FontVariationSettings for cache-key use
Switch from a class wrapping FrozenDictionary + nullable instance index
to a readonly struct backed by a sorted ImmutableArray of a dedicated
FontVariationCoordinate record-struct. Driven by the type's role as a
field on FontCollectionKey:
- Hash code is computed once at construction and cached. Lookups in the
font-resolution cache no longer pay an OrderBy allocation per call.
- Equality is a parallel walk over two sorted arrays — no hash lookup,
no TryGetValue per element. Short-circuits on cached-hash mismatch.
- TryGetCoordinate / GetCoordinateOrDefault are linear scans, faster
than hash lookup for the typical handful-of-axes case.
- default(FontVariationSettings) is the "no variation" value. The old
Default singleton goes away; nullable-handling at the cache layer
becomes unnecessary.
- InstanceIndex is dropped from the type. Named-instance selection is
a typeface-level concern that resolves to coordinates; the runtime
settings carry coordinates only, matching CSS / HarfBuzz / DirectWrite
conventions.
Tests rewritten: 34 cases covering struct semantics, sorting,
TryGetCoordinate, hash caching, equality short-circuits, and the
FontVariationCoordinate record's own equality.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix auto suggestion
* Add synthetic-font test harness
SyntheticFont / BigEndianBuffer build and mutate in-memory sfnt fonts so the
table parsers can be exercised against hand-crafted malformed input without a
platform shaper. Shared by every parser PR's malformed-font tests.
* Characterize cmap/name/post degradation on malformed input
Regression guards over the synthetic-font harness: a truncated post/name table
degrades to defaults / a fallback family name instead of denying the font, the
cmap format-12 nGroups*12 overflow is clamped, and Format-4 selection prefers a
Unicode subtable over Windows Symbol regardless of directory order.
* Fix dictionary wrapper contract, guard double-exit, and zero-coordinate canonicalization
CharacterToGlyphMapDictionary mixed two membership predicates: Keys and
Count filtered by ContainsGlyph while the indexer, TryGetValue and the
enumerator used TryGetGlyph, so glyph-0 mappings produced keys the
indexer rejected. Everything now answers through TryGetGlyph, and the
Count walk (O(codepoints) over the mapped ranges) is computed once and
cached.
Decycler.Exit decremented the depth unconditionally: CycleGuard is a
copyable ref struct, so a copied guard could exit the same id twice and
grant later traversals extra depth budget. Depth is now only returned
when the id was actually removed from the visited set.
FontVariationSettings.FromCoordinates kept zero-valued coordinates, so
an explicitly-default axis (wght=0 normalized) hashed and compared as a
distinct value from settings omitting the axis - producing duplicate
variation clones and font-collection cache entries downstream. Both
factories now canonicalize zeros away (after the duplicate-axis check,
which the dictionary overload previously skipped entirely).
* Document the cmap dictionary view and tighten Decycler/ObjectPool internals
Add XML docs to CharacterToGlyphMapDictionary's members. Collapse
Decycler.Enter's Contains-then-Add into a single HashSet.Add (a false
return means the id was already visited - a cycle). Make ObjectPool's
lock-free count fast-check a volatile read.
* Simplify FontVariationSettings.Equals to a span SequenceEqual
Map the coordinate comparison onto the inner array via the span overload
(Coordinates normalizes default to Empty, so both spans are valid). The
span SequenceEqual avoids the boxing the LINQ overload would incur on
this dictionary-key type, and FontVariationCoordinate's record-struct
value equality drives the element compare. The cached-hash early-out is
kept.
* Add pre-allocation validation in NameTable.Load so malformed name tables are rejected before creating the names array.
* Make PostTable.Load to catch only the malformed-data exception raised by this parsing path, instead of catching everything.
* Raise ArgumentOutOfRangeException for negative count
* Validate tableLength for CmapFormat12Or13Table ctor
* Fixes GlyphDrawingOptions ArgumentOutOfRangeException nameof usage
* Fix CmapFormat4Table ctor: clamp parallel-array offsets to tableLength
When a malformed subtable declares a length that drives _segCount to 0,
startCodeOffset = endCodeOffset + 0*2 + 2 (reservedPad) can exceed
tableLength, causing Slice() to throw and denying the font entirely.
Apply Math.Min(offset, tableLength) to each derived array offset so that
zero-length slices always start at a valid position, degrading silently
to an empty mapping instead of crashing.
* Revert change
* Only handle specific exceptions in NameTable.Load
Guard against negative count in BigEndianBuffer.Zeros
* Speak user space in the public variation API
Normalized coordinates are font-relative - the same value means different
user positions under different fvar ranges and avar maps - so they cannot
be authored in a style before font resolution and do not interpolate
meaningfully. Every mainstream API (CSS font-variation-settings,
DirectWrite, HarfBuzz, Skia) traffics in user-space values, and a public
normalized type named like theirs invites passing wght=700 into a [-1,1]
slot.
- new public currency: FontVariation (tag=value in designer units) and an
immutable FontVariationSettings with Parse/ToString ("wght=700,wdth=85"),
order-independent structural equality, a cached hash, and CSS last-wins
duplicate handling - usable as a style value and a cache key
- the normalized pair moves out of public view: FontVariationCoordinate
becomes internal NormalizedVariationCoordinate and the normalized
settings struct becomes internal NormalizedVariationPosition, unchanged
in behavior
- the user-space -> normalized conversion stays a per-font, application-
time concern; the fvar/avar reader lands in a follow-up PR
* Accept infinite font variation values
Infinities clamp to the axis range at apply time like any out-of-range
value, so only NaN is rejected now. Parse also uses explicit number
styles instead of NumberStyles.Float since the value text is pre-trimmed
and the whitespace flags were redundant.
* Guard NameRecord.GetValue against decoder exceptions
The selected encodings use replacement fallback and never throw on
malformed bytes, but degrade to an empty value anyway so an
exception-throwing fallback can never deny the font.
* Use nameof(value) in GlyphDrawingOptions setter exceptions
Matches the .NET runtime convention for property setters, also used
elsewhere in this repo (e.g. FormattedText).
* Add GetGlyphOutline API with glyf/loca table parsing
Implements vector outline retrieval for TrueType glyphs:
- LocaTable: parses the 'loca' table (short/long offset variants)
to map glyph IDs to glyf offsets
- GlyfTable: parses the 'glyf' table, supporting simple and
composite glyphs, and builds geometry into an IGeometryContext
- SimpleGlyph / CompositeGlyph / GlyphDescriptor / GlyphComponent /
GlyphFlag / CompositeFlags: data model for the parsed glyph
records
- GlyphDecycler: pooled cycle/depth guard for composite-glyph
recursion (derives from the shared Decycler<int>)
GlyphTypeface now eagerly loads the glyf table when a head table is
present and exposes:
Geometry? GetGlyphOutline(ushort glyphId, Matrix transform,
FontVariationSettings? variation = null)
Returns null when the font has no outline data for the glyph or the
glyph index is out of range.
* Drop variation parameter from GetGlyphOutline
The FontVariationSettings? variation parameter was a forward-compat
placeholder that was never wired through to the glyph parser. Remove it
so the API doesn't advertise capability it doesn't have.
Variable-font support will land as an instance-level concern on
GlyphTypeface itself (mirroring how FontSimulations is already baked in
at construction time), resolved through IFontCollection alongside
FontWeight/Style/Stretch. Adding variation back as a per-call parameter
would be additive at that point if a concrete need emerges.
* Add unit tests for loca/glyf parsing
Covers the glyph-outline parser that GetGlyphOutline builds on, exercised
directly against the Inter test font without a platform render interface:
- LocaTableTests: glyph-count parity with maxp, out-of-range handling,
ascending ranges for every glyph, empty-glyph (space) zero-length range.
- GlyfTableTests: TryGetGlyphData for out-of-range / empty / letter glyphs;
TryBuildGlyphGeometry into a recording IGeometryContext for simple,
empty, out-of-range and composite glyphs; transform application; closed-
figure invariants.
Tables are loaded via their internal factories and geometry is captured
through a fake IGeometryContext, so the parser logic is tested in isolation.
* Add glyph-outline render tests with Inter Variable
Render-comparison coverage for GetGlyphOutline, drawing the returned
Geometry filled in black on a white background and diffing against an
expected PNG (RMSE, 2.2% tolerance, both immediate and compositor paths):
- Should_Render_Inter_Latin_Glyph — Inter-Regular 'A' (simple glyph).
- Should_Render_Inter_Composite_Glyph — Inter-Regular 'Á' (composite
glyph: base + accent), exercises the recursive component path.
- Should_Render_MiSans_CJK_Glyph — MiSans-Normal '中' (CJK ideograph,
many contours / counters).
- Should_Render_InterVariable_At_Default — new Inter Variable asset
rendered at the default variation point. PR2 doesn't apply variation,
so this baselines the default-instance outline against which the
future variable-font work can compare deformed outputs.
- Blank_Variable_Font_Returns_Null_Outline — AdobeBlank2VF (variable
font with intentionally empty glyphs) verifies GetGlyphOutline returns
null without throwing.
Fonts are loaded via SKData.CreateCopy + SKTypeface.FromData so the
typeface's lifetime survives the source stream's disposal. This also
sidesteps a family-name collision: Inter-Regular and InterVariable both
identify as family "Inter", so FontManager resolution would be
ambiguous — direct loading targets each file unambiguously.
InterVariable.ttf is added under Assets/ and picked up by the existing
EmbeddedResource wildcard in both render-test projects.
* Set non-zero fill rule on glyph outlines
Avalonia geometries default to FillRule.EvenOdd. TrueType outlines
expect the non-zero winding rule: where same-orientation contours
overlap (an 'A' crossbar over its diagonal strokes, an accent over its
base glyph in a composite), EvenOdd XORs the regions and leaves visible
gaps. Setting the fill rule once on the outer context at the entry to
TryBuildGlyphGeometry fills the geometry correctly, including through
the composite path's TransformingGeometryContext wrapping (the
wrapping applies to transforms, not to the geometry-level fill rule).
Baselines for the three Inter glyphs were regenerated; the MiSans
ideograph is unaffected because CJK strokes don't overlap.
* Drop per-point debug logging from TransformingGeometryContext
The glyph-outline transform wrapper logged every ArcTo / BeginFigure /
CubicBezierTo / QuadraticBezierTo / LineTo / EndFigure / SetFillRule /
Dispose call through Logger.TryGet(LogEventLevel.Debug, ...). That was
useful while bringing up the glyf parser but runs a guard check per
contour point on every glyph outline build — pure overhead now that the
path is stable. Each method is back to a plain transform-and-delegate;
Dispose is a no-op (the wrapper never owned the inner context).
The exceptional-path warning in TryBuildGlyphGeometry (cyclic composite
glyphs) is unrelated and stays.
* Add InterVariable.ttf to Should_AddGlyphTypeface_By_Stream font list
The glyph-outline render tests embed InterVariable.ttf under
Avalonia.RenderTests/Assets, which the Skia unit-test project picks up
via its `EmbeddedResource Include="..\Avalonia.RenderTests\Assets\**\*.ttf"`
glob. The asset enumeration therefore returns 16 fonts while the test's
hard-coded `infos` list had 15, failing the count assertion.
Add the missing entry in its ordinal-case-insensitive sort position
(after Inter-Regular.ttf). Its production identity — FamilyName
"Inter Variable", Weight Normal (the default fvar instance, usWeightClass
400) — is distinct from the "Inter" family of Inter-Regular/Inter-Bold,
so the (family, weight) round-trip lookup stays unique.
* Fix off-by-one glyph-id bounds check; drop unused usings
GetGlyphOutline rejected out-of-range ids with `glyphId > GlyphCount`,
which let the id equal to GlyphCount slip through — valid glyph ids are
0..GlyphCount-1, and reading at index GlyphCount walks past the end of
the loca offsets. Use `>=` so the upper bound is excluded.
Also remove unused using directives from the glyf parsers
(CompositeGlyph, GlyfTable, GlyphDescriptor, SimpleGlyph).
* Allocate batch glyph-metric buffers only when their source is present
Batch TryGetGlyphMetrics unconditionally sized the hMetrics and vMetrics
temporary buffers to glyphIds.Length even when the font has no hmtx or no
vmtx. Most fonts ship no vmtx, so a large batch heap-allocated a per-glyph
vertical-metric array that was never read.
Size each buffer to zero — a free, empty stackalloc — when its source
table is absent, so it only materialises (and only spills to the heap
past 256 glyphs) when it will actually be filled and read.
* Bail out of composite glyphs that use point matching
A composite component with ARGS_ARE_XY_VALUES clear positions itself by
point matching: arg1/arg2 are point indices, and the component is placed
so one of its points coincides with a point in the already-assembled
parent glyph. CreateComponentTransform only applied a translation when
ARGS_ARE_XY_VALUES was set, so a point-matched component was rendered at
zero translation — a visibly wrong outline.
Point matching isn't implemented. Rather than emit an incorrect glyph,
return false for any composite that uses it (checked before any geometry
is emitted) so the caller falls back to "no outline". XY-value composites
(the overwhelming common case, e.g. accented Latin letters) are
unaffected.
* Support composite glyph point matching
Composite components with ARGS_ARE_XY_VALUES clear are positioned by aligning one of their points onto a point of the already-assembled glyph rather than by an x/y offset. The streaming build path cannot retain points, so route these (rare) composites through a new materialising path: resolve every component into a pooled buffer, apply the point-match translation, then emit the assembled contours.
Out-of-range point indices, phantom-point references, and nested composite components bail out (no outline) rather than render incorrectly. Replaces the previous bail-out, and adds a synthetic-font test covering matched-point alignment and the bail-out cases.
* Add point-matching composite render test
No production font encodes composite point matching (ARGS_ARE_XY_VALUES clear) — verified across the Inter, Noto, Source, SIL (Gentium/Charis/Andika) and Oswald families, which all use x/y offsets. To exercise GlyfTable's point-matching path through the full Skia pipeline, this adds a small purpose-built fixture (PointMatch.ttf, 880 bytes) whose 'P' glyph is a composite: a base rectangle plus a square placed by point matching, aligning the square's bottom-left point onto the rectangle's top-right point.
The baseline shows the square fused to the rectangle's top-right corner; a regression that mishandled point matching would drop it at the origin, which the image diff catches.
* Add missing test font to the list of expected fonts in the Should_AddGlyphTypeface_By_Stream test
* Return an immutable IGeometryImpl from GetGlyphOutline
GetGlyphOutline(ushort, Matrix) returned a mutable StreamGeometry (an AvaloniaObject) with the transform baked in — neither cacheable (every pen position is a distinct geometry) nor safe to share. Reshape to GetGlyphOutline(ushort) returning design-unit-space geometry as an immutable IGeometryImpl (a small sealed wrapper that exposes only the read-only surface and can't be re-opened), so a single instance is safe to cache and share on the future glyph-run hot path. Callers apply scale/position via IGeometryImpl.WithTransform or a drawing-context transform, and draw through the existing DrawGeometry(IGeometryImpl) overload.
* Add SyntheticFont harness self-tests
Round-trip, table patch/replace/remove/truncate, and asset-load tests for the
synthetic-font harness over Inter-Regular and InterVariable.
* Reject non-monotonic contour endpoints in simple glyph parsing
numPoints is derived from the last contour endpoint alone, so a glyph
whose endPtsOfContours array is not strictly increasing sized its point
buffers too small and sent every consumer walk indexing past them - an
IndexOutOfRangeException on each outline build of that glyph. Validate
the endpoints up front and return the default (empty) glyph instead.
* Rename glyph-index parameters to glyphIndex / glyphIndices
Review feedback on the glyph-outline API: the ushort values these members
take are glyph indices, and the platform already speaks that language
(GlyphRun.GlyphIndices), so the parameters say what they are instead of
the looser glyphId/glyphIds. Applies to GetGlyphOutline and the
advance/metrics members this series reworks, plus the tests exercising
them. Purely a naming change - no call site uses named arguments.
* Add failing tests for the off-curve contour walk
The off-curve-start branch of the glyph walker drops one quadratic per
extra point in runs of consecutive off-curve points and ignores an
on-curve last point when picking the figure start. Pins the correct
TrueType decomposition; the on-curve-start case is pinned as-is.
* Unify the contour walkers into one EmitContour
Both geometry emitters carried the same on-curve/off-curve branch pair,
and the off-curve branch had two defects: it advanced past both points
of an off-curve pair (dropping one quadratic per extra point in longer
off-curve runs) and always started at the implied midpoint even when
the last point of the contour is on-curve. One shared walker now does
the TrueType decomposition with a pending-control state machine and an
explicit close, and both the simple-glyph path and the point-matching
composite path route every contour through it.
* Add failing tests for truncated glyf and loca data
The counts in a simple glyph header and in maxp are untrusted: a body
shorter than they promise currently throws out of SimpleGlyph.Create,
and a short loca table reports a glyph count it cannot index.
* Degrade to an empty outline on truncated glyf/loca data
SimpleGlyph.Create bounds-checks the endpoint array, the declared
instruction run and every flag/coordinate read, returning default (and
the rented buffers) instead of throwing when the body is shorter than
its untrusted counts promise. LocaTable clamps its glyph count to the
entries the table data actually covers, replacing an empty validation
block that only claimed to handle short tables.
* Name bit 6 of the simple glyph flags OVERLAP_SIMPLE
The OpenType spec assigns bit 6 (0x40) OVERLAP_SIMPLE; only bit 7 is
reserved.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
|
2 weeks ago |
|
|
b3810fc08c
|
Fixed a bug with stale _usedCache value that wasn't reset properly (#21823)
|
2 months ago |
|
|
ee767d5de1
|
Composition-aware geometries and drawing change detection (#21682)
* Composition-aware geometries * Propagate resource changes in DrawingBrush * Change detection in Drawing * Make IRenderDataGeometry a private API |
3 months ago |
|
|
0279a557b4
|
Fix RenderTargetBitmap looses effects (#20790)
* add failing test for RenderTargetBitmap_DropShadowEffect * Fix immidiateRenderer with Effect wasn't working as expected * yet another render test * XML comments for newly added members * Address Copilot review * Add another unit test to ensure the recent changes don't get lost at some point in time * address review * Apply Review suggestion Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * inline effectPadding * implement feedback for better bounds handling * Update src/Avalonia.Base/Media/DrawingGroup.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * anohter minor fix * Address PR #20790 review comments - Fix RenderDataEffectNode.Bounds to return null when no children exist, preventing empty effect nodes from incorrectly reporting non-null bounds and causing render artifacts due to incorrect dirty rects. Bounds now inflates child bounds by the effect output padding rather than unioning with BoundsRect. - Move effect output padding inflation from callers into DrawingContext implementations (PlatformDrawingContext, RenderDataDrawingContext) so callers pass content bounds to PushEffect and the API handles inflation internally. Remove pre-inflation from ImmediateRenderer. - Fix DrawingGroup.DrawCore to pass effectBounds (inflated) to PushOpacityMask when an Effect is set, so the opacity mask covers the full effect output region (e.g. shadow/blur extending beyond visual bounds). - Fix DrawingGroup.GetBounds to inflate EffectBounds (which now stores content bounds) by the effect output padding. - Fix existing compile error: Rect.IsEmpty() is a method, not property. - Add failing tests for each of the above before fixing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix DrawingGroup.GetBounds() incorrectly inflating bounds with effect output padding GetBounds() should return content/geometric bounds only, matching WPF behavior. Inflating by GetEffectOutputPadding() caused DrawingImage to shift its coordinate origin by the effect's extent (e.g. a 3.5px shadow offset would displace all content by 3.5px), breaking Should_Render_DrawingGroup_With_Effect render test. Effects render additively outside the content area and must not affect the coordinate system established by GetBounds(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Julien Lebosquain <julien@lebosquain.net> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
4 months ago |
|
|
680fab0124
|
Fix DrawerPage double footer in compact mode (#21004)
|
6 months ago |
|
|
d30779c5a6
|
Rename PipsPager button theme APIs (#20954)
* Rename PipsPager button theme * Updated PipsPager render tests * Updated tests * Updated Avalonia.nupkg.xml |
6 months ago |
|
|
af0f61a02b
|
[Feature] Expand Page-type navigation: CarouselPage (#20871)
* Added CarouselPage * Renamed DrawerBreakpointWidth to DrawerBreakpointLength * More unit tests * More tests * Improve Carousel gestures * Make SelectionChanged a RoutedEvent * Change TabbedPage IsGestureEnabled to true for consistency * Allow to clear CurrentPage * Reuse Tab Icon Path (perf) * Avoid duplicated ResolvePageAtIndex * More tests * A new showcase * Improve CarouselPage Transitions sample * More changes * Expose IsNavigating * A11y improvements * Updated showcase samples * More changes * Fix vertical carousel page gestures * More tests * More changes in showcases * More changes * Refactor SwipeGestureRecognizer * More changes * More changes * Added new CommandBar Events sample * Avoid duplicated subscriptions in CommandBar * Avoid invalid SelectedIndex values * Avoid duplicated subscription * Fix SwipeGestureRecognizer non needed allocation * Added Easing to stack and modal navigation default transitions * Preserve NavigationPage modal stack across visual tree detach/reattach * More fixes and tests * More changes * Simplify icon logic * More fixes, samples and tests * Fixed tests * Changes based on feedback * Updated test * Fixed tests * Update API suppressions --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
6 months ago |
|
|
4e1b90b061
|
[Feature] Add gestures and WrapSelection (loops) support to Carousel (#20659)
* Format Carousel sample UI * Added WrapSelection property support * Implement gestures * Update sample adding custom page transitions * More changes * Added swipe velocity * Optimize completion timer * Verify gesture id * Improve CrossFade animation * Fix in swipe gesture getting direction * More changes * Fix mistake * More protections * Remove redundant ItemCount > 0 checks in OnKeyDown * Renamed GestureId to Id in SwipeGestureEventArgs * Remove size parameter from PageTransition Update method * Changes based on feedback * Update VirtualizingCarouselPanel.cs * Refactor and complete swipe gesture (added more tests) * Updated Avalonia.nupkg.xml * Changes based on feedback * Polish carousel snap-back animation * Implement ViewportFractionProperty * Fixed test * Fix FillMode in Rotate3DTransition * Updated comment * Added vertical swipe tests * More changes * Fix interrupted carousel transition lifecycle |
6 months ago |
|
|
9a21a48aa4
|
[Feature] Add PipsPager Control (#20660)
* Added PipsPager control * Added tests * Added render tests * Added samples * More improvements * More tests * Added more samples * Fix formatting * Updated Automation * Small optimization * More changes * Changes based on feedback * Fix build errors * More changes * Updated samples * Fixes * More changes * Fix build * More changes * More changes * More tests * More constants |
6 months ago |
|
|
7bc087c658
|
[Feature] Page-based navigation system (#20794)
* Added CommandBar * Added ContentPage * Added NavigationPage * Added TabbedPage * Added DrawerPage * More showcases * More tests * Added Connected Animations * More samples * More fixes * More fixes * Updated samples * More fixes * Fix build errors * More fixes * More changes * More changes * More fixes * Added benchmarks * Updated SwipeGestureRecognizer * Fixes based on PR feedback * More fixes * Removed Appearing/Disappearing events * Fix merge issue * More changes * Fix build * Remove TabbedPage brush properties * New showcase sample * More changes * Moved navigation brushes properties to resources * Fix default connected animation duration fallback * CommandBar returns empty list with null * Ignore AVP1030 on PrimaryCommands/SecondaryCommands for now * Updated samples * More changes and tests * Updated samples * Updated render tests * Updated tests * Added Page AutomationPeers --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
7 months ago |
|
|
f9c1570ac6
|
Fixed incorrect opacity stack handling (#20730)
|
7 months ago |
|
|
30b451da52
|
Fix Border clip regression (#20648)
|
7 months ago |
|
|
697cba7193
|
Composition system SP1 (#20497)
* baseline benchmark * Composition system SP1 * Allow reusing the same BitmapCache object for multiple visuals * Fix warnings * Address review * API suppressions --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
7 months ago |
|
|
424863d5ff
|
Add PlaceholderForeground property to TextBox, AutoCompleteBox, CalendarDatePicker, NumericUpDown (#20303)
* Added WatermarkForeground property * Added samples * Added unit tests * Added render tests * Fix merge issues * Updated render tests * Standardize watermark foreground naming * Pending changes * More changes * Use UseFloatingPlaceholder * Fix tests |
7 months ago |
|
|
1bce702bd4
|
Introduce TextOptions (#20107)
* Introduce TextOptions API * Store BaselinePixelAlignment as byte. Move to a dedicated file. * Update API suppressions --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
8 months ago |
|
|
8215194f32
|
Reset cached transform on PopEffect (#20474)
|
8 months ago |
|
|
71ce62ae32
|
Remove legacy Diagnostics project (#20332)
* Remove legacy Diagnostics project * Remove DataGrid submodule |
8 months ago |
|
|
f1703dd784
|
Add `DrawingImage.Viewbox` (#18913)
* Added DrawingImage.Frame: a rectangular region of `Drawing`, in device independent pixels, to display when rendering the image * Renamed Frame to Viewbox Added test |
8 months ago |
|
|
ee748802b3
|
Enable nullability in various test projects (#20374)
* 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 |
9 months ago |
|
|
a7f09f4315
|
Delete Direct2D1 test files (#20333)
|
9 months ago |
|
|
b66f5ada75
|
[Feature] Add FillRule property for Polyline/Polygon (#20159)
* 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> |
9 months ago |
|
|
c7bc7e92a5
|
Enable antialiasing based on EdgeMode in DrawBitmap (#20116)
* Enable antialiasing based on EdgeMode in DrawBitmap
* Update expected image for ImageBrush Tile UniformToFill test
* Add tests for rotated image with EdgeMode options
* Add expected images for Direct2D1 image rotation tests
* Revert "Add expected images for Direct2D1 image rotation tests"
This reverts commit
|
10 months ago |
|
|
246cbfc566
|
Remove Direct2D1 (#20132)
|
10 months ago |
|
|
40a3af4aa5
|
Remove netstandard2.0 from almost all projects (#20111)
* Remove netstandard2.0 from almost all projects * Fix duplicated target frameworks in unit tests * Fix DesignerSupport tests * Fix Designer.HostApp packaging * Build ControlCatalog.Desktop on CI * Fix another bad auto merge * Fix LeakTests duplicated target frameworks * Don't hardcode target framework in DesignerSupportTests |
10 months ago |
|
|
9ee57c5616
|
Fix BitmapInterpolationMode.HighQuality when downscaling (#19513)
* Fix BitmapInterpolationMode.HighQuality when downscaling * Fix SkiaSharpExtensions.ToSKSamplingOptions public API change |
1 year ago |
|
|
46d4735868
|
Fix issue with OverhangLeading (#18438)
* 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> |
1 year ago |
|
|
9441362dcc
|
Add missing Blend Modes and expose BlendMode on Image Control (#17903)
* Add missing Bitmap Blend Modes supported by Skia * Expose Blend Mode on Image Control * Fix image render options "push" not being disposed Fix image blendMode change not triggering a re-render * Add Image Blend Tests * Remove Modulate Blend mode * Add Composition Blend Modes Tests --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
2 years ago |
|
|
d3b61cd75e
|
[Skia] Fix RadialGradientBrush for non center origin (#17925)
* 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 |
2 years ago |
|
|
19394e062b
|
Skia - Add a unit test for the dash array calculation (#18001)
|
2 years ago |
|
|
d411bd2156
|
Fix TextBlock TextAlignment issues when a HorizontalAlignment is defined (#17402)
* 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 |
2 years ago |
|
|
04e76a9265
|
Make our TileBrush code a bit less byzantine (#17098)
* Use scalable rasterization for visual brush * Make ConfigureSceneBrushContentWithPicture less byzantine --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
2 years ago |
|
|
2299d96f98
|
Enable VisualBrush to be used as Visual's OpacityMask (#17072)
* Enable VisualBrush to be used as Visual's OpacityMask * Add missing test file --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
2 years ago |
|
|
7da58ba205
|
Fix transform desync (#16363)
* 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 |
2 years ago |
|
|
6e35fd2bbe
|
feat(Geometries): PolyBezierSegment (#16664)
* feat(Geometries): PolyBezierSegment * fix: warning * add PolyBezierSegment to CrossUI Test * test: AddPolyBezierSegment CrossUI test |
2 years ago |
|
|
e55dfcd1a2
|
Fixes ShapedTextRun background rendering (#16594)
* Add failing test * Fix ShapedTextRun background rendering |
2 years ago |
|
|
e8c3bf593f
|
Fix tile mode used in SkShader for a TileBrush with None TileMode (#16021)
* add cross test for tile brush with None tile mode * use Decal skshader tile mode for tile brush tilemode None |
2 years ago |
|
|
eb4f575aa8
|
Fix some issues with strokeless geometry segments (#16019)
* 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> |
2 years ago |
|
|
861c0e4c42
|
Apply Alignments to TileBrushes with uniform stretch (#15846)
* add tiled brush alignment cross tests * apply Alignments to TileBrushes with uniform stretch |
2 years ago |
|
|
0aaa59165d
|
Add isStroked overload for IGeometryContext (#15430)
* 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> |
2 years ago |
|
|
544d5372e3
|
Fix TileBrush Source/DestinationRect handling (#15289)
* Fix TileBrush Source/DestinationRect handling * Add unit test * Add cross render tests * Add missing test image |
2 years ago |
|
|
23b3a767dc
|
Rework tile brush calculation (#15157)
|
2 years ago |
|
|
ba7405aead
|
Initial support for cross-testing against WPF (#15150)
* Initial support for cross-testing against WPF * More cross-tests |
3 years ago |
|
|
4f8f46cb5d
|
Fix TransformOrigin for brushes (#15037)
|
3 years ago |
|
|
6eb9d7a17e
|
Fixes/drawing brush transform (#14978)
* Apply brush transform to SKPicture instead to the local matrix of the resulting SKShader * Add unit test Implement Direct2D1 |
3 years ago |
|
|
086fe5267f
|
Don't create a layer if the previous frame is retained by the render target (#14924)
* 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 |
3 years ago |
|
|
326ef7c9fd
|
Add .NET 8 target (Avalonia 11.1) (#14535)
* Add .NET 8 target to packable projects * Update test projects * Update sample projects to target .NET 8 * Update main Avalonia package to target .NET 8 as well * Remove MSBuildEnableWorkloadResolver hack and some minor change * Use net8.0 in nuke build as well * Pin 8.0.0 SDK * Adjust API validation * Pin a valid version * Remove net461 target from Avalonia package * Remove unused net6.0 target from Avalonia.Designer.HostApp * Adjust API diff * Update ControlCatalog.Android.csproj * Remove MSBuildEnableWorkloadResolver * Fix Browser issues on .NET 8 * Fix .NET 8 error * Fix merge conflicts * Replace explicit TFMs in .csproj files with a centralized registry * Fix merge conflict * Fix AvsLegacyWindowsTargetFrameworks and add hacks for the tests * Update XCode project CommandLineArgument --------- Co-authored-by: Nikita Tsukanov <keks9n@gmail.com> |
3 years ago |
|
|
8329efddd3
|
Fixes relative brush mapping mode (#14598)
* 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> |
3 years ago |
|
|
b94b011c94
|
[WIP]Fix overhang leading calculation for negative values (#13672)
* [macOS] Fix overhand leading calculation * Adjust TextLineMetrics * Update expected result |
3 years ago |
|
|
520d9d631a
|
Properly handle overhang with RTL FlowDirection (#13631)
|
3 years ago |