Line | |
---|
1 | package {
|
---|
2 | import flash.geom.Point;
|
---|
3 |
|
---|
4 | public class ScreenCoordsBase
|
---|
5 | {
|
---|
6 | public var top:Number;
|
---|
7 | public var left:Number;
|
---|
8 | public var right:Number;
|
---|
9 | public var bottom:Number;
|
---|
10 | public var width:Number;
|
---|
11 | public var height:Number;
|
---|
12 |
|
---|
13 | public function ScreenCoordsBase( top:Number, left:Number, right:Number, bottom:Number ) {
|
---|
14 |
|
---|
15 | this.top = top;
|
---|
16 | this.left = left;
|
---|
17 | this.right = right;
|
---|
18 | this.bottom = bottom;
|
---|
19 |
|
---|
20 | this.width = this.right-this.left;
|
---|
21 | this.height = bottom-top;
|
---|
22 | }
|
---|
23 |
|
---|
24 | //
|
---|
25 | // used by the PIE slices so the pie chart is
|
---|
26 | // centered in the screen
|
---|
27 | //
|
---|
28 | public function get_center_x():Number {
|
---|
29 | return (this.width / 2)+this.left;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public function get_center_y():Number {
|
---|
33 | return (this.height / 2)+this.top;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public function get_y_from_val( i:Number, right_axis:Boolean = false ):Number { return -1; }
|
---|
37 |
|
---|
38 | public function get_x_from_val( i:Number ):Number { return -1; }
|
---|
39 |
|
---|
40 | public function get_get_x_from_pos_and_y_from_val( index:Number, y:Number, right_axis:Boolean = false ):flash.geom.Point {
|
---|
41 | return null;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public function get_y_bottom( right_axis:Boolean = false ):Number {
|
---|
45 | return -1;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public function get_x_from_pos( i:Number ):Number { return -1; }
|
---|
49 | }
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.