Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D369017587 for ; Wed, 30 Sep 2015 08:51:02 +0000 (UTC) Received: (qmail 61669 invoked by uid 500); 30 Sep 2015 08:50:59 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 61606 invoked by uid 500); 30 Sep 2015 08:50:59 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 61598 invoked by uid 99); 30 Sep 2015 08:50:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2015 08:50:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7A3CBDFF0D; Wed, 30 Sep 2015 08:50:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bigosmallm@apache.org To: commits@flex.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/develop] - Handle case where fill could be a LinearGradient or a SolidColor Date: Wed, 30 Sep 2015 08:50:59 +0000 (UTC) Repository: flex-asjs Updated Branches: refs/heads/develop 28c5972bb -> 3c8b08728 Handle case where fill could be a LinearGradient or a SolidColor Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3c8b0872 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3c8b0872 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3c8b0872 Branch: refs/heads/develop Commit: 3c8b087281c79af445de51ec3e8c3dfac660ac19 Parents: 28c5972 Author: OmPrakash Muppirala Authored: Wed Sep 30 10:48:21 2015 +0200 Committer: OmPrakash Muppirala Committed: Wed Sep 30 10:48:47 2015 +0200 ---------------------------------------------------------------------- .../charts/supportClasses/BoxItemRenderer.as | 22 ++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3c8b0872/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as index 1bec3b1..f94bf84 100644 --- a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as +++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/supportClasses/BoxItemRenderer.as @@ -25,6 +25,7 @@ package org.apache.flex.charts.supportClasses import org.apache.flex.core.graphics.IStroke; import org.apache.flex.core.graphics.Rect; import org.apache.flex.core.graphics.SolidColor; + import org.apache.flex.core.graphics.LinearGradient; import org.apache.flex.html.supportClasses.DataItemRenderer; /** @@ -230,7 +231,7 @@ package org.apache.flex.charts.supportClasses } } - private var hoverFill:SolidColor; + private var hoverFill:IFill; override public function updateRenderer():void { @@ -238,9 +239,22 @@ package org.apache.flex.charts.supportClasses if (down||selected||hovered) { if (hoverFill == null) { - hoverFill = new SolidColor(); - hoverFill.color = (fill as SolidColor).color; - hoverFill.alpha = 0.5; + if(fill is SolidColor) + { + hoverFill = new SolidColor(); + (hoverFill as SolidColor).color = (fill as SolidColor).color; + (hoverFill as SolidColor).alpha = 0.5; + } + else if(fill is LinearGradient) + { + hoverFill = new LinearGradient(); + (hoverFill as LinearGradient).entries = (fill as LinearGradient).entries; + for (var i:int=0; i<(hoverFill as LinearGradient).entries; i++) + { + (hoverFill as LinearGradient).entries[i].alpha = 0.5; + } + } + } filledRect.fill = hoverFill; }