DotNet 4.8.1 build of DotNetBar

This commit is contained in:
jjenko committed 2025-02-07 10:35:23 -05:00
1 parent 33439b63a0
commit 6b0a5d60f4
2609 files changed
+989814 -7

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
using System.Drawing;
using System.Drawing.Drawing2D;
#if TREEGX
namespace DevComponents.Tree
#elif DOTNETBAR
namespace DevComponents.DotNetBar
#endif
{
/// <summary>
/// Summary description for Display.
/// </summary>
internal class Display
{
private Display()
{
}
public static LinearGradientBrush CreateLinearGradientBrush(Rectangle r,Color color1, Color color2,float gradientAngle)
{
if(r.Width<=0)
r.Width=1;
if(r.Height<=0)
r.Height=1;
return new LinearGradientBrush(new Rectangle(r.X,r.Y-1,r.Width,r.Height+1),color1,color2,gradientAngle);
}
public static LinearGradientBrush CreateLinearGradientBrush(RectangleF r,Color color1, Color color2,float gradientAngle)
{
if(r.Width<=0)
r.Width=1;
if(r.Height<=0)
r.Height=1;
return new LinearGradientBrush(new RectangleF(r.X,r.Y-1,r.Width,r.Height+1),color1,color2,gradientAngle);
}
public static LinearGradientBrush CreateLinearGradientBrush(Rectangle r,Color color1, Color color2,float gradientAngle, bool isAngleScalable)
{
if(r.Width<=0)
r.Width=1;
if(r.Height<=0)
r.Height=1;
return new LinearGradientBrush(new Rectangle(r.X,r.Y-1,r.Width,r.Height+1),color1,color2,gradientAngle,isAngleScalable);
}
public static Rectangle GetDrawRectangle(Rectangle r)
{
r.Width--;
r.Height--;
return r;
}
public static Rectangle GetPathRectangle(Rectangle r)
{
//r.Width++;
//r.Height++;
return r;
}
}
}