Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/open-flash-chart/actionscript/rrectangle.as')
-rw-r--r--libs/open-flash-chart/actionscript/rrectangle.as36
1 files changed, 36 insertions, 0 deletions
diff --git a/libs/open-flash-chart/actionscript/rrectangle.as b/libs/open-flash-chart/actionscript/rrectangle.as
new file mode 100644
index 0000000000..23c76aecce
--- /dev/null
+++ b/libs/open-flash-chart/actionscript/rrectangle.as
@@ -0,0 +1,36 @@
+// JG - I copied this from :
+// http://www.actionscript.org/showMovie.php?id=1183
+//
+// Rounded rectangle made only with actionscript.
+// Code taken and modified from http://www.actionscript-toolbox.com
+// w = rectangle width
+// h = rectangle height
+// rad = rounded corner radius
+// x = x start point for rectangle
+// y = y start point for rectangle
+//
+//
+// If you have any questions about this script mail me: janiss@cc.lv
+//
+MovieClip.prototype.rrectangle = function(w, h, rad, x, y, stroke, fill) {
+ // added by JG on 30th May 07
+ x = Math.round(x);
+ y = Math.round(y);
+ w = Math.round(w);
+ h = Math.round(h);
+ //
+ this.lineStyle(stroke.width, stroke.color, stroke.alpha);
+ this.beginFill(fill.color, fill.alpha);
+ this.moveTo(0+rad, 0);
+ this.lineTo(w-rad, 0);
+ this.curveTo(w, 0, w, rad);
+ this.lineTo(w, h-rad);
+ this.curveTo(w, h, w-rad, h);
+ this.lineTo(0+rad, h);
+ this.curveTo(0, h, 0, h-rad);
+ this.lineTo(0, 0+rad);
+ this.curveTo(0, 0, 0+rad, 0);
+ this.endFill();
+ this._x = x;
+ this._y = y;
+}; \ No newline at end of file