Functions |
template<typename L > |
object_links< L > | scribo::filter::object_links_aligned (const object_links< L > &links, float max_alpha, anchor::Type anchor) |
template<typename L > |
object_links< L > | scribo::filter::object_links_bbox_h_ratio (const object_links< L > &links, float max_h_ratio) |
template<typename L > |
object_links< L > | scribo::filter::object_links_bbox_overlap (const object_links< L > &links, float max_overlap_ratio) |
template<typename L > |
object_links< L > | scribo::filter::object_links_bbox_ratio (const object_links< L > &links, unsigned dim, float max_ratio) |
template<typename L > |
object_links< L > | scribo::filter::object_links_bbox_w_ratio (const object_links< L > &links, float max_w_ratio) |
template<typename L > |
object_links< L > | scribo::filter::object_links_bottom_aligned (const object_links< L > &links, float max_alpha) |
template<typename L > |
object_links< L > | scribo::filter::object_links_center_aligned (const object_links< L > &links, float max_alpha) |
template<typename L > |
object_links< L > | scribo::filter::object_links_left_aligned (const object_links< L > &links, float max_alpha) |
template<typename L > |
object_links< L > | scribo::filter::object_links_non_aligned_simple (const object_links< L > &links, anchor::Type anchor, float max_alpha) |
template<typename L > |
object_links< L > | scribo::filter::object_links_right_aligned (const object_links< L > &links, float max_alpha) |
template<typename L > |
object_links< L > | scribo::filter::object_links_top_aligned (const object_links< L > &links, float max_alpha) |
Detailed Description
Component links filtering routines.
Function Documentation
template<typename L >
object_links<L> scribo::filter::object_links_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha, |
|
|
anchor::Type |
anchor |
|
) |
| |
Invalidate links between two components according to a specific anchor.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
[in] | anchor | Anchor used to compute angles. |
------
| |
------ | |
| | | |
| x------------x |
| | | |
------~ ~ ~ ~| ~ ~| ~ ~
object1 ~ | | ^
~ | | |
~------ |
object2 | Alpha
~ |
~ |
~ |
~ v
~
Example with an anchor set to the bottom right : The angle between the two bottoms must be lower than max_alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_h_ratio |
( |
const object_links< L > & |
links, |
|
|
float |
max_h_ratio |
|
) |
| |
Invalidate links between two components with too different height.
- Parameters
-
[in] | links | Link objects information. |
[in] | max_h_ratio | The maximum height ratio of two linked bounding boxes. |
- Returns
- A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_overlap |
( |
const object_links< L > & |
links, |
|
|
float |
max_overlap_ratio |
|
) |
| |
Invalidate links between two components having their bounding box overlapping too much.
- Parameters
-
[in] | links | Link components information. |
[in] | max_overlap_ratio | The maximum ratio of the overlapping areas. |
- Returns
- A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_ratio |
( |
const object_links< L > & |
links, |
|
|
unsigned |
dim, |
|
|
float |
max_ratio |
|
) |
| |
Invalidate links between two components with too different height or width.
- Parameters
-
[in] | links | Link components information. |
[in] | dim | The dimension to use to compare bbox length. |
[in] | max_ratio | The maximum length ratio of two linked bounding boxes. |
- Returns
- A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bbox_w_ratio |
( |
const object_links< L > & |
links, |
|
|
float |
max_w_ratio |
|
) |
| |
Invalidate links between two objects with too different width.
- Parameters
-
[in] | links | Link objects information. |
[in] | max_w_ratio | The minimum width ratio of two linked bounding boxes. |
- Returns
- A filtered object link information.
template<typename L >
object_links<L> scribo::filter::object_links_bottom_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two components if their bottom are not aligned.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
------
| |
------ | |
| | | |
| x------------x |
| | | |
------~ ~ ~ ~| ~ ~| ~ ~
object1 ~ | | ^
~ | | |
~------ |
object2 | Alpha
~ |
~ |
~ |
~ v
~
The angle between the two bottoms must be lower than max_alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_center_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two objects if their center are not aligned.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
- Returns
- New link data.
------ ------
| | | | v
| x ~| ~ ~ ~ | ~ ~|~ ~
| ~| ~ | | | => Alpha
| | ~ ~ | x ~|~ ~
------ | | ^
object1 | |
------
object2
The angle between the two bottoms must be lower than max_alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_left_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two objects if their left are not aligned.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
~ ^
~ |
~------ | Alpha
~ | | |
~ | | |
~ | | v
~----- ~ ~ ~ | ~ ~| ~
| | | |
| x------------x |
| | | |
------ | |
object1 | |
------
object2
The angle between the two lefts must be lower than max_alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_non_aligned_simple |
( |
const object_links< L > & |
links, |
|
|
anchor::Type |
anchor, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two non aligned components. Alignment is based on a given anchor of object bounding boxes.
- Parameters
-
[in] | links | Object links information. |
[in] | anchor | Anchor from where the links are made. |
[in] | max_alpha | Maximum angle value (degrees). |
Exemple with anchor == 1 (bottom horizontal filter):
------
| |
------ | |
| | | |
| x------------x |
| | | |
------~ ~ ~ ~| ~ ~| ~ ~
object1 ~ | | ^
~ | | |
~------ |
object2 | Alpha
~ |
~ |
~ |
~ v
~
The angle between the two bottoms must be lower than alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_right_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two objects if their right are not aligned.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
~
-----~ ^
| ~ | | Alpha
~| | |
~ | | v
------ ~ ~ ~ | ~ ~| ~ ~
| | | |
| x------------x |
| | | |
------ | |
object1 | |
------
object2
The angle between the two rights must be lower than max_alpha
.
template<typename L >
object_links<L> scribo::filter::object_links_top_aligned |
( |
const object_links< L > & |
links, |
|
|
float |
max_alpha |
|
) |
| |
Invalidate links between two objects if their top are not aligned.
- Parameters
-
[in] | links | Object links information. |
[in] | max_alpha | Maximum angle value (degrees). |
~
~ ^
~ |
~ |
~------ | Alpha
~ | | |
~ | | |
~ | | v
------ ~ ~ ~ | ~ ~| ~
| | | |
| x------------x |
| | | |
------ | |
object1 | |
------
object2
The angle between the two tops must be lower than max_alpha
.