protected virtual void Reset() { layoutBlock = new CssBoxArea(); layoutPos = new Point2i(); lineHeight = 0; Previous = null; Line = new List <LineBox_Element>(1); Lines = new List <LineBox>(1); }
protected virtual void Add_To_Line(cssElement E, CssBoxArea cArea, Rect2i cSize) { Line.Add(new LineBox_Element(E, new Point2i(layoutPos))); Previous = E; // Now we use the elements CURRENT block size here because if we just used whatever guaranteed value the element can give us then elements with a percentage padding, margin, or size would always overlap their adjacent elements! lineHeight = Math.Max(lineHeight, cSize.Height); // E.Pos.Set_Implicit(layoutPos.X, layoutPos.Y); // Progress our current layout position layoutPos.X += cSize.Width; }