Pinta.ColorGradientWidget.GetYFromValue C# (CSharp) Method

GetYFromValue() private method

private GetYFromValue ( double val ) : double
val double
return double
        private double GetYFromValue(double val)
        {
            Rectangle rect = GradientRectangle;
            Rectangle all = Allocation.ToCairoRectangle ();

            return all.Y + ypad * all.Height + rect.Height * (255 - val) / 255;
        }