public static CSSCalcValue AsCalc(this CSSValue value) { if (value is CSSPrimitiveValue <Percent> ) { return(CSSCalcValue.FromPercent(((CSSPrimitiveValue <Percent>)value).Value)); } else if (value is CSSPrimitiveValue <Length> ) { return(CSSCalcValue.FromLength(((CSSPrimitiveValue <Length>)value).Value)); } else if (value is CSSCalcValue) { return((CSSCalcValue)value); } else if (value is CSSPrimitiveValue <Number> && ((CSSPrimitiveValue <Number>)value).Value == Number.Zero) { return(CSSCalcValue.Zero); } return(null); }
public GradientStop(Color color, CSSCalcValue location) { _color = color; _location = location; }
public static CSSImageValue FromRadialGradient(CSSCalcValue x, CSSCalcValue y, CSSCalcValue width, CSSCalcValue height, Boolean repeating, params GradientStop[] stops) { return(new RadialLinearGradient(x, y, width, height, stops, repeating)); }
public CalcVerticalAlignMode(CSSCalcValue calc) { _calc = calc; }
public RadialLinearGradient(CSSCalcValue x, CSSCalcValue y, CSSCalcValue width, CSSCalcValue height, GradientStop[] stops, Boolean repeating) { _stops = stops; _x = x; _y = y; _width = width; _height = height; _repeating = repeating; }
public Translate(CSSCalcValue x, CSSCalcValue y) { _x = x; _y = y; }
public TranslateX(CSSCalcValue x) { _x = x; }
public Translate3D(CSSCalcValue x, CSSCalcValue y, CSSCalcValue z) { _x = x; _y = y; _z = z; }
public TranslateZ(CSSCalcValue z) { _z = z; }
public TranslateY(CSSCalcValue y) { _y = y; }
public CSSCalcValue Add(CSSCalcValue shift) { return(new ComputeAdd(this, shift)); }
public ComputeAdd(CSSCalcValue origin, CSSCalcValue shift) { _origin = origin; _shift = shift; }