1
#region PDFsharp - A .NET library for processing PDF
4
// Stefan Lange (mailto:Stefan.Lange@pdfsharp.com)
6
// Copyright (c) 2005-2008 empira Software GmbH, Cologne (Germany)
8
// http://www.pdfsharp.com
9
// http://sourceforge.net/projects/pdfsharp
11
// Permission is hereby granted, free of charge, to any person obtaining a
12
// copy of this software and associated documentation files (the "Software"),
13
// to deal in the Software without restriction, including without limitation
14
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
15
// and/or sell copies of the Software, and to permit persons to whom the
16
// Software is furnished to do so, subject to the following conditions:
18
// The above copyright notice and this permission notice shall be included
19
// in all copies or substantial portions of the Software.
21
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27
// DEALINGS IN THE SOFTWARE.
31
using System.Diagnostics;
32
using System.Collections;
34
using PdfSharp.Drawing;
36
namespace PdfSharp.Pdf
39
/// Represents trim margins added to the page.
41
[DebuggerDisplay("(Left={left.Millimeter}mm, Right={right.Millimeter}mm, Top={top.Millimeter}mm, Bottom={bottom.Millimeter}mm)")]
42
public sealed class TrimMargins
45
///// Clones this instance.
47
//public TrimMargins Clone()
49
// TrimMargins trimMargins = new TrimMargins();
50
// trimMargins.left = this.left;
51
// trimMargins.top = this.top;
52
// trimMargins.right = this.right;
53
// trimMargins.bottom = this.bottom;
54
// return trimMargins;
58
/// Sets all four crop margins simultaneously.
72
/// Gets or sets the left crop margin.
76
get { return this.left; }
77
set { this.left = value; }
82
/// Gets or sets the right crop margin.
86
get { return this.right; }
87
set { this.right = value; }
92
/// Gets or sets the top crop margin.
96
get { return this.top; }
97
set { this.top = value; }
102
/// Gets or sets the bottom crop margin.
106
get { return this.bottom; }
107
set { this.bottom = value; }
112
/// Gets a value indicating whether this instance has at least one margin with a value other than zero.
116
get { return this.left.Value != 0 || this.right.Value != 0 || this.top.Value != 0 || this.bottom.Value != 0; }
b'\\ No newline at end of file'