mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Draw shadow even when border is not visible
This commit is contained in:
parent
f4bd3e270f
commit
038575582a
3 changed files with 27 additions and 6 deletions
|
@ -40,10 +40,17 @@ public override void OnDraw(Graphics g)
|
|||
|
||||
protected void DrawEllipse(Graphics g)
|
||||
{
|
||||
if (Shadow && IsBorderVisible)
|
||||
if (Shadow)
|
||||
{
|
||||
if (IsBorderVisible)
|
||||
{
|
||||
DrawEllipse(g, ShadowColor, BorderSize, Color.Transparent, Rectangle.LocationOffset(ShadowOffset));
|
||||
}
|
||||
else if (FillColor.A == 255)
|
||||
{
|
||||
DrawEllipse(g, Color.Transparent, 0, ShadowColor, Rectangle.LocationOffset(ShadowOffset));
|
||||
}
|
||||
}
|
||||
|
||||
DrawEllipse(g, BorderColor, BorderSize, FillColor, Rectangle);
|
||||
}
|
||||
|
|
|
@ -54,10 +54,17 @@ public override void OnDraw(Graphics g)
|
|||
|
||||
protected void DrawRectangle(Graphics g)
|
||||
{
|
||||
if (Shadow && IsBorderVisible)
|
||||
if (Shadow)
|
||||
{
|
||||
if (IsBorderVisible)
|
||||
{
|
||||
DrawRectangle(g, ShadowColor, BorderSize, Color.Transparent, Rectangle.LocationOffset(ShadowOffset), CornerRadius);
|
||||
}
|
||||
else if (FillColor.A == 255)
|
||||
{
|
||||
DrawRectangle(g, Color.Transparent, 0, ShadowColor, Rectangle.LocationOffset(ShadowOffset), CornerRadius);
|
||||
}
|
||||
}
|
||||
|
||||
DrawRectangle(g, BorderColor, BorderSize, FillColor, Rectangle, CornerRadius);
|
||||
}
|
||||
|
|
|
@ -100,10 +100,17 @@ public override void OnDraw(Graphics g)
|
|||
|
||||
protected void DrawSpeechBalloon(Graphics g)
|
||||
{
|
||||
if (Shadow && IsBorderVisible)
|
||||
if (Shadow)
|
||||
{
|
||||
if (IsBorderVisible)
|
||||
{
|
||||
DrawSpeechBalloon(g, ShadowColor, BorderSize, Color.Transparent, Rectangle.LocationOffset(ShadowOffset), TailPosition.Add(ShadowOffset));
|
||||
}
|
||||
else if (FillColor.A == 255)
|
||||
{
|
||||
DrawSpeechBalloon(g, Color.Transparent, 0, ShadowColor, Rectangle.LocationOffset(ShadowOffset), TailPosition.Add(ShadowOffset));
|
||||
}
|
||||
}
|
||||
|
||||
DrawSpeechBalloon(g, BorderColor, BorderSize, FillColor, Rectangle, TailPosition);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue