In progress...

This commit is contained in:
Kolan Sh 2018-01-19 21:31:59 +03:00
parent ca8340946b
commit 7fcacaed2d
2 changed files with 41 additions and 10 deletions

View File

@ -4,6 +4,7 @@ namespace CairoChart {
* Grid of the {@link Series}. * Grid of the {@link Series}.
*/ */
public class Grid { public class Grid {
/*public enum GridType { /*public enum GridType {
PRICK_LINE = 0, // default PRICK_LINE = 0, // default
LINE LINE

View File

@ -1,47 +1,62 @@
namespace CairoChart { namespace CairoChart {
/** /**
* * {@link Series} place at the {@link Chart}.
*/ */
public class Place { public class Place {
double _x_min = 0; double _x_min = 0;
double _x_max = 0; double _x_max = 0;
double _y_min = 0; double _y_min = 0;
double _y_max = 0; double _y_max = 0;
/**
*
*/
public double x_min { public double x_min {
get { return _x_min; } get { return _x_min; }
set { _x_min = zoom_x_min = value; } set { _x_min = zoom_x_min = value; }
default = 0; default = 0;
} }
/**
*
*/
public double x_max { public double x_max {
get { return _x_max; } get { return _x_max; }
set { _x_max = zoom_x_max = value; } set { _x_max = zoom_x_max = value; }
default = 0; default = 0;
} }
/**
*
*/
public double y_min { public double y_min {
get { return _y_min; } get { return _y_min; }
set { _y_min = zoom_y_min = value; } set { _y_min = zoom_y_min = value; }
default = 0; default = 0;
} }
/**
*
*/
public double y_max { public double y_max {
get { return _y_max; } get { return _y_max; }
set { _y_max = zoom_y_max = value; } set { _y_max = zoom_y_max = value; }
default = 0; default = 0;
} }
public Cairo.Rectangle zoom = Cairo.Rectangle() {
x = 0, x = 0, width = 1, height = 1
};
public double zoom_x_min = 0; public double zoom_x_min = 0;
public double zoom_x_max = 1; public double zoom_x_max = 1;
public double zoom_y_min = 0; public double zoom_y_min = 0;
public double zoom_y_max = 1; public double zoom_y_max = 1;
public virtual Place copy () { /**
var place = new Place (); *
place.x_min = this.x_min; */
place.x_max = this.x_max;
place.y_min = this.y_min;
place.y_max = this.y_max;
return place;
}
public Place (double x_min = 0, public Place (double x_min = 0,
double x_max = 1, double x_max = 1,
double y_min = 0, double y_min = 0,
@ -57,6 +72,21 @@ namespace CairoChart {
zoom_y_max = y_max; zoom_y_max = y_max;
} }
/**
*
*/
public virtual Place copy () {
var place = new Place ();
place.x_min = this.x_min;
place.x_max = this.x_max;
place.y_min = this.y_min;
place.y_max = this.y_max;
return place;
}
/**
*
*/
public virtual void unzoom () { public virtual void unzoom () {
zoom_x_min = x_min; zoom_x_min = x_min;
zoom_x_max = x_max; zoom_x_max = x_max;