public StandardMaterialData(IStandardMaterial material) { DiffuseColor = material.DiffuseColor; DiffuseMap = material.DiffuseMap; NormalMap = material.NormalMap; Sampler = material.Sampler; IgnoreLighting = material.IgnoreLighting; NoSpecular = material.NoSpecular; HasTransparency = material.HasTransparency; HighlightEffect = material.HighlightEffect; RtTransparencyMode = material.RtTransparencyMode; }
public static IRichTextBox Label(string text, IntSize2 size, RtParagraphAlignment alignment, Color4 backgroundColor, RtTransparencyMode transparencyMode, string fontFamily, float fontSize, Color4 fontColor, FontDecoration fontDecoration) { var spanStyle = AmFactory.Create <RtSpanStyle>(); spanStyle.Size = fontSize; spanStyle.FontFamily = fontFamily; spanStyle.FontDecoration = fontDecoration; spanStyle.TextColor = fontColor; var span = AmFactory.Create <RtPureSpan>(); span.Text = text; span.Style = spanStyle; var paraStyle = AmFactory.Create <RtParagraphStyle>(); paraStyle.Alignment = alignment; var para = AmFactory.Create <RtParagraph>(); para.Spans.Add(span); para.Style = paraStyle; var textStyle = AmFactory.Create <RtOverallStyle>(); textStyle.BackgroundColor = backgroundColor; textStyle.TransparencyMode = transparencyMode; var richText = AmFactory.Create <RichText>(); richText.Paragraphs.Add(para); richText.Style = textStyle; var textBox = AmFactory.Create <RichTextBox>(); textBox.Size = size; textBox.Text = richText; return(textBox); }