Skip to content

Commit 9596650

Browse files
Updated the review suggestions.
1 parent fe28c2e commit 9596650

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

GenZFavouriteSocialMedia/Neumorphism/SfNeumorphismDrawer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,14 @@ public CornerRadius CornerRadius
7171
}
7272

7373
public void Draw(ICanvas canvas, RectF dirtyRect)
74-
{
75-
OnDraw(canvas, dirtyRect);
76-
}
77-
78-
private void OnDraw(ICanvas canvas, RectF dirtyRect)
7974
{
8075
var paddingRect = new RectF() { Left = dirtyRect.Left + (float)Padding.Left, Top = dirtyRect.Top + (float)Padding.Top, Right = dirtyRect.Right - (float)Padding.Right, Bottom = dirtyRect.Bottom - (float)Padding.Bottom };
8176
double cornerRadius = CornerRadius.TopLeft > paddingRect.Width / 2 ? paddingRect.Width / 2 : CornerRadius.TopLeft;
77+
//To create the Background and Shadow effect
8278
canvas.SetShadow(ShadowOffset, ShadowBlur, ShadowColor.WithAlpha(0.5f));
8379
canvas.SetFillPaint(Background, paddingRect);
8480
canvas.FillRoundedRectangle(paddingRect, cornerRadius);
81+
//To create the stroke effect for the content view
8582
var strokeRect = new RectF() { Left = paddingRect.Left - StrokeWidth / 2, Top = paddingRect.Top - StrokeWidth / 2, Right = paddingRect.Right + StrokeWidth / 2, Bottom = paddingRect.Bottom + StrokeWidth / 2 };
8683
canvas.StrokeColor = Stroke.Color;
8784
canvas.StrokeSize = StrokeWidth;

0 commit comments

Comments
 (0)