Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[iOS] If stroke is null avoid render shape stroke #14587

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<local:TestContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Test 14286" xmlns:local="using:Xamarin.Forms.Controls"
x:Class="Xamarin.Forms.Controls.Issues.Issue14286">
<StackLayout>
<Label
Padding="12"
BackgroundColor="Black"
TextColor="White"
Text="If the Ellipse border is empty, the test has passed."/>
<StackLayout
Padding="12">
<Ellipse
HeightRequest="100"
WidthRequest="100"
HorizontalOptions="Center"
Fill="Orange"/>
</StackLayout>
</StackLayout>
</local:TestContentPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Xamarin.Forms.CustomAttributes;
using System.Threading.Tasks;

#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
using Xamarin.Forms.Core.UITests;
#endif

namespace Xamarin.Forms.Controls.Issues
{
[Issue(IssueTracker.Github, 14286,
"[Bug] ShapesAPI-based Circle shape has a border by default in iOS while it doesn't have a border in Android",
PlatformAffected.Android)]
public partial class Issue14286 : TestContentPage
{
public Issue14286()
{
#if APP
InitializeComponent();
#endif
}

protected override void Init()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Issue12590.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue13726.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue11795.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue14286.xaml.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">
Expand Down Expand Up @@ -2211,6 +2212,9 @@
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue11795.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue14286.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla27417Xaml.xaml">
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.iOS/Shapes/ShapeRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ void RenderShape(CGContext graphics)
CATransaction.Begin();
CATransaction.DisableActions = true;

graphics.SetLineWidth(_strokeWidth);
graphics.SetLineWidth(_stroke != null ? _strokeWidth : 0);
graphics.SetLineDash(_dashOffset * _strokeWidth, _strokeDash);
graphics.SetLineCap(_strokeLineCap);
graphics.SetLineJoin(_strokeLineJoin);
Expand Down