Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular Polygon feature #32

Merged
merged 24 commits into from Aug 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
95dd4a7
Handles iOS
shanranm Aug 8, 2019
2874183
Handles Android
shanranm Aug 9, 2019
d09a4d2
Adds Polygon sample page
shanranm Aug 9, 2019
f598cdc
Redrawing shadow on Android
shanranm Aug 9, 2019
cda29e8
Validates Sides and OffsetAngle
shanranm Aug 9, 2019
74ffff9
Added debug page new style
sthewissen Aug 9, 2019
97e3785
Merge branch 'polygon' of https://github.com/shanranm/Xamarin.Forms.P…
sthewissen Aug 9, 2019
3ad50bc
New imagery and added irregular corner option to debug page
sthewissen Aug 9, 2019
db7d1b4
Fix for OffsetAngle in debug page
sthewissen Aug 9, 2019
c71cf98
Fix for border being drawn multiple times
sthewissen Aug 9, 2019
89ceb8e
Fixed Android for removal of IsRegular
sthewissen Aug 9, 2019
43faebe
More IsRegular removal
sthewissen Aug 9, 2019
25ef8d5
Moving shape creation to ShapeUtils + rendering fixes
sthewissen Aug 9, 2019
845c90e
Merge branch 'master' into polygon
sthewissen Aug 9, 2019
ecf1ca3
Fixed merge conflict
sthewissen Aug 9, 2019
defecdf
Fix for SubLayers not having to be null
sthewissen Aug 10, 2019
594d22c
Fixed pretty much all of the iOS bits
sthewissen Aug 10, 2019
399da2f
Fixes gradient border
shanranm Aug 10, 2019
cef4d51
Fixes border on android
shanranm Aug 10, 2019
00cff02
Fixes Android Border + Clipping issue
shanranm Aug 11, 2019
03a4870
Draws different drawable for background change - fixes android weird …
shanranm Aug 11, 2019
f939bb4
Removes property change eventhandler
shanranm Aug 11, 2019
ff2c227
Don't try to draw borders then there is none
sthewissen Aug 12, 2019
db410fe
Fix for debugpage styling
sthewissen Aug 12, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Fixes gradient border

  • Loading branch information...
shanranm committed Aug 10, 2019
commit 399da2f86ce1bc2ba8c1ec9bb9f72eb560244e8b
@@ -273,18 +273,17 @@ private void DrawBorder()

if ((pancake.BorderGradientStartColor != default(Color) && pancake.BorderGradientEndColor != default(Color)) || (pancake.BorderGradientStops != null && pancake.BorderGradientStops.Any()))
{
var gradientFrame = borderLayer.Frame.Inset(-(pancake.BorderThickness / 2), -(pancake.BorderThickness / 2));
var gradientFrame = Bounds.Inset(-pancake.BorderThickness, -pancake.BorderThickness);
var gradientLayer = CreateGradientLayer(pancake.BorderGradientAngle, gradientFrame);
gradientLayer.Position = layerPosition;
gradientLayer.Position = new CGPoint((gradientFrame.Width / 2) - (pancake.BorderThickness), (gradientFrame.Height / 2) - (pancake.BorderThickness));

// Create a clone from the border layer and use that one as the mask.
// Why? Because the mask and the border somehow can't be the same, so
// don't want to do adjustments to borderLayer because it would influence the border.
var maskLayer = new CAShapeLayer()
{
Frame = borderLayer.Frame.Inset(pancake.BorderThickness / 2, pancake.BorderThickness / 2),
Path = borderLayer.Path,
Position = borderLayer.Position,
Position = new CGPoint(pancake.BorderThickness, pancake.BorderThickness),
FillColor = null,
LineWidth = pancake.BorderThickness,
StrokeColor = UIColor.Red.CGColor,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.