mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 23:48:31 -04:00
dad36d2e42
fix config panel value change detection add loiter_ to AC config screen Add praram name to Friendly param, and exception ignoring. fix param file note line intergrate andrews gimbal config. fix any possible log appending issues remove old cli planner on connect modify speech to not crash on windows mono
24 lines
676 B
C#
24 lines
676 B
C#
using System;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ArdupilotMega.Controls
|
|
{
|
|
internal static class PseudoOpacityHelper
|
|
{
|
|
public static void CoverWithRect(this Control c, Graphics g, float opacity)
|
|
{
|
|
var bgcolor = c.BackColor;
|
|
int alpha = 255 - ((int)(opacity * 255));
|
|
|
|
Console.WriteLine("Alpha:" + alpha);
|
|
|
|
|
|
var opacityColor = Color.FromArgb(alpha, bgcolor.R, bgcolor.G, bgcolor.B);
|
|
using (var brush = new SolidBrush(opacityColor))
|
|
{
|
|
g.FillRectangle(brush, 0, 0, c.Width, c.Height);
|
|
}
|
|
}
|
|
}
|
|
} |