Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
358 lines (314 loc) · 10.8 KB

File metadata and controls

358 lines (314 loc) · 10.8 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2017 iText Group NV
Authors: iText Software.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation with the addition of the
following permission added to Section 15 as permitted in Section 7(a):
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
OF THIRD PARTY RIGHTS
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://itextpdf.com/terms-of-use/
The interactive user interfaces in modified source and object code versions
of this program must display Appropriate Legal Notices, as required under
Section 5 of the GNU Affero General Public License.
In accordance with Section 7(b) of the GNU Affero General Public License,
a covered work must retain the producer line in every PDF that is created
or manipulated using iText.
You can be released from the requirements of the license by purchasing
a commercial license. Buying such a license is mandatory as soon as you
develop commercial activities involving the iText software without
disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP,
serving PDFs on the fly in a web application, shipping iText with a closed
source product.
For more information, please contact iText Software Corp. at this
address: sales@itextpdf.com
*/
using System;
using System.Collections;
using System.Text;
using System.util;
using iTextSharp.text.pdf;
using iTextSharp.text.error_messages;
namespace iTextSharp.text {
/// <summary>
/// A RectangleReadOnly is the representation of a geometric figure.
/// It's the same as a Rectangle but immutable.
/// </summary>
/// <seealso cref="T:iTextSharp.text.Element"/>
/// <seealso cref="T:iTextSharp.text.Table"/>
/// <seealso cref="T:iTextSharp.text.Cell"/>
/// <seealso cref="T:iTextSharp.text.HeaderFooter"/>
public class RectangleReadOnly : Rectangle {
// constructors
/// <summary>
/// Constructs a RectangleReadOnly-object.
/// </summary>
/// <param name="llx">lower left x</param>
/// <param name="lly">lower left y</param>
/// <param name="urx">upper right x</param>
/// <param name="ury">upper right y</param>
public RectangleReadOnly(float llx, float lly, float urx, float ury) : base(llx, lly, urx, ury) {
}
/**
* Constructs a <CODE>RectangleReadOnly</CODE> -object.
*
* @param llx lower left x
* @param lly lower left y
* @param urx upper right x
* @param ury upper right y
* @param rotation the rotation of the Rectangle (0, 90, 180, 270)
* @since iText 5.0.6
*/
public RectangleReadOnly(float llx, float lly, float urx, float ury, int rotation) : base(llx, lly, urx, ury) {
base.Rotation = rotation;
}
/// <summary>
/// Constructs a RectangleReadOnly-object starting from the origin (0, 0).
/// </summary>
/// <param name="urx">upper right x</param>
/// <param name="ury">upper right y</param>
public RectangleReadOnly(float urx, float ury) : base(0, 0, urx, ury) {}
/**
* Constructs a <CODE>RectangleReadOnly</CODE>-object starting from the origin
* (0, 0) and with a specific rotation (valid values are 0, 90, 180, 270).
*
* @param urx upper right x
* @param ury upper right y
* @since iText 5.0.6
*/
public RectangleReadOnly(float urx, float ury, int rotation) : base(0, 0, urx, ury) {
base.Rotation = rotation;
}
/// <summary>
/// Constructs a RectangleReadOnly-object.
/// </summary>
/// <param name="rect">another Rectangle</param>
public RectangleReadOnly(Rectangle rect) : base(rect.Left, rect.Bottom, rect.Right, rect.Top) {
base.CloneNonPositionParameters(rect);
}
/**
* Copies all of the parameters from a <CODE>Rectangle</CODE> object
* except the position.
*
* @param rect
* <CODE>Rectangle</CODE> to copy from
*/
public override void CloneNonPositionParameters(Rectangle rect) {
ThrowReadOnlyError();
}
private void ThrowReadOnlyError() {
throw new InvalidOperationException(MessageLocalization.GetComposedMessage("rectanglereadonly.this.rectangle.is.read.only"));
}
/**
* Copies all of the parameters from a <CODE>Rectangle</CODE> object
* except the position.
*
* @param rect
* <CODE>Rectangle</CODE> to copy from
*/
public override void SoftCloneNonPositionParameters(Rectangle rect) {
ThrowReadOnlyError();
}
// methods
/**
* Switches lowerleft with upperright
*/
public override void Normalize() {
ThrowReadOnlyError();
}
// methods to set the membervariables
/// <summary>
/// Get/set the upper right y-coordinate.
/// </summary>
/// <value>a float</value>
public override float Top {
set {
ThrowReadOnlyError();
}
}
/**
* Enables the border on the specified side.
*
* @param side
* the side to enable. One of <CODE>LEFT, RIGHT, TOP, BOTTOM
* </CODE>
*/
public override void EnableBorderSide(int side) {
ThrowReadOnlyError();
}
/**
* Disables the border on the specified side.
*
* @param side
* the side to disable. One of <CODE>LEFT, RIGHT, TOP, BOTTOM
* </CODE>
*/
public override void DisableBorderSide(int side) {
ThrowReadOnlyError();
}
/// <summary>
/// Get/set the border
/// </summary>
/// <value>a int</value>
public override int Border {
set {
ThrowReadOnlyError();
}
}
/// <summary>
/// Get/set the grayscale of the rectangle.
/// </summary>
/// <value>a float</value>
public override float GrayFill {
set {
ThrowReadOnlyError();
}
}
// methods to get the membervariables
/// <summary>
/// Get/set the lower left x-coordinate.
/// </summary>
/// <value>a float</value>
public override float Left {
set {
ThrowReadOnlyError();
}
}
/// <summary>
/// Get/set the upper right x-coordinate.
/// </summary>
/// <value>a float</value>
public override float Right {
set {
ThrowReadOnlyError();
}
}
/// <summary>
/// Get/set the lower left y-coordinate.
/// </summary>
/// <value>a float</value>
public override float Bottom {
set {
ThrowReadOnlyError();
}
}
public override BaseColor BorderColorBottom {
set {
ThrowReadOnlyError();
}
}
public override BaseColor BorderColorTop {
set {
ThrowReadOnlyError();
}
}
public override BaseColor BorderColorLeft {
set {
ThrowReadOnlyError();
}
}
public override BaseColor BorderColorRight {
set {
ThrowReadOnlyError();
}
}
/// <summary>
/// Get/set the borderwidth.
/// </summary>
/// <value>a float</value>
public override float BorderWidth {
set {
ThrowReadOnlyError();
}
}
/**
* Gets the color of the border.
*
* @return a value
*/
/// <summary>
/// Get/set the color of the border.
/// </summary>
/// <value>a BaseColor</value>
public override BaseColor BorderColor {
set {
ThrowReadOnlyError();
}
}
/**
* Gets the backgroundcolor.
*
* @return a value
*/
/// <summary>
/// Get/set the backgroundcolor.
/// </summary>
/// <value>a BaseColor</value>
public override BaseColor BackgroundColor {
set {
ThrowReadOnlyError();
}
}
/// <summary>
/// Set/gets the rotation
/// </summary>
/// <value>a int</value>
public override int Rotation {
set {
ThrowReadOnlyError();
}
}
public override float BorderWidthLeft {
set {
ThrowReadOnlyError();
}
}
public override float BorderWidthRight {
set {
ThrowReadOnlyError();
}
}
public override float BorderWidthTop {
set {
ThrowReadOnlyError();
}
}
public override float BorderWidthBottom {
set {
ThrowReadOnlyError();
}
}
/**
* Sets a parameter indicating if the rectangle has variable borders
*
* @param useVariableBorders
* indication if the rectangle has variable borders
*/
public override bool UseVariableBorders{
set {
ThrowReadOnlyError();
}
}
public override String ToString() {
StringBuilder buf = new StringBuilder("RectangleReadOnly: ");
buf.Append(Width);
buf.Append('x');
buf.Append(Height);
buf.Append(" (rot: ");
buf.Append(rotation);
buf.Append(" degrees)");
return buf.ToString();
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.