/// <summary>Transforms all the verts by the given delta matrix. Used during a Paint only.</summary> public virtual void ApplyTransform(Matrix4x4 delta, Renderman renderer) { // Get the first block: MeshBlock block = GetFirstBlock(renderer); for (int i = 0; i < BlockCount; i++) { // Transform the verts: block.TransformVertices(delta); // Seek to the next one: block.Next(); } }
public override void Paint(LayoutBox box, Renderman renderer) { Color colour = Colour * renderer.ColorOverlay; MeshBlock block = GetFirstBlock(renderer); // For each block.. for (int i = 0; i < BlockCount; i++) { // Paint the colour: block.PaintColour(colour); // Go to next block: block.Next(); } }
public override void Paint(LayoutBox box, Renderman renderer) { // Any meshes in this elements queue should now change colour: Color colour = renderer.ColorOverlay; MeshBlock block = GetFirstBlock(renderer); // For each block.. for (int i = 0; i < BlockCount; i++) { // Paint the colour: block.PaintColour(colour); // Go to next block: block.Next(); } }
public override void Paint(LayoutBox box, Renderman renderer) { // Any meshes in my queue should now change colour: MeshBlock block = GetFirstBlock(renderer); if (BaseColour == null || BaseColour.Count == 1) { // Most common case. This is a single colour border. // Get the default colour - that's the same as the text colour: Color colour = Color.black; // Does this border have a colour? if (BaseColour == null) { // Grab the text colour if there is one: if (RenderData.Text != null) { // It's the same as the font colour: colour = RenderData.Text.BaseColour * renderer.ColorOverlay; } else { // Nope - We need to set alpha: colour.a = renderer.ColorOverlay.a; } } else { colour = BaseColour[0].GetColour(RenderData, Css.Properties.BorderColor.GlobalProperty) * renderer.ColorOverlay; } // For each block.. for (int i = 0; i < BlockCount; i++) { // Paint the colour: block.PaintColour(colour); // Go to next block: block.Next(); } return; } }
public override void Paint(LayoutBox box, Renderman renderer) { // Resolve colour: BaseColour = RenderData.computedStyle.Resolve(Css.Properties.ColorProperty.GlobalProperty) .GetColour(RenderData, Css.Properties.ColorProperty.GlobalProperty); Color colour = BaseColour * renderer.ColorOverlay; MeshBlock block = GetFirstBlock(renderer); // For each block.. for (int i = 0; i < BlockCount; i++) { // Paint the colour: block.PaintColour(colour); // Go to next block: block.Next(); } }