Browse Source

Fix more zero size checks using Rect

pull/10678/head
robloo 4 years ago
parent
commit
6e31cb7524
  1. 4
      src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs

4
src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual.cs

@ -149,7 +149,7 @@ namespace Avalonia.Rendering.Composition.Server
if (ownBounds != _oldOwnContentBounds || positionChanged) if (ownBounds != _oldOwnContentBounds || positionChanged)
{ {
_oldOwnContentBounds = ownBounds; _oldOwnContentBounds = ownBounds;
if (ownBounds == default) if (ownBounds.Width == 0 && ownBounds.Height == 0)
TransformedOwnContentBounds = default; TransformedOwnContentBounds = default;
else else
TransformedOwnContentBounds = TransformedOwnContentBounds =
@ -179,7 +179,7 @@ namespace Avalonia.Rendering.Composition.Server
IsHitTestVisibleInFrame = _parent?.IsHitTestVisibleInFrame != false IsHitTestVisibleInFrame = _parent?.IsHitTestVisibleInFrame != false
&& Visible && Visible
&& !_isBackface && !_isBackface
&& _combinedTransformedClipBounds != default; && (_combinedTransformedClipBounds.Width != 0 || _combinedTransformedClipBounds.Height != 0);
IsVisibleInFrame = IsHitTestVisibleInFrame IsVisibleInFrame = IsHitTestVisibleInFrame
&& _parent?.IsVisibleInFrame != false && _parent?.IsVisibleInFrame != false

Loading…
Cancel
Save