internal void PaintBackgroundAndBorder(PaintVisitor p)
 {
     //iterate each strip
     //if (_bottomUpBoxStrips == null)
     //{
     //    return;
     //}
     for (int i = _bottomUpBoxStrips.Length - 1; i >= 0; --i)
     {
         PartialBoxStrip strip      = _bottomUpBoxStrips[i];
         CssBox          stripOwner = strip.owner;
         if (!stripOwner.HasVisibleBgColor)
         {
             continue;
         }
         //-----------------------------------------------------------------
         RectangleF stripArea = strip.Bound;
         bool       isFirstLine, isLastLine;
         CssBox.GetSplitInfo(stripOwner, this, out isFirstLine, out isLastLine);
         stripOwner.PaintBackground(p, stripArea, isFirstLine, isLastLine);
         //if (stripOwner.CssDisplay != Css.CssDisplay.TableCell
         //    && stripOwner.HasSomeVisibleBorder)
         //{
         //    p.PaintBorders(stripOwner, stripArea, isFirstLine, isLastLine);
         //}
     }
 }
Beispiel #2
0
 internal void PaintDecoration(PaintVisitor p)
 {
     for (int i = _bottomUpBoxStrips.Length - 1; i >= 0; --i)
     {
         PartialBoxStrip strip    = _bottomUpBoxStrips[i];
         CssBox          ownerBox = strip.owner;
         CssBox.GetSplitInfo(ownerBox, this, out bool isFirstLine, out bool isLastLine);
         ownerBox.PaintDecoration(p.InnerDrawBoard, strip.Bounds, isFirstLine, isLastLine);
     }
 }
Beispiel #3
0
 internal void PaintDecoration(PaintVisitor p)
 {
     //if (_bottomUpBoxStrips == null)
     //{
     //    return;
     //}
     for (int i = _bottomUpBoxStrips.Length - 1; i >= 0; --i)
     {
         PartialBoxStrip strip = _bottomUpBoxStrips[i];
         CssBox          ownerBox = strip.owner;
         bool            isFirstLine, isLastLine;
         CssBox.GetSplitInfo(ownerBox, this, out isFirstLine, out isLastLine);
         ownerBox.PaintDecoration(p.InnerCanvas, strip.Bound, isFirstLine, isLastLine);
     }
 }
Beispiel #4
0
 static void RegisterStripPart(CssBox runOwner,
                               float left, float top, float right, float bottom,
                               List <PartialBoxStrip> newStrips, Dictionary <CssBox, PartialBoxStrip> dic)
 {
     if (!dic.TryGetValue(runOwner, out PartialBoxStrip strip))
     {
         strip = new PartialBoxStrip(runOwner, left, top, right - left, bottom - top);
         dic.Add(runOwner, strip);
         newStrips.Add(strip);
     }
     else
     {
         strip.MergeBound(left, top, right, bottom);
     }
 }
        static int StepUpRegisterStrips(Dictionary <CssBox, PartialBoxStrip> dicStrips,
                                        CssBox lineOwnerBox,
                                        List <PartialBoxStrip> inputList, int startInputAt)
        {
            int j = inputList.Count;

            for (int i = startInputAt; i < j; ++i)
            {
                //step up
                PartialBoxStrip strip    = inputList[i];
                CssBox          upperBox = strip.owner.ParentBox;
                if (upperBox != null && upperBox != lineOwnerBox && upperBox.OutsideDisplayIsInline)
                {
                    RegisterStripPart(upperBox, strip.Left, strip.Top, strip.Right, strip.Bottom, inputList, dicStrips);
                }
            }
            return(inputList.Count - j);
        }
Beispiel #6
0
 static void RegisterStripPart(CssBox runOwner,
     float left, float top, float right, float bottom,
     List<PartialBoxStrip> newStrips, Dictionary<CssBox, PartialBoxStrip> dic)
 {
     PartialBoxStrip strip;
     if (!dic.TryGetValue(runOwner, out strip))
     {
         strip = new PartialBoxStrip(runOwner, left, top, right - left, bottom - top);
         dic.Add(runOwner, strip);
         newStrips.Add(strip);
     }
     else
     {
         strip.MergeBound(left, top, right, bottom);
     }
 }