poison.ui.space
Source
Module for space and dimension manipulation.
Authors:
Jacob Jensen
License:
https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE
public:
public this(Point position, Size size);
Creates a new space.
Parameters:
position The position.
size The size.
public @property ptrdiff_t x();
Gets the x coordinate of the space.
public @property ptrdiff_t y();
Gets the y coordinate of the space.
public @property size_t width();
Gets the width of the space.
public @property size_t height();
Gets the height of the space.
public @property ptrdiff_t topMargin();
Gets the top margin of the space.
public @property ptrdiff_t rightMargin();
Gets the right margin of the space.
public @property ptrdiff_t bottomMargin();
Gets the bottom margin of the space.
public @property ptrdiff_t leftMargin();
Gets the left margin of the space.
public void moveTo(Location location)(Space target);
Moves the space to another space.
Parameters:
target The target of the space.
public static void moveIn(Location location)(Space target);
Moves the space into another space.
Parameters:
target The space to move the space into.
public static void centerX(Space target);
Centers the x coordinate of the space relative to another space.
Parameters:
target The target to be relative to.
public static void centerY(Space target);
Centers the y coordinate of the space relative to another space.
Parameters:
target The target to be relative to.
public static void center(Space target);
Centers the space relative to another space.
Parameters:
target The target to be relative to.
public static bool intersect(Point p);
Checks whether the space intersects with a point.
Parameters:
p The point to check for intersection with.
Returns:
If the space intersects with the point.
public static bool intersect(Space target);
Checks whether the space intersects with another space.
Parameters:
target The space to check for intersection with.
Returns:
True if the two spaces intersects.
Generated by venom - Poison Engine's Documentation Generator
Module for space and dimension manipulation.
Authors:
Jacob JensenLicense:
https://github.com/PoisonEngine/poison-ui/blob/master/LICENSEpublic this(Point position, Size size);
Creates a new space.
Parameters:
position | The position. |
size | The size. |
public @property ptrdiff_t x();
Gets the x coordinate of the space.
public @property ptrdiff_t y();
Gets the y coordinate of the space.
public @property size_t width();
Gets the width of the space.
public @property size_t height();
Gets the height of the space.
public @property ptrdiff_t topMargin();
Gets the top margin of the space.
public @property ptrdiff_t rightMargin();
Gets the right margin of the space.
public @property ptrdiff_t bottomMargin();
Gets the bottom margin of the space.
public @property ptrdiff_t leftMargin();
Gets the left margin of the space.
public void moveTo(Location location)(Space target);
Moves the space to another space.
Parameters:
target | The target of the space. |
public static void moveIn(Location location)(Space target);
Moves the space into another space.
Parameters:
target | The space to move the space into. |
public static void centerX(Space target);
Centers the x coordinate of the space relative to another space.
Parameters:
target | The target to be relative to. |
public static void centerY(Space target);
Centers the y coordinate of the space relative to another space.
Parameters:
target | The target to be relative to. |
public static void center(Space target);
Centers the space relative to another space.
Parameters:
target | The target to be relative to. |
public static bool intersect(Point p);
Checks whether the space intersects with a point.
Parameters:
p | The point to check for intersection with. |
Returns:
If the space intersects with the point.public static bool intersect(Space target);
Checks whether the space intersects with another space.
Parameters:
target | The space to check for intersection with. |