You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/09/06 03:14:14 UTC
[1/3] git commit: [flex-asjs] [refs/heads/develop] - Remove redundant
fill-opacity attribute
Repository: flex-asjs
Updated Branches:
refs/heads/develop 715a5ac76 -> 5f6058379
Remove redundant fill-opacity attribute
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/35efe0fd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/35efe0fd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/35efe0fd
Branch: refs/heads/develop
Commit: 35efe0fd0eb51945e5880cfcbc8624f32fceaaf2
Parents: 715a5ac
Author: Om <bi...@gmail.com>
Authored: Fri Sep 5 17:35:58 2014 -0700
Committer: Om <bi...@gmail.com>
Committed: Fri Sep 5 17:35:58 2014 -0700
----------------------------------------------------------------------
examples/build.xml | 2 --
.../FlexJSUI/src/org/apache/cordova/camera/Camera.as | 10 +++++-----
.../src/org/apache/flex/maps/google/beads/MapView.as | 8 ++++----
.../js/FlexJS/src/org/apache/flex/core/graphics/Rect.js | 1 -
4 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/35efe0fd/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
index cd0e363..5e18e37 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -74,7 +74,6 @@
</target>
<target name="compile" description="Compile Examples">
- <ant dir="${basedir}/CordovaCameraExample"/>
<ant dir="${basedir}/DataBindingTest"/>
<ant dir="${basedir}/DataGridExample"/>
<ant dir="${basedir}/DesktopMap"/>
@@ -109,7 +108,6 @@
</target>
<target name="clean" description="Cleans all SWCs and their resource bundles">
- <ant dir="${basedir}/CordovaCameraExample" target="clean"/>
<ant dir="${basedir}/DataBindingTest" target="clean"/>
<ant dir="${basedir}/DataGridExample" target="clean"/>
<ant dir="${basedir}/DesktopMap" target="clean"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/35efe0fd/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as b/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
index 3984b44..2102807 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
@@ -25,9 +25,9 @@ package org.apache.cordova.camera
import flash.events.ActivityEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
- import flash.filesystem.File;
+/* import flash.filesystem.File;
import flash.filesystem.FileMode;
- import flash.filesystem.FileStream;
+ import flash.filesystem.FileStream;*/
import flash.geom.Rectangle;
import flash.media.Camera;
import flash.media.Video;
@@ -133,7 +133,7 @@ package org.apache.cordova.camera
private function savePicture():void
{
- var f:File = File.createTempFile();
+/* var f:File = File.createTempFile();
var bd:BitmapData = new BitmapData(camera.width, camera.height, false);
var pix:ByteArray = new ByteArray();
var rect:Rectangle = new Rectangle(0, 0, camera.width, camera.height);
@@ -143,10 +143,10 @@ package org.apache.cordova.camera
var png:PNGEncoder = new PNGEncoder();
var ba:ByteArray = png.encode(bd);
var fs:FileStream = new FileStream();
- fs.open(f, FileMode.WRITE);
+ fs.open(f, FileMod.WRITE);
fs.writeBytes(ba);
fs.close();
- cameraSuccess(f.url);
+ cameraSuccess(f.url);*/
}
public function cleanup( cameraSuccess:Function, cameraError:Function ) : void
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/35efe0fd/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
index 5e71187..210e305 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
@@ -19,7 +19,7 @@
package org.apache.flex.maps.google.beads
{
import flash.events.Event;
- import flash.html.HTMLLoader;
+/* import flash.html.HTMLLoader;*/
import flash.net.URLRequest;
import org.apache.flex.core.BeadViewBase;
@@ -57,7 +57,7 @@ package org.apache.flex.maps.google.beads
{
}
- private var _loader:HTMLLoader;
+ private var _loader:Object;
/**
* @copy org.apache.flex.core.IBead#strand
@@ -71,7 +71,7 @@ package org.apache.flex.maps.google.beads
{
super.strand = value;
- _loader = new HTMLLoader();
+/* _loader = new HTMLLoader();*/
_loader.x = 0;
_loader.y = 0;
_loader.width = UIBase(value).width;
@@ -84,7 +84,7 @@ package org.apache.flex.maps.google.beads
model.addEventListener("zoomChanged", handleZoomChange);
model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
- (_strand as UIBase).addChild(_loader);
+/* (_strand as UIBase).addChild(_loader);*/
var token:String = Map(_strand).token;
if (token)
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/35efe0fd/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
index e1cf279..35ebda8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
@@ -55,7 +55,6 @@ org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y, width, he
rect.setAttribute('y', String(this.get_stroke().get_weight()));
rect.setAttribute('width', String(width));
rect.setAttribute('height', String(height));
- rect.setAttribute('fill-opacity', String(this.get_fill().get_alpha()));
this.element.appendChild(rect);
this.resize(x,y,width+this.get_stroke().get_weight()*2,height+this.get_stroke().get_weight()*2);
};
[3/3] git commit: [flex-asjs] [refs/heads/develop] - Revert changes
to these files (was not supposed to commit it)
Posted by bi...@apache.org.
Revert changes to these files (was not supposed to commit it)
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5f605837
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5f605837
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5f605837
Branch: refs/heads/develop
Commit: 5f6058379490325e84de019cefb6378de4077ee5
Parents: 5f12977
Author: Om <bi...@gmail.com>
Authored: Fri Sep 5 18:12:58 2014 -0700
Committer: Om <bi...@gmail.com>
Committed: Fri Sep 5 18:12:58 2014 -0700
----------------------------------------------------------------------
examples/build.xml | 2 ++
.../FlexJSUI/src/org/apache/cordova/camera/Camera.as | 10 +++++-----
.../src/org/apache/flex/maps/google/beads/MapView.as | 8 ++++----
3 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f605837/examples/build.xml
----------------------------------------------------------------------
diff --git a/examples/build.xml b/examples/build.xml
index 5e18e37..cd0e363 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -74,6 +74,7 @@
</target>
<target name="compile" description="Compile Examples">
+ <ant dir="${basedir}/CordovaCameraExample"/>
<ant dir="${basedir}/DataBindingTest"/>
<ant dir="${basedir}/DataGridExample"/>
<ant dir="${basedir}/DesktopMap"/>
@@ -108,6 +109,7 @@
</target>
<target name="clean" description="Cleans all SWCs and their resource bundles">
+ <ant dir="${basedir}/CordovaCameraExample" target="clean"/>
<ant dir="${basedir}/DataBindingTest" target="clean"/>
<ant dir="${basedir}/DataGridExample" target="clean"/>
<ant dir="${basedir}/DesktopMap" target="clean"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f605837/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as b/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
index 2102807..3984b44 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/cordova/camera/Camera.as
@@ -25,9 +25,9 @@ package org.apache.cordova.camera
import flash.events.ActivityEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
-/* import flash.filesystem.File;
+ import flash.filesystem.File;
import flash.filesystem.FileMode;
- import flash.filesystem.FileStream;*/
+ import flash.filesystem.FileStream;
import flash.geom.Rectangle;
import flash.media.Camera;
import flash.media.Video;
@@ -133,7 +133,7 @@ package org.apache.cordova.camera
private function savePicture():void
{
-/* var f:File = File.createTempFile();
+ var f:File = File.createTempFile();
var bd:BitmapData = new BitmapData(camera.width, camera.height, false);
var pix:ByteArray = new ByteArray();
var rect:Rectangle = new Rectangle(0, 0, camera.width, camera.height);
@@ -143,10 +143,10 @@ package org.apache.cordova.camera
var png:PNGEncoder = new PNGEncoder();
var ba:ByteArray = png.encode(bd);
var fs:FileStream = new FileStream();
- fs.open(f, FileMod.WRITE);
+ fs.open(f, FileMode.WRITE);
fs.writeBytes(ba);
fs.close();
- cameraSuccess(f.url);*/
+ cameraSuccess(f.url);
}
public function cleanup( cameraSuccess:Function, cameraError:Function ) : void
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f605837/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
index 210e305..5e71187 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
@@ -19,7 +19,7 @@
package org.apache.flex.maps.google.beads
{
import flash.events.Event;
-/* import flash.html.HTMLLoader;*/
+ import flash.html.HTMLLoader;
import flash.net.URLRequest;
import org.apache.flex.core.BeadViewBase;
@@ -57,7 +57,7 @@ package org.apache.flex.maps.google.beads
{
}
- private var _loader:Object;
+ private var _loader:HTMLLoader;
/**
* @copy org.apache.flex.core.IBead#strand
@@ -71,7 +71,7 @@ package org.apache.flex.maps.google.beads
{
super.strand = value;
-/* _loader = new HTMLLoader();*/
+ _loader = new HTMLLoader();
_loader.x = 0;
_loader.y = 0;
_loader.width = UIBase(value).width;
@@ -84,7 +84,7 @@ package org.apache.flex.maps.google.beads
model.addEventListener("zoomChanged", handleZoomChange);
model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
-/* (_strand as UIBase).addChild(_loader);*/
+ (_strand as UIBase).addChild(_loader);
var token:String = Map(_strand).token;
if (token)
[2/3] git commit: [flex-asjs] [refs/heads/develop] - Draw circles!
Posted by bi...@apache.org.
Draw circles!
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5f12977f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5f12977f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5f12977f
Branch: refs/heads/develop
Commit: 5f12977fd4199edb95d0c7b50589266f440fd619
Parents: 35efe0f
Author: Om <bi...@gmail.com>
Authored: Fri Sep 5 18:10:34 2014 -0700
Committer: Om <bi...@gmail.com>
Committed: Fri Sep 5 18:10:34 2014 -0700
----------------------------------------------------------------------
examples/FlexJSTest_SVG/src/GraphicsView.mxml | 20 +++++++
.../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 1 +
.../src/org/apache/flex/core/graphics/Circle.as | 39 +++++++++++++
.../src/org/apache/flex/core/graphics/Circle.js | 59 ++++++++++++++++++++
4 files changed, 119 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f12977f/examples/FlexJSTest_SVG/src/GraphicsView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSTest_SVG/src/GraphicsView.mxml b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
index 7a68173..5f097d3 100644
--- a/examples/FlexJSTest_SVG/src/GraphicsView.mxml
+++ b/examples/FlexJSTest_SVG/src/GraphicsView.mxml
@@ -24,6 +24,7 @@ limitations under the License.
>
<fx:Script>
<![CDATA[
+ import org.apache.flex.core.graphics.Circle;
import org.apache.flex.core.graphics.Ellipse;
import org.apache.flex.core.graphics.Rect;
import org.apache.flex.core.graphics.SolidColor;
@@ -109,6 +110,25 @@ limitations under the License.
ellipse3.stroke = stroke;
ellipse3.drawEllipse(250,150,300,250);
this.addElement(ellipse3);
+
+ var circle1:Circle = new Circle();
+ fill.color = 0xee11bb;
+ circle1.fill = fill;
+ stroke.color = 0x123456;
+ stroke.weight = 2;
+ circle1.stroke = stroke;
+ circle1.drawCircle(700,300,200);
+ this.addElement(circle1);
+
+ var circle2:Circle = new Circle();
+ fill.color = 0xabbaab;
+ fill.alpha = 0.8;
+ circle2.fill = fill;
+ stroke.color = 0xccff11;
+ stroke.weight = 5;
+ circle2.stroke = stroke;
+ circle2.drawCircle(100,700,100);
+ this.addElement(circle2);
}
]]>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f12977f/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 2df8fce..b27a2ba 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -122,6 +122,7 @@ internal class FlexJSUIClasses
import org.apache.flex.core.graphics.GraphicShape; GraphicShape;
import org.apache.flex.core.graphics.Rect; Rect;
import org.apache.flex.core.graphics.Ellipse; Ellipse;
+ import org.apache.flex.core.graphics.Circle; Circle;
import org.apache.flex.core.graphics.SolidColor; SolidColor;
import org.apache.flex.core.graphics.SolidColorStroke; SolidColorStroke;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f12977f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
new file mode 100644
index 0000000..b02e978
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Circle.as
@@ -0,0 +1,39 @@
+package org.apache.flex.core.graphics
+{
+
+ public class Circle extends GraphicShape
+ {
+
+ private var _x:Number;
+ private var _y:Number;
+ private var _width:Number;
+ private var _height:Number;
+
+ /**
+ * Draw the circle.
+ * @param x The x location of the center of the circle
+ * @param y The y location of the center of the circle.
+ * @param radius The radius of the circle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function drawCircle(x:Number, y:Number, radius:Number):void
+ {
+ graphics.clear();
+ if(stroke)
+ {
+ graphics.lineStyle(stroke.weight,stroke.color,stroke.alpha);
+ }
+ if(fill)
+ {
+ graphics.beginFill(fill.color,fill.alpha);
+ }
+ graphics.drawCircle(x,y,radius);
+ graphics.endFill();
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5f12977f/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
new file mode 100644
index 0000000..b044c92
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Circle.js
@@ -0,0 +1,59 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.core.graphics.Circle');
+
+goog.require('org.apache.flex.core.graphics.GraphicShape');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.graphics.GraphicShape}
+ */
+org.apache.flex.core.graphics.Circle = function() {
+ org.apache.flex.core.graphics.Circle.base(this, 'constructor');
+
+};
+goog.inherits(org.apache.flex.core.graphics.Circle,
+ org.apache.flex.core.graphics.GraphicShape);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.graphics.Circle.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'Circle',
+ qName: 'org.apache.flex.core.graphics.Circle' }] };
+
+
+/**
+ * @expose
+ * @param {number} x The x location of the center of the circle
+ * @param {number} y The x location of the center of the circle
+ * @param {number} radius The radius of the circle.
+ */
+org.apache.flex.core.graphics.Circle.prototype.drawCircle = function(x, y, radius) {
+ var style = this.getStyleStr();
+ var circle = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse');
+ circle.setAttribute('style', style);
+ circle.setAttribute('cx', String(radius + this.get_stroke().get_weight() ));
+ circle.setAttribute('cy', String(radius + this.get_stroke().get_weight() ));
+ circle.setAttribute('rx', String(radius));
+ circle.setAttribute('ry', String(radius));
+ this.element.appendChild(circle);
+ this.resize(x-radius,y-radius,radius*2+this.get_stroke().get_weight()*2,radius*2+this.get_stroke().get_weight()*2);
+};