class rectlist
List of rectangles of type Rect.
You will find a general example for the use of rectlist here.
Documentation
List of rectangles of type Rect.
-
Name Type Default Description Return RectList New empty RectList int wrect (RectRectangle. r, char * trailer) { if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s ", trailer); wlogWrite a log file message. Please also note the hints for writing logs. ("", "%f, %f, %f, %f\n", rect::leftGet the rectangle's left component. (r), rect::topGet the rectangle's left component. (r), rect::rightGet the rectangle's right component. (r), rect::bottomGet the rectangle's bottom component. (r)); return 0; } int wrectlist (RectListList of rectangles of type rect. rl, char * trailer) { RectRectangle. r; if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s\n", trailer); for (r = rectlist::firstGet the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0. (rl); r; r = rectlist::nextGet the next record of a given list. If nor more etries can found, the function returns the value 0. (rl)) { wrect (r, " "); } return 0; } int main () { RectRectangle. r1 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (0.0, 0.0, 100.0, 200.0); RectRectangle. r2 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 110.0, 210.0); RectRectangle. r3 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 400.0, 500.0); RectRectangle. intersect = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (); RectListList of rectangles of type rect. rl = rectlist::allocCreate a new empty list of type RectList. The list must again be deleted using RectList::release. (); rectlist::appendAppend a value to the list. (rl, r1); rectlist::appendAppend a value to the list. (rl, r2); rectlist::appendAppend a value to the list. (rl, r3); wrectlist (rl, "RectList"); rectlist::bboxGet the rectangles bounding box. (rl, intersect); wrect (intersect, "BBox of rectlist"); return 0; }
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description li RectList - List to be deleted - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return int Number of entries in the list li RectList - List - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect First value of the list. li RectList - List with at least one element - Postconditions
- The current list pointer is located at the start of the list. Further values can be fetched using next or last.
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect Next value of the list. li RectList - List with at least one element after the current list pointer - Preconditions
- Current list pointer with first, get_pos or get set and not the last element of the list
- Postconditions
- Current list pointer is relocated one position onwards
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect Preceding value in the list. li RectList - List with at least one element after the current list pointer - Preconditions
- Current list pointer with first, get_pos or get set and not the last element of the list
- Postconditions
- Current list pointer is relocated one position backwards
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect Last value of the list. li RectList - List with at least one element - Postconditions
- The current list pointer is located at the end of the list. Further values can be fetched using prev or first.
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return int >= 0 : First occurrence of a value in the list
-1 : Value not foundli RectList - List in which the value is to be search for val Rect - This value is searched for setPos int 0 0 : Leave list positions unchanged
1 : Set current list position at the point of finding - Postconditions
- If the value was found in the list and setPos is > 0, the current list position is located at the point of finding.
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return int >= 0 : First occurrence of a value in the list
-1 : Value not foundli RectList - List in which the value is to be search for l, t, r, b float, float, float, float - left, top, right, bottom components of the rectangle setPos int 0 0 : Leave list positions unchanged
1 : Set current list position at the point of finding - Postconditions
- If the value was found in the list and setPos is > 0, the current list position is located at the point of finding.
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect Value of the list at the position i or 0. li RectList - List from which the element is to be fetched pos int - 0-based list position setPos int 0 0 : Leave list positions unchanged
1 : Set current list position to pos - Postconditions
- If setPos > 0, the current list position is located at pos.
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return Rect appended value or 0 li RectList - List to which the append is to be made f Rect - value to append - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- append_by_value
insert
insert_by_value -
Name Type Default Description Return Rect appended value or 0 li RectList - List to which the append is to be made l, t, r, b float, float, float, float - left, top, right, bottom components of the rectangle - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- append
insert
insert_by_value -
Name Type Default Description Return Rect inserted value or 0 li RectList - List to which the insertion is to be made pos int - 0-based position of inserted value f Rect - value to insert - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- append
append_by_value
insert_by_value -
Name Type Default Description Return Rect appended value or 0 li RectList - List to which the append is to be made pos int - 0-based position of inserted value l, t, r, b float, float, float, float - left, top, right, bottom components of the rectangle - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- append
append_by_value
insert -
Name Type Default Description Return int removed value or 0 li RectList - List from which the remove is to be made val Rect - Value to be removed from the list - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- remove_by_value
-
Name Type Default Description Return int removed value or 0 li RectList - List from which the remove is to be made l, t, r, b float, float, float, float - left, top, right, bottom components of the rectangle - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
- See Also
- remove
-
Name Type Default Description Return Rect removed value or 0 li RectList - List pos int - 0-based delete position id = RectListList of rectangles of type rect.::remove_posRemove a position from the list. Positions are 0-based, the first element has the position 0, the final the position length-1. The removed object in not released automatically! (0); if (id) rect::releaseRelease a rectangle object from the stack. (id);
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return int 1 : Action successful
0 : otherwiseli RectList - List - Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
-
Name Type Default Description Return int 0 or ErrorCode li RectList - list to sort res Rect - allocated Rect for the result int wrect (RectRectangle. r, char * trailer) { if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s ", trailer); wlogWrite a log file message. Please also note the hints for writing logs. ("", "%f, %f, %f, %f\n", rect::leftGet the rectangle's left component. (r), rect::topGet the rectangle's left component. (r), rect::rightGet the rectangle's right component. (r), rect::bottomGet the rectangle's bottom component. (r)); return 0; } int wrectlist (RectListList of rectangles of type rect. rl, char * trailer) { RectRectangle. r; if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s\n", trailer); for (r = rectlist::firstGet the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0. (rl); r; r = rectlist::nextGet the next record of a given list. If nor more etries can found, the function returns the value 0. (rl)) { wrect (r, " "); } return 0; } int main () { RectRectangle. r1 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (0.0, 0.0, 100.0, 200.0); RectRectangle. r2 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 110.0, 210.0); RectRectangle. r3 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 400.0, 500.0); RectRectangle. intersect = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (); RectListList of rectangles of type rect. rl = rectlist::allocCreate a new empty list of type RectList. The list must again be deleted using RectList::release. (); rectlist::appendAppend a value to the list. (rl, r1); rectlist::appendAppend a value to the list. (rl, r2); rectlist::appendAppend a value to the list. (rl, r3); wrectlist (rl, "RectList"); rectlist::bboxGet the rectangles bounding box. (rl, intersect); wrect (intersect, "BBox of rectlist"); return 0; }
- Since
- Version 3.1 R2210, 29.11.2010
- Available
- priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator
alloc
static RectList alloc()
Create a new empty list of type RectList. The list must again be deleted using RectList::release.
release
static int release(RectList li)
Delete a list again that was created with RectList::alloc.
length
static int length(RectList li)
Ascertain the number of elements of a list.
first
static Rect first(RectList li)
Get the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0.
int wrect (RectRectangle. r, char * trailer)
{
if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s ", trailer);
wlogWrite a log file message. Please also note the hints for writing logs. ("", "%f, %f, %f, %f\n",
rect::leftGet the rectangle's left component. (r),
rect::topGet the rectangle's left component. (r),
rect::rightGet the rectangle's right component. (r),
rect::bottomGet the rectangle's bottom component. (r));
return 0;
}
int wrectlist (RectListList of rectangles of type rect. rl, char * trailer)
{
RectRectangle. r;
if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s\n", trailer);
for (r = rectlist::firstGet the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0. (rl); r; r = rectlist::nextGet the next record of a given list. If nor more etries can found, the function returns the value 0. (rl))
{
wrect (r, " ");
}
return 0;
}
int main ()
{
RectRectangle. r1 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (0.0, 0.0, 100.0, 200.0);
RectRectangle. r2 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 110.0, 210.0);
RectRectangle. r3 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 400.0, 500.0);
RectRectangle. intersect = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. ();
RectListList of rectangles of type rect. rl = rectlist::allocCreate a new empty list of type RectList. The list must again be deleted using RectList::release. ();
rectlist::appendAppend a value to the list. (rl, r1);
rectlist::appendAppend a value to the list. (rl, r2);
rectlist::appendAppend a value to the list. (rl, r3);
wrectlist (rl, "RectList");
rectlist::bboxGet the rectangles bounding box. (rl, intersect);
wrect (intersect, "BBox of rectlist");
return 0;
}
next
static Rect next(RectList li)
Get the next record of a given list. If nor more etries can found, the function returns the value 0.
int wrect (RectRectangle. r, char * trailer)
{
if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s ", trailer);
wlogWrite a log file message. Please also note the hints for writing logs. ("", "%f, %f, %f, %f\n",
rect::leftGet the rectangle's left component. (r),
rect::topGet the rectangle's left component. (r),
rect::rightGet the rectangle's right component. (r),
rect::bottomGet the rectangle's bottom component. (r));
return 0;
}
int wrectlist (RectListList of rectangles of type rect. rl, char * trailer)
{
RectRectangle. r;
if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s\n", trailer);
for (r = rectlist::firstGet the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0. (rl); r; r = rectlist::nextGet the next record of a given list. If nor more etries can found, the function returns the value 0. (rl))
{
wrect (r, " ");
}
return 0;
}
int main ()
{
RectRectangle. r1 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (0.0, 0.0, 100.0, 200.0);
RectRectangle. r2 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 110.0, 210.0);
RectRectangle. r3 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 400.0, 500.0);
RectRectangle. intersect = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. ();
RectListList of rectangles of type rect. rl = rectlist::allocCreate a new empty list of type RectList. The list must again be deleted using RectList::release. ();
rectlist::appendAppend a value to the list. (rl, r1);
rectlist::appendAppend a value to the list. (rl, r2);
rectlist::appendAppend a value to the list. (rl, r3);
wrectlist (rl, "RectList");
rectlist::bboxGet the rectangles bounding box. (rl, intersect);
wrect (intersect, "BBox of rectlist");
return 0;
}
prev
static Rect prev(RectList li)
Get the previous record of a given list. If nor more etries can found, the function returns the value 0.
last
static Rect last(RectList li)
Get the last non-empty record of a given list. If nor more etries can found, the function returns the value 0.
get_pos
static int get_pos(
RectList li,
Rect val,
int setPos = 0)
Search for the first position of a value in the list. If the value is not found, the function returns -1. List positions are 0-based, the first element has the position 0, the final the position length-1.
get_pos_by_value
static int get_pos_by_value(
RectList li,
float l,
float t,
float r,
float b,
int setPos = 0)
Search for the first position of a value in the list. If the value is not found, the function returns -1. List positions are 0-based, the first element has the position 0, the final the position length-1.
get
static Rect get(
RectList li,
int pos,
int setPos= 0)
Get the i-th element of the list. Wird kein Eintrag in der Liste gefunden, gibt die Funktion den Wert 0 zurück. List positions are 0-based, the first element has the position 0, the final the position length-1.
append
static Rect append(RectList li, Rect f)
Append a value to the list.
append_by_value
static Rect append_by_value(
RectList li,
float l,
float t,
float r,
float b)
Append a rectangle given by its components to the list.
insert
static Rect insert(
RectList li,
int pos,
Rect f)
Insert a value into the list.
insert_by_value
static Rect insert_by_value(
RectList li,
int pos,
float l,
float t,
float r,
float b)
Insert a rectangle given by its components into the list.
remove
static Rect remove(RectList li, Rect val)
Remove the first occurence of an given value from the list.
remove_by_value
static Rect remove_by_value(
RectList li,
float l,
float t,
float r,
float b)
Remove the first occurence of a rectangle givem by its components from the list.
remove_pos
static Rect remove_pos(RectList li, int pos)
Remove a position from the list. List positions are 0-based, the first element has the position 0, the final the position length-1.
clear
static int clear(RectList li)
Remove all elements of the list
bbox
static int bbox(RectList li, Rect res)
Get the rectangles bounding box.
-
Example
int wrect (RectRectangle. r, char * trailer) { if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s ", trailer); wlogWrite a log file message. Please also note the hints for writing logs. ("", "%f, %f, %f, %f\n", rect::leftGet the rectangle's left component. (r), rect::topGet the rectangle's left component. (r), rect::rightGet the rectangle's right component. (r), rect::bottomGet the rectangle's bottom component. (r)); return 0; } int wrectlist (RectListList of rectangles of type rect. rl, char * trailer) { RectRectangle. r; if (strlenLength of a string in letters. This function ascertains how long a string is by searching for the concluding 0. Multibyte UTF8-letters are counted as one! If the string is not 0-terminated, the call can lead to significant errors. (trailer)) wlogWrite a log file message. Please also note the hints for writing logs. ("", "%s\n", trailer); for (r = rectlist::firstGet the first non-empty entry record of a given RectList. If nor more etries can found, the function returns the value 0. (rl); r; r = rectlist::nextGet the next record of a given list. If nor more etries can found, the function returns the value 0. (rl)) { wrect (r, " "); } return 0; } int main () { RectRectangle. r1 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (0.0, 0.0, 100.0, 200.0); RectRectangle. r2 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 110.0, 210.0); RectRectangle. r3 = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (80.0, 90.0, 400.0, 500.0); RectRectangle. intersect = rect::allocCreate a new rectangle object. Without any parameters, the empty rectangle (0.0, 0.0, 0.0, 0.0) is created. (); RectListList of rectangles of type rect. rl = rectlist::allocCreate a new empty list of type RectList. The list must again be deleted using RectList::release. (); rectlist::appendAppend a value to the list. (rl, r1); rectlist::appendAppend a value to the list. (rl, r2); rectlist::appendAppend a value to the list. (rl, r3); wrectlist (rl, "RectList"); rectlist::bboxGet the rectangles bounding box. (rl, intersect); wrect (intersect, "BBox of rectlist"); return 0; }
Remarks
- Since
- Version 3.1 R2210, 29.11.2010
- See Also
- rect
Alphabetic index HTML hierarchy of classes or Java
© Copyright 2003-2024 WERK II GmbH Duisburg |
This documentation is part of the priint:comet InDesign®, InDesign Server® and Illustrator® plug-in and of the comet_pdf packages and is subject to the same license terms as priint:comet itself. The documentation may neither be passed on nor installed on public servers without the consent of WERK II GmbH. The documentation describes the priint:comet scripting language cScript and provides support for solving technical problems when using the priint:comet plugins. The documentation is not a manual for the priint:comet plugins. A manual of the priint:comet plugins can be found here. The documentation has been prepared with the greatest possible care. In case of errors or hints, please do not hesitate to contact our support. However, faulty or incomplete functional descriptions shall in no case result in an obligation on the part of WERK II GmbH to adapt the described item. This copyright notice may not be removed or altered. |