Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="offset">Gradient offset, between 0.0f and 1.0f</param>
 /// <param name="color"><see cref="SciterColor"/> value</param>
 /// <returns></returns>
 public static SciterColorStop Create(float offset, SciterColor color)
 {
     return(new SciterColorStop(offset, color));
 }
Пример #2
0
 public bool Equals(SciterColor other)
 {
     return(Value == other.Value);
 }
Пример #3
0
 internal SciterColorStop(float offset, SciterColor color)
 {
     Offset = offset;
     Color  = color;
 }
Пример #4
0
 internal SciterColorStop(float offset, byte r, byte g, byte b, byte alpha)
 {
     Offset = offset;
     Color  = SciterColor.Create(r: r, g: g, b: b, alpha: alpha);
 }
Пример #5
0
 /// <summary>
 /// Reads the <see cref="SciterValue"/> as a <see cref="SciterColor"/>
 /// </summary>
 /// <param name="sciterValue"></param>
 /// <param name="value">The output value</param>
 /// <returns></returns>
 public static bool TryAsColor(this SciterValue sciterValue, out SciterColor value)
 {
     return(sciterValue.TryAsColorInternal(out value));
 }
 public static bool TrySetFillColor(this SciterGraphics graphics, SciterColor fillColor)
 {
     return(graphics?.TrySetFillColorInternal(fillColor: fillColor) == true);
 }
 public static SciterGraphics SetFillColor(this SciterGraphics graphics, SciterColor fillColor)
 {
     graphics?.SetFillColorInternal(fillColor: fillColor);
     return(graphics);
 }
 public static bool TrySetLineColor(this SciterGraphics graphics, SciterColor lineColor)
 {
     return(graphics?.TrySetLineColorInternal(lineColor: lineColor) == true);
 }
 public static SciterGraphics SetLineColor(this SciterGraphics graphics, SciterColor lineColor)
 {
     graphics?.SetLineColorInternal(lineColor: lineColor);
     return(graphics);
 }