mirror of https://github.com/KLayout/klayout.git
Implemented solution for #1923 ('move', 'moved')
1. Added move and moved to Point and DPoint 2. dx/dy is 0 by default now 3. arguments of move and moved are called v (vector) and dx/dy consistently
This commit is contained in:
parent
b4dabe29e5
commit
476ec3a714
|
|
@ -380,36 +380,34 @@ struct box_defs
|
|||
"\n"
|
||||
"@return The scaled box\n"
|
||||
) +
|
||||
method_ext ("move", &box_defs<C>::move, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("move", &box_defs<C>::move, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the box by a certain distance\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"This is a convenience method which takes two values instead of a Point object.\n"
|
||||
"This method has been introduced in version 0.23.\n"
|
||||
"\n"
|
||||
"@return A reference to this box.\n"
|
||||
) +
|
||||
method_ext ("moved", &box_defs<C>::moved, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("moved", &box_defs<C>::moved, gsi::arg ("dx, 0"), gsi::arg ("dy", 0),
|
||||
"@brief Moves the box by a certain distance\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"This is a convenience method which takes two values instead of a Point object.\n"
|
||||
"This method has been introduced in version 0.23.\n"
|
||||
"\n"
|
||||
"@return The moved box.\n"
|
||||
) +
|
||||
method ("move", &C::move, gsi::arg ("distance"),
|
||||
method ("move", &C::move, gsi::arg ("d"),
|
||||
"@brief Moves the box by a certain distance\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Moves the box by a given offset and returns the moved\n"
|
||||
"box. Does not check for coordinate overflows.\n"
|
||||
"\n"
|
||||
"@param distance The offset to move the box.\n"
|
||||
"@param d The offset to move the box.\n"
|
||||
"\n"
|
||||
"@return A reference to this box.\n"
|
||||
) +
|
||||
method ("moved", &C::moved, gsi::arg ("distance"),
|
||||
method ("moved", &C::moved, gsi::arg ("d"),
|
||||
"@brief Returns the box moved by a certain distance\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
|
@ -417,7 +415,7 @@ struct box_defs
|
|||
"box. Does not modify this box. Does not check for coordinate\n"
|
||||
"overflows.\n"
|
||||
"\n"
|
||||
"@param distance The offset to move the box.\n"
|
||||
"@param d The offset to move the box.\n"
|
||||
"\n"
|
||||
"@return The moved box.\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -207,17 +207,17 @@ struct edge_defs
|
|||
"\n"
|
||||
"This method has been introduced in version 0.25.\n"
|
||||
) +
|
||||
method ("moved", &C::moved, gsi::arg ("p"),
|
||||
method ("moved", &C::moved, gsi::arg ("v"),
|
||||
"@brief Returns the moved edge (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the edge by the given offset and returns the \n"
|
||||
"moved edge. The edge is not modified.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the edge.\n"
|
||||
"@param v The distance to move the edge.\n"
|
||||
"\n"
|
||||
"@return The moved edge.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved edge (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the edge by the given offset and returns the \n"
|
||||
|
|
@ -325,17 +325,17 @@ struct edge_defs
|
|||
"\n"
|
||||
"@return The transformed edge.\n"
|
||||
) +
|
||||
method ("move", &C::move, gsi::arg ("p"),
|
||||
method ("move", &C::move, gsi::arg ("v"),
|
||||
"@brief Moves the edge.\n"
|
||||
"\n"
|
||||
"Moves the edge by the given offset and returns the \n"
|
||||
"moved edge. The edge is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the edge.\n"
|
||||
"@param v The distance to move the edge.\n"
|
||||
"\n"
|
||||
"@return The moved edge.\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the edge.\n"
|
||||
"\n"
|
||||
"Moves the edge by the given offset and returns the \n"
|
||||
|
|
|
|||
|
|
@ -735,49 +735,49 @@ Class<db::EdgePairs> decl_EdgePairs (decl_dbShapeCollection, "db", "EdgePairs",
|
|||
"\n"
|
||||
"The 'join_with' alias has been introduced in version 0.28.12."
|
||||
) +
|
||||
method_ext ("move", &move_p, gsi::arg ("p"),
|
||||
method_ext ("move", &move_p, gsi::arg ("v"),
|
||||
"@brief Moves the edge pair collection\n"
|
||||
"\n"
|
||||
"Moves the edge pairs by the given offset and returns the \n"
|
||||
"moved edge pair collection. The edge pair collection is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the edge pairs.\n"
|
||||
"@param v The distance to move the edge pairs.\n"
|
||||
"\n"
|
||||
"@return The moved edge pairs (self).\n"
|
||||
"\n"
|
||||
"Starting with version 0.25 the displacement is of vector type."
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
"@brief Moves the edge pair collection\n"
|
||||
"\n"
|
||||
"Moves the edge pairs by the given offset and returns the \n"
|
||||
"moved edge pairs. The edge pair collection is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the edge pairs.\n"
|
||||
"@param y The y distance to move the edge pairs.\n"
|
||||
"@param dx The x distance to move the edge pairs.\n"
|
||||
"@param dy The y distance to move the edge pairs.\n"
|
||||
"\n"
|
||||
"@return The moved edge pairs (self).\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_p, gsi::arg ("p"),
|
||||
method_ext ("moved", &moved_p, gsi::arg ("v"),
|
||||
"@brief Returns the moved edge pair collection (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the edge pairs by the given offset and returns the \n"
|
||||
"moved edge pairs. The edge pair collection is not modified.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the edge pairs.\n"
|
||||
"@param v The distance to move the edge pairs.\n"
|
||||
"\n"
|
||||
"@return The moved edge pairs.\n"
|
||||
"\n"
|
||||
"Starting with version 0.25 the displacement is of vector type."
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved edge pair collection (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the edge pairs by the given offset and returns the \n"
|
||||
"moved edge pairs. The edge pair collection is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the edge pairs.\n"
|
||||
"@param y The y distance to move the edge pairs.\n"
|
||||
"@param dx The x distance to move the edge pairs.\n"
|
||||
"@param dy The y distance to move the edge pairs.\n"
|
||||
"\n"
|
||||
"@return The moved edge pairs.\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -1621,14 +1621,14 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
|
|||
"\n"
|
||||
"Starting with version 0.25 the displacement type is a vector."
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the edge collection\n"
|
||||
"\n"
|
||||
"Moves the edge collection by the given offset and returns the \n"
|
||||
"moved edge collection. The edge collection is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the edge collection.\n"
|
||||
"@param y The y distance to move the edge collection.\n"
|
||||
"@param dx The x distance to move the edge collection.\n"
|
||||
"@param dy The y distance to move the edge collection.\n"
|
||||
"\n"
|
||||
"@return The moved edge collection (self).\n"
|
||||
) +
|
||||
|
|
@ -1644,14 +1644,14 @@ Class<db::Edges> decl_Edges (decl_dbShapeCollection, "db", "Edges",
|
|||
"\n"
|
||||
"Starting with version 0.25 the displacement type is a vector."
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("v"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dv", 0),
|
||||
"@brief Returns the moved edge collection (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the edge collection by the given offset and returns the \n"
|
||||
"moved edge collection. The edge collection is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the edge collection.\n"
|
||||
"@param y The y distance to move the edge collection.\n"
|
||||
"@param dx The x distance to move the edge collection.\n"
|
||||
"@param dy The y distance to move the edge collection.\n"
|
||||
"\n"
|
||||
"@return The moved edge collection.\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -208,17 +208,17 @@ struct path_defs
|
|||
"Returns the scaled object. All coordinates are multiplied with the given factor and if "
|
||||
"necessary rounded."
|
||||
) +
|
||||
method ("move", &C::move, gsi::arg ("p"),
|
||||
method ("move", &C::move, gsi::arg ("v"),
|
||||
"@brief Moves the path.\n"
|
||||
"\n"
|
||||
"Moves the path by the given offset and returns the \n"
|
||||
"moved path. The path is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the path.\n"
|
||||
"@param v The distance to move the path.\n"
|
||||
"\n"
|
||||
"@return The moved path.\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the path.\n"
|
||||
"\n"
|
||||
"Moves the path by the given offset and returns the \n"
|
||||
|
|
@ -231,17 +231,17 @@ struct path_defs
|
|||
"\n"
|
||||
"This version has been added in version 0.23.\n"
|
||||
) +
|
||||
method ("moved", &C::moved, gsi::arg ("p"),
|
||||
method ("moved", &C::moved, gsi::arg ("v"),
|
||||
"@brief Returns the moved path (does not change self)\n"
|
||||
"\n"
|
||||
"Moves the path by the given offset and returns the \n"
|
||||
"moved path. The path is not modified.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the path.\n"
|
||||
"@param v The distance to move the path.\n"
|
||||
"\n"
|
||||
"@return The moved path.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved path (does not change self)\n"
|
||||
"\n"
|
||||
"Moves the path by the given offset and returns the \n"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ template <class C>
|
|||
struct point_defs
|
||||
{
|
||||
typedef typename C::coord_type coord_type;
|
||||
typedef typename C::vector_type vector_type;
|
||||
|
||||
static C *from_string (const char *s)
|
||||
{
|
||||
|
|
@ -97,6 +98,28 @@ struct point_defs
|
|||
return std::hfunc (*pt);
|
||||
}
|
||||
|
||||
static C move_d (C *p, const vector_type &d)
|
||||
{
|
||||
*p += d;
|
||||
return *p;
|
||||
}
|
||||
|
||||
static C move_xy (C *p, coord_type dx, coord_type dy)
|
||||
{
|
||||
*p += vector_type (dx, dy);
|
||||
return *p;
|
||||
}
|
||||
|
||||
static C moved_d (const C *p, const vector_type &d)
|
||||
{
|
||||
return *p + d;
|
||||
}
|
||||
|
||||
static C moved_xy (const C *p, coord_type dx, coord_type dy)
|
||||
{
|
||||
return *p + vector_type (dx, dy);
|
||||
}
|
||||
|
||||
static gsi::Methods methods ()
|
||||
{
|
||||
return
|
||||
|
|
@ -170,6 +193,56 @@ struct point_defs
|
|||
"\n"
|
||||
"This method has been introduced in version 0.25.\n"
|
||||
) +
|
||||
method_ext ("move", &move_d, gsi::arg ("v"),
|
||||
"@brief Moves the point.\n"
|
||||
"\n"
|
||||
"This method is equivalent to '+='. It was introduced to harmonize the API "
|
||||
"with the other objects. The point is modified.\n"
|
||||
"\n"
|
||||
"@param v The distance to move the point.\n"
|
||||
"\n"
|
||||
"@return The moved point.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.29.9."
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the point.\n"
|
||||
"\n"
|
||||
"Moves the point by the given offset and returns the \n"
|
||||
"moved point. The point is modified.\n"
|
||||
"\n"
|
||||
"@param dx The x distance to move the point.\n"
|
||||
"@param dy The y distance to move the point.\n"
|
||||
"\n"
|
||||
"@return The moved point.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.29.9."
|
||||
) +
|
||||
method_ext ("moved", &moved_d, gsi::arg ("v"),
|
||||
"@brief Returns the moved point.\n"
|
||||
"\n"
|
||||
"This method is equivalent to '+'. It was introduced to harmonize the API "
|
||||
"with the other objects. The point is not modified.\n"
|
||||
"\n"
|
||||
"@param v The distance to move the point.\n"
|
||||
"\n"
|
||||
"@return The moved point.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.29.9."
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved point.\n"
|
||||
"\n"
|
||||
"Moves the point by the given offset and returns the \n"
|
||||
"moved point. The point is not modified.\n"
|
||||
"\n"
|
||||
"@param dx The x distance to move the point.\n"
|
||||
"@param dy The y distance to move the point.\n"
|
||||
"\n"
|
||||
"@return The moved point.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.29.9."
|
||||
) +
|
||||
method ("x", &C::x,
|
||||
"@brief Accessor to the x coordinate\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -429,45 +429,45 @@ struct simple_polygon_defs
|
|||
"Returns the scaled object. All coordinates are multiplied with the given factor and if "
|
||||
"necessary rounded."
|
||||
) +
|
||||
method ("move", &C::move, gsi::arg ("p"),
|
||||
method ("move", &C::move, gsi::arg ("v"),
|
||||
"@brief Moves the simple polygon.\n"
|
||||
"\n"
|
||||
"Moves the simple polygon by the given offset and returns the \n"
|
||||
"moved simple polygon. The polygon is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the simple polygon.\n"
|
||||
"@param v The distance to move the simple polygon.\n"
|
||||
"\n"
|
||||
"@return The moved simple polygon.\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the polygon.\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
"moved polygon. The polygon is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the polygon.\n"
|
||||
"@param y The y distance to move the polygon.\n"
|
||||
"@param dx The x distance to move the polygon.\n"
|
||||
"@param dy The y distance to move the polygon.\n"
|
||||
"\n"
|
||||
"@return The moved polygon (self).\n"
|
||||
) +
|
||||
method ("moved", &C::moved, gsi::arg ("p"),
|
||||
method ("moved", &C::moved, gsi::arg ("v"),
|
||||
"@brief Returns the moved simple polygon\n"
|
||||
"\n"
|
||||
"Moves the simple polygon by the given offset and returns the \n"
|
||||
"moved simple polygon. The polygon is not modified.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the simple polygon.\n"
|
||||
"@param v The distance to move the simple polygon.\n"
|
||||
"\n"
|
||||
"@return The moved simple polygon.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved polygon (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
"moved polygon. The polygon is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the polygon.\n"
|
||||
"@param y The y distance to move the polygon.\n"
|
||||
"@param dx The x distance to move the polygon.\n"
|
||||
"@param dy The y distance to move the polygon.\n"
|
||||
"\n"
|
||||
"@return The moved polygon.\n"
|
||||
"\n"
|
||||
|
|
@ -1470,30 +1470,30 @@ struct polygon_defs
|
|||
"Returns the scaled object. All coordinates are multiplied with the given factor and if "
|
||||
"necessary rounded."
|
||||
) +
|
||||
method ("move", &C::move, gsi::arg ("p"),
|
||||
method ("move", &C::move, gsi::arg ("v"),
|
||||
"@brief Moves the polygon.\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
"moved polygon. The polygon is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the polygon.\n"
|
||||
"@param v The distance to move the polygon.\n"
|
||||
"\n"
|
||||
"@return The moved polygon (self).\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.23.\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the polygon.\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
"moved polygon. The polygon is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the polygon.\n"
|
||||
"@param y The y distance to move the polygon.\n"
|
||||
"@param dx The x distance to move the polygon.\n"
|
||||
"@param dy The y distance to move the polygon.\n"
|
||||
"\n"
|
||||
"@return The moved polygon (self).\n"
|
||||
) +
|
||||
method ("moved", &C::moved, gsi::arg ("p"),
|
||||
method ("moved", &C::moved, gsi::arg ("v"),
|
||||
"@brief Returns the moved polygon (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
|
|
@ -1505,14 +1505,14 @@ struct polygon_defs
|
|||
"\n"
|
||||
"This method has been introduced in version 0.23.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved polygon (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the polygon by the given offset and returns the \n"
|
||||
"moved polygon. The polygon is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the polygon.\n"
|
||||
"@param y The y distance to move the polygon.\n"
|
||||
"@param dx The x distance to move the polygon.\n"
|
||||
"@param dy The y distance to move the polygon.\n"
|
||||
"\n"
|
||||
"@return The moved polygon.\n"
|
||||
"\n"
|
||||
|
|
|
|||
|
|
@ -3039,14 +3039,14 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"\n"
|
||||
"@return The moved region (self).\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the region\n"
|
||||
"\n"
|
||||
"Moves the region by the given offset and returns the \n"
|
||||
"moved region. The region is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the region.\n"
|
||||
"@param y The y distance to move the region.\n"
|
||||
"@param dx The x distance to move the region.\n"
|
||||
"@param dy The y distance to move the region.\n"
|
||||
"\n"
|
||||
"@return The moved region (self).\n"
|
||||
) +
|
||||
|
|
@ -3058,18 +3058,18 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
|
|||
"\n"
|
||||
"Starting with version 0.25 this method accepts a vector argument.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the region.\n"
|
||||
"@param v The distance to move the region.\n"
|
||||
"\n"
|
||||
"@return The moved region.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved region (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the region by the given offset and returns the \n"
|
||||
"moved region. The region is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the region.\n"
|
||||
"@param y The y distance to move the region.\n"
|
||||
"@param dx The x distance to move the region.\n"
|
||||
"@param dy The y distance to move the region.\n"
|
||||
"\n"
|
||||
"@return The moved region.\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -296,18 +296,18 @@ struct text_defs
|
|||
"\n"
|
||||
"See \\valign= for a description of this property.\n"
|
||||
) +
|
||||
method_ext ("move", &move, gsi::arg ("distance"),
|
||||
method_ext ("move", &move, gsi::arg ("v"),
|
||||
"@brief Moves the text by a certain distance (modifies self)\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"Moves the text by a given offset and returns the moved\n"
|
||||
"text. Does not check for coordinate overflows.\n"
|
||||
"\n"
|
||||
"@param p The offset to move the text.\n"
|
||||
"@param v The offset to move the text.\n"
|
||||
"\n"
|
||||
"@return A reference to this text object\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the text by a certain distance (modifies self)\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
|
@ -321,7 +321,7 @@ struct text_defs
|
|||
"\n"
|
||||
"This method was introduced in version 0.23."
|
||||
) +
|
||||
method_ext ("moved", &moved, gsi::arg ("distance"),
|
||||
method_ext ("moved", &moved, gsi::arg ("v"),
|
||||
"@brief Returns the text moved by a certain distance (does not modify self)\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
|
@ -329,11 +329,11 @@ struct text_defs
|
|||
"text. Does not modify *this. Does not check for coordinate\n"
|
||||
"overflows.\n"
|
||||
"\n"
|
||||
"@param p The offset to move the text.\n"
|
||||
"@param v The offset to move the text.\n"
|
||||
"\n"
|
||||
"@return The moved text.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx"), gsi::arg ("dy"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the text moved by a certain distance (does not modify self)\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
|
|
|||
|
|
@ -484,45 +484,45 @@ Class<db::Texts> decl_Texts (decl_dbShapeCollection, "db", "Texts",
|
|||
"\n"
|
||||
"The 'join_with' alias has been introduced in version 0.28.12."
|
||||
) +
|
||||
method_ext ("move", &move_p, gsi::arg ("p"),
|
||||
method_ext ("move", &move_p, gsi::arg ("v"),
|
||||
"@brief Moves the text collection\n"
|
||||
"\n"
|
||||
"Moves the texts by the given offset and returns the \n"
|
||||
"moved text collection. The text collection is overwritten.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the texts.\n"
|
||||
"@param v The distance to move the texts.\n"
|
||||
"\n"
|
||||
"@return The moved texts (self).\n"
|
||||
) +
|
||||
method_ext ("move", &move_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("move", &move_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Moves the text collection\n"
|
||||
"\n"
|
||||
"Moves the edge pairs by the given offset and returns the \n"
|
||||
"moved texts. The edge pair collection is overwritten.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the texts.\n"
|
||||
"@param y The y distance to move the texts.\n"
|
||||
"@param dx The x distance to move the texts.\n"
|
||||
"@param dy The y distance to move the texts.\n"
|
||||
"\n"
|
||||
"@return The moved texts (self).\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_p, gsi::arg ("p"),
|
||||
method_ext ("moved", &moved_p, gsi::arg ("v"),
|
||||
"@brief Returns the moved text collection (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the texts by the given offset and returns the \n"
|
||||
"moved texts. The text collection is not modified.\n"
|
||||
"\n"
|
||||
"@param p The distance to move the texts.\n"
|
||||
"@param v The distance to move the texts.\n"
|
||||
"\n"
|
||||
"@return The moved texts.\n"
|
||||
) +
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("x"), gsi::arg ("y"),
|
||||
method_ext ("moved", &moved_xy, gsi::arg ("dx", 0), gsi::arg ("dy", 0),
|
||||
"@brief Returns the moved edge pair collection (does not modify self)\n"
|
||||
"\n"
|
||||
"Moves the texts by the given offset and returns the \n"
|
||||
"moved texts. The text collection is not modified.\n"
|
||||
"\n"
|
||||
"@param x The x distance to move the texts.\n"
|
||||
"@param y The y distance to move the texts.\n"
|
||||
"@param dx The x distance to move the texts.\n"
|
||||
"@param dy The y distance to move the texts.\n"
|
||||
"\n"
|
||||
"@return The moved texts.\n"
|
||||
) +
|
||||
|
|
|
|||
Loading…
Reference in New Issue