Skip to content

Commit 27f6a3e

Browse files
author
Dmitry Radchuk
committed
Add grid flow property
DEVSIX-8323
1 parent 570c5a1 commit 27f6a3e

File tree

13 files changed

+837
-295
lines changed

13 files changed

+837
-295
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/parser/data/ImageRenderInfo.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public List<CanvasTag> getCanvasTagHierarchy() {
165165
}
166166

167167
/**
168-
* Gets the marked-content identifier associated with this {@link ImageRenderInfo} instance
168+
* Gets the marked-content identifier associated with this {@link ImageRenderInfo} instance.
169169
*
170170
* @return associated marked-content identifier or -1 in case content is unmarked
171171
*/
@@ -179,23 +179,23 @@ public int getMcid() {
179179
}
180180

181181
/**
182-
* Checks if the text belongs to a marked content sequence
182+
* Checks if this {@link ImageRenderInfo} instance is associated with a marked content sequence
183183
* with a given mcid.
184184
*
185185
* @param mcid a marked content id
186-
* @return true if the text is marked with this id
186+
* @return {@code true} if the image is marked with this id, {@code false} otherwise
187187
*/
188188
public boolean hasMcid(int mcid) {
189189
return hasMcid(mcid, false);
190190
}
191191

192192
/**
193-
* Checks if the text belongs to a marked content sequence
193+
* Checks if this {@link ImageRenderInfo} instance is associated with a marked content sequence
194194
* with a given mcid.
195195
*
196196
* @param mcid a marked content id
197197
* @param checkTheTopmostLevelOnly indicates whether to check the topmost level of marked content stack only
198-
* @return true if the text is marked with this id
198+
* @return {@code true} if this {@link ImageRenderInfo} instance is marked with this id, {@code false} otherwise
199199
*/
200200
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly) {
201201
if (checkTheTopmostLevelOnly) {

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/parser/data/PathRenderInfo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,23 +257,23 @@ public int getMcid() {
257257
}
258258

259259
/**
260-
* Checks if the text belongs to a marked content sequence
260+
* Checks if this {@link PathRenderInfo} instance belongs to a marked content sequence
261261
* with a given mcid.
262262
*
263263
* @param mcid a marked content id
264-
* @return {@code true} if the text is marked with this id
264+
* @return {@code true} if this {@link PathRenderInfo} instance is marked with this id, {@code false} otherwise
265265
*/
266266
public boolean hasMcid(int mcid) {
267267
return hasMcid(mcid, false);
268268
}
269269

270270
/**
271-
* Checks if the text belongs to a marked content sequence
271+
* Checks if this {@link PathRenderInfo} instance belongs to a marked content sequence
272272
* with a given mcid.
273273
*
274274
* @param mcid a marked content id
275275
* @param checkTheTopmostLevelOnly indicates whether to check the topmost level of marked content stack only
276-
* @return {@code true} if the text is marked with this id
276+
* @return {@code true} if this {@link PathRenderInfo} instance is marked with this id, {@code false} otherwise
277277
*/
278278
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly) {
279279
if (checkTheTopmostLevelOnly) {

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/parser/data/TextRenderInfo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,23 @@ public Matrix getTextMatrix() {
135135
}
136136

137137
/**
138-
* Checks if the text belongs to a marked content sequence
138+
* Checks if this {@link TextRenderInfo} instance belongs to a marked content sequence
139139
* with a given mcid.
140140
*
141141
* @param mcid a marked content id
142-
* @return true if the text is marked with this id
142+
* @return {@code true} if this {@link TextRenderInfo} instance is marked with this id, {@code false} otherwise
143143
*/
144144
public boolean hasMcid(int mcid) {
145145
return hasMcid(mcid, false);
146146
}
147147

148148
/**
149-
* Checks if the text belongs to a marked content sequence
149+
* Checks if this {@link TextRenderInfo} instance belongs to a marked content sequence
150150
* with a given mcid.
151151
*
152152
* @param mcid a marked content id
153153
* @param checkTheTopmostLevelOnly indicates whether to check the topmost level of marked content stack only
154-
* @return true if the text is marked with this id
154+
* @return {@code true} if this {@link TextRenderInfo} instance is marked with this id, {@code false} otherwise
155155
*/
156156
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly) {
157157
if (checkTheTopmostLevelOnly) {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.itextpdf.layout.properties;
2+
3+
/**
4+
* A specialized enum containing potential property values for
5+
* {@link com.itextpdf.layout.properties.Property#GRID_FLOW}.
6+
*/
7+
public enum GridFlow {
8+
/**
9+
* Defines row flow from left to right of a grid.
10+
*/
11+
ROW,
12+
/**
13+
* Defines column flow from top to bottom of a grid.
14+
*/
15+
COLUMN,
16+
/**
17+
* Same as {@code ROW} but uses dense algorithm for cell placement.
18+
*/
19+
ROW_DENSE,
20+
/**
21+
* Same as {@code COLUMN} but uses dense algorithm for cell placement.
22+
*/
23+
COLUMN_DENSE
24+
}

layout/src/main/java/com/itextpdf/layout/properties/Property.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public final class Property {
127127
public static final int GRID_TEMPLATE_ROWS = 146;
128128
public static final int GRID_AUTO_ROWS = 151;
129129
public static final int GRID_AUTO_COLUMNS = 152;
130+
public static final int GRID_FLOW = 154;
130131
public static final int HEIGHT = 27;
131132
public static final int HORIZONTAL_ALIGNMENT = 28;
132133
public static final int HORIZONTAL_BORDER_SPACING = 115;
@@ -233,7 +234,7 @@ public final class Property {
233234
* related to textual operations. Indicates whether or not this type of property is inheritable.
234235
*/
235236
private static final boolean[] INHERITED_PROPERTIES;
236-
private static final int MAX_INHERITED_PROPERTY_ID = 153;
237+
private static final int MAX_INHERITED_PROPERTY_ID = 154;
237238

238239
static {
239240
INHERITED_PROPERTIES = new boolean[MAX_INHERITED_PROPERTY_ID + 1];

0 commit comments

Comments
 (0)