public BoxStyle(Rdl.Engine.Style style, Rdl.Runtime.Context context) { if (style == null) { style = Rdl.Engine.Style.DefaultStyle; } BorderColor = new BorderColor(style.BorderColor, context); BorderStyle = new BorderStyle(style.BorderStyle, context); BorderWidth = new BorderWidth(style.BorderWidth, context); BackgroundColor = style.BackgroundColor(context); BackgroundGradientType = style.BackgroundGradientType(context); BackgroundGradientEndColor = style.BackgroundGradientEndColor(context); Color = style.Color(context); PaddingLeft = style.PaddingLeft(context); PaddingRight = style.PaddingRight(context); PaddingTop = style.PaddingTop(context); PaddingBottom = style.PaddingBottom(context); Rdl.Engine.BackgroundImage bi = style.BackgroundImage; if (bi != null) { BackgroundImage = new ImageData(); BackgroundImage.imageData = bi.GetImage(context); BackgroundImage.Sizing = bi.Sizing; BackgroundImage.ImageRepeat = bi.ImageRepeat(context); } }
public override bool Equals(object obj) { if (!(obj is BorderWidth)) { return(false); } BorderWidth b = obj as BorderWidth; return(Left.Equals(b.Left) && Right.Equals(b.Right) && Top.Equals(b.Top) && Bottom.Equals(b.Bottom)); }