public struct Pixel

Number of pixels

Mainly used to differentiate between drawing in plot coordinates or in pixel based coordinates.

Example

auto a = aes!(int, "y", int, "x")(1, 2);
assertEqual( a.y, 1 );
assertEqual( a.x, 2 );

auto a1 = aes!("y", "x")(1, 2);
assertEqual( a1.y, 1 );
assertEqual( a1.x, 2 );

auto a2 = aes!("y")(1);
assertEqual( a2.y, 1 );


import std.range : zip;
import std.algorithm : map;
auto xs = [0,1];
auto ys = [2,3];
auto points = xs.zip(ys).map!((t) => aes!("x", "y")(t[0], t[1]));
assertEqual(points.front.x, 0);
assertEqual(points.front.y, 2);
points.popFront;
assertEqual(points.front.x, 1);
assertEqual(points.front.y, 3);

public this(int val)

Number of pixels in int

public this(Pixel val)

Copy constructor

public int value

Number of pixels

Variables

value
int

Number of pixels

Functions

this

Number of pixels in int

this

Copy constructor