Poison-ui

A cross-platform desktop/mobile UI engine written in D using dsfml

View project on GitHub

Dub version

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:

positionThe position.
sizeThe size.

public @property Point position();


Gets the position of the space.


public @property void position(Point newPosition);


Sets the position of the space.


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 size();


Gets the size of the space.


public @property void size(Size newSize);


Sets the size 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 Edge margin();


Gets the margin of the space.


public @property void margin(Edge newMargin);


Sets the margin 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 @property Edge padding();


Gets the padding of the space.


public @property void padding(Edge newPadding);


Sets the padding of the space.


public void moveTo(Location location)(Space target);


Moves the space to another space.

Parameters:

targetThe target of the space.

public static void moveIn(Location location)(Space target);


Moves the space into another space.

Parameters:

targetThe space to move the space into.

public static void centerX(Space target);


Centers the x coordinate of the space relative to another space.

Parameters:

targetThe target to be relative to.

public static void centerY(Space target);


Centers the y coordinate of the space relative to another space.

Parameters:

targetThe target to be relative to.

public static void center(Space target);


Centers the space relative to another space.

Parameters:

targetThe target to be relative to.

public static bool intersect(Point p);


Checks whether the space intersects with a point.

Parameters:

pThe 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:

targetThe space to check for intersection with.

Returns:

  True if the two spaces intersects.

Generated by venom - Poison Engine's Documentation Generator