#include "printing/page_setup.h"
#include <algorithm>
#include <tuple>
#include "base/check_op.h"
namespace printing {
namespace {
bool IsValidPrintableArea(const gfx::Size& page_size,
const gfx::Rect& printable_area) { … }
}
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 { … }
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) { … }
}