Ejemplo n.º 1
0
bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const
{
    const RasterShapeIntervals& intervals = paddingIntervals();
    if (intervals.isEmpty())
        return false;

    return intervals.firstIncludedIntervalY(minLogicalIntervalTop.floor(), flooredIntSize(minLogicalIntervalSize), result);
}
Ejemplo n.º 2
0
void RasterShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
{
    const RasterShapeIntervals& intervals = paddingIntervals();
    if (intervals.isEmpty())
        return;

    IntShapeIntervals includedIntervals;
    intervals.getIncludedIntervals(logicalTop, logicalTop + logicalHeight, includedIntervals);
    appendLineSegments(includedIntervals, result);
}
Ejemplo n.º 3
0
void RasterShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
{
    const RasterShapeIntervals& intervals = paddingIntervals();
    if (intervals.isEmpty())
        return;

    float y1 = logicalTop;
    float y2 = logicalTop + logicalHeight;

    if (y1 < intervals.bounds().y() || y2 > intervals.bounds().maxY())
        return;

    intervals.getIncludedIntervals(y1, y2, result);
}
Ejemplo n.º 4
0
bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const
{
    float minIntervalTop = minLogicalIntervalTop;
    float minIntervalHeight = minLogicalIntervalSize.height();
    float minIntervalWidth = minLogicalIntervalSize.width();

    const RasterShapeIntervals& intervals = paddingIntervals();
    if (intervals.isEmpty() || minIntervalWidth > intervals.bounds().width())
        return false;

    float minY = std::max<float>(intervals.bounds().y(), minIntervalTop);
    float maxY = minY + minIntervalHeight;
    if (maxY > intervals.bounds().maxY())
        return false;

    return intervals.firstIncludedIntervalY(minY, flooredIntSize(minLogicalIntervalSize), result);
}