From 21c39c46a0f171242c394e0a7c908bcc375cdcdc Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sat, 20 Jan 2018 13:46:22 +0300 Subject: [PATCH] In progress... --- src/Rect.vala | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/Rect.vala diff --git a/src/Rect.vala b/src/Rect.vala new file mode 100644 index 0000000..94f940c --- /dev/null +++ b/src/Rect.vala @@ -0,0 +1,72 @@ +namespace CairoChart { + + /** + * + */ + [Compact] + public class Rect { + + /** + * + */ + public double x0 = 0; + + /** + * + */ + public double x1 = 1; + + /** + * + */ + public double y0 = 0; + + /** + * + */ + public double y1 = 1; + + /** + * + */ + public double width { + get { + return x1 - x0; + } + protected set { + width = value; + x1 = x0 + width; + } + } + + /** + * + */ + public double height { + get { + return y1 - y0; + } + protected set { + width = value; + y1 = y0 + height; + } + } + + /** + * + */ + Rect () { } + + /** + * + */ + Rect.with_abs () { + } + + /** + * + */ + Rect.with_rel () { + } + } +}