This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Path definition in Core (Shapes) Implemented Path in Android and iOS * Fixed Android build errors * Fixed UWP Build * Fixed WPF Build * Implemented PathRenderer on UWP * Added unit tests * Fixed namespaces conflicts in Platform projects * Changes to fix the build errors * Implemented Path Transformations in Android and iOS * Fixed Build error in WPF and UWP * Implemented Path Transformations in UWP * Fixed iOS Build error * Changes to fix the Build (Path namespace conflict) * More changes to fix the build error * Fixed Windows Build errors * Fixed Path size issue on UWP * Added Shapes_Experimental flag * Updated path sample * Updated Android ShapeRenderer size logic * Added Shape Aspect sample in Core Gallery * Added more Shapes samples * Updated UWP PathRenderer size logic * Updated droid and iOS pathRenderer size logic (same behavior in all the platforms) * Updated UWP ShapeRenderer * Implemented Path in WPF Backend * Fixed build error * Initial Clip implementation in WPF and UWP (work in progress) * Added Path implementation on macOS * Added Clip implementation in Android, iOS and macOS * Fixed broken unit tests * Notify the change of Geometry if any of the child properties changed * Added new sample clipping different views * Fixed flipped shape issue on macOS * Added support to Clip using EllipseGeometry, LineGeometry and RectangleGeometry in UWP * Changed Shape class to be abstract * Moved Shapes to Xamarin.Forms.Shapes in Android, iOS and macOS * Moved Shapes to Xamarin.Forms.Shapes namespace in Windows (UWP and WPF) * Fixed wrong property in LineGeometry * Fixed build error * Added Clip Performance sample in Core Gallery * Update Matrix.cs * Update RectangleGeometry.cs * Update Xamarin.Forms.Platform.macOS.csproj * Some duplicate classes * Update PointCollectionTests.cs * Update ImageButtonRenderer.cs * Update Xamarin.Forms.Platform.iOS.csproj * Update Xamarin.Forms.Platform.iOS.csproj * Fixed tabs error Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com> fixes #2452 (partially) fixes #9178
- Loading branch information
1 parent
2343ee9
commit 9a9f71d
Showing
142 changed files
with
5,712 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
Xamarin.Forms.Controls/GalleryPages/ShapesGalleries/AddRemoveClipGallery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
using System; | ||
using Xamarin.Forms.Shapes; | ||
|
||
namespace Xamarin.Forms.Controls.GalleryPages.ShapesGalleries | ||
{ | ||
public class AddRemoveClipGallery : ContentPage | ||
{ | ||
readonly Image _image; | ||
readonly Grid _grid; | ||
|
||
public AddRemoveClipGallery() | ||
{ | ||
Title = "Add/Remove Clip Gallery"; | ||
|
||
var layout = new StackLayout | ||
{ | ||
Padding = 12 | ||
}; | ||
|
||
var imageInfo = new Label | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
Text = "Image" | ||
}; | ||
|
||
_image = new Image | ||
{ | ||
Aspect = Aspect.AspectFill, | ||
Source = new FileImageSource { File = "crimson.jpg" }, | ||
HorizontalOptions = LayoutOptions.Center, | ||
HeightRequest = 150, | ||
WidthRequest = 150 | ||
}; | ||
|
||
var gridInfo = new Label | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
Text = "Grid" | ||
}; | ||
|
||
_grid = new Grid | ||
{ | ||
BackgroundColor = Color.Red, | ||
HorizontalOptions = LayoutOptions.Center, | ||
HeightRequest = 150, | ||
WidthRequest = 150 | ||
}; | ||
|
||
var buttonLayout = new StackLayout | ||
{ | ||
Orientation = StackOrientation.Horizontal, | ||
HorizontalOptions = LayoutOptions.Center | ||
}; | ||
|
||
var addButton = new Button | ||
{ | ||
Text = "Add EllipseGeometry", | ||
WidthRequest = 150 | ||
}; | ||
|
||
addButton.Clicked += OnAddButtonClicked; | ||
|
||
var removeButton = new Button | ||
{ | ||
Text = "Remove EllipseGeometry", | ||
WidthRequest = 150 | ||
}; | ||
|
||
removeButton.Clicked += OnRemoveButtonClicked; | ||
|
||
buttonLayout.Children.Add(addButton); | ||
buttonLayout.Children.Add(removeButton); | ||
|
||
layout.Children.Add(imageInfo); | ||
layout.Children.Add(_image); | ||
layout.Children.Add(gridInfo); | ||
layout.Children.Add(_grid); | ||
layout.Children.Add(buttonLayout); | ||
|
||
Content = layout; | ||
} | ||
|
||
void OnAddButtonClicked(object sender, EventArgs e) | ||
{ | ||
var ellipseGeometry = new EllipseGeometry | ||
{ | ||
Center = new Point(75, 75), | ||
RadiusX = 60, | ||
RadiusY = 60 | ||
}; | ||
|
||
_image.Clip = _grid.Clip = ellipseGeometry; | ||
} | ||
|
||
void OnRemoveButtonClicked(object sender, EventArgs e) | ||
{ | ||
_image.Clip = _grid.Clip = null; | ||
} | ||
} | ||
} |
Oops, something went wrong.