Function rectangle

Convenience function to create a Rectangle!int or Rectangle!double.

Prototypes

auto rectangle(T)(
  T x,
  T y,
  T width,
  T height
)
if (isOneOf!(T, int, double));

auto rectangle(T)(
  Point!T point,
  T width,
  T height
)
if (isOneOf!(T, int, double));

Example

auto a = rectangle(1, 1, 4, 4);
Rectangle!int rectInt = a;
auto b = rectangle(0.99, 0.99, 3.99, 3.99);
Rectangle!double rectDouble = b;

Authors

Johannes Pfau cairoD
Andrej Mitrovic cairoD
cairo team cairo

Copyright

License

cairoD wrapper/bindings Boost License 1.0
cairo LGPL 2.1 / MPL 1.1