chromium/printing/page_setup.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "printing/page_setup.h"

#include <algorithm>
#include <tuple>

#include "base/check_op.h"

namespace printing {

namespace {

// Checks whether `printable_area` can be used to form a valid symmetrical
// printable area, so that margin_left equals margin_right, and margin_top
// equals margin_bottom.  For example if
// printable_area.x() * 2 >= page_size.width(), then the
// content_width = page_size.width() - 2 * printable_area.x() would be zero or
// negative, which is invalid.
// `page_size` is the physical page size that includes margins.
bool IsValidPrintableArea(const gfx::Size& page_size,
                          const gfx::Rect& printable_area) {}

}  // namespace

PageMargins::PageMargins()
    :{}

PageMargins::PageMargins(int header,
                         int footer,
                         int left,
                         int right,
                         int top,
                         int bottom)
    :{}

bool PageMargins::operator==(const PageMargins& other) const {}

void PageMargins::Clear() {}

PageSetup::PageSetup() {}

PageSetup::PageSetup(const gfx::Size& physical_size,
                     const gfx::Rect& printable_area,
                     const PageMargins& requested_margins,
                     bool forced_margins,
                     int text_height)
    :{}

PageSetup::PageSetup(const PageSetup& other) = default;

PageSetup::~PageSetup() = default;

bool PageSetup::operator==(const PageSetup& other) const {}

// static
gfx::Rect PageSetup::GetSymmetricalPrintableArea(
    const gfx::Size& page_size,
    const gfx::Rect& printable_area) {}

void PageSetup::Clear() {}

void PageSetup::Init(const gfx::Size& physical_size,
                     const gfx::Rect& printable_area,
                     int text_height) {}

void PageSetup::SetRequestedMargins(const PageMargins& requested_margins) {}

void PageSetup::ForceRequestedMargins(const PageMargins& requested_margins) {}

void PageSetup::FlipOrientation() {}

void PageSetup::SetRequestedMarginsAndCalculateSizes(
    const PageMargins& requested_margins) {}

void PageSetup::CalculateSizesWithinRect(const gfx::Rect& bounds,
                                         int text_height) {}

}  // namespace printing