Re: [flexcoders] Adding stroke to text or bitmap at runtime

2012-04-26 Thread Alex Harui
I’m still not sure I understand.  Why do you have to add Stroke components?  
You can just call graphics APIs on them.

If you must use components, can you overlay or underlay them in a Group 
parenting the Label?


On 4/25/12 12:59 AM, dorkiedorkfromdorkt...@gmail.com 
dorkiedorkfromdorkt...@gmail.com wrote:






I'm looking for more of something like this:

s:Label text=Hello Filters!
s:stroke
s:SolidColorStroke weight=4 color=#ABCDEF/
/s:stroke
/s:Label

or this:

s:Label text=Hello Filters!
s:filters
s:SolidColorStrokeFilter weight=4 color=#ABCDEF/
/s:filters
/s:Label

On Fri, Apr 13, 2012 at 12:15 AM, Alex Harui aha...@adobe.com wrote:





In Spark controls, you can add children to the TextLine like a sprite.




On 4/12/12 5:43 PM, dorkiedorkfromdorkt...@gmail.com 
http://dorkiedorkfromdorkt...@gmail.com  dorkiedorkfromdorkt...@gmail.com 
http://dorkiedorkfromdorkt...@gmail.com  wrote:






How would you add a stroke to dynamic text at runtime? If that's not possible 
how would you add a stroke to a bitmap (snapshot of text)?





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-26 Thread Alex Harui
What are the steps to reproduce the problem?


On 4/20/12 12:54 AM, Wouter Schreuders wschreud...@gmail.com wrote:






I've made a simple test case in which I can replicate the problem. If anyone 
feels like having a look you can download it here:

http://www.filefactory.com/file/6oz4m4wrkx31/n/DataGridRender_zip



On 4 April 2012 23:12, Alex Harui aha...@adobe.com wrote:





Do you have a simple test case?




On 4/4/12 8:43 AM, Wouter Schreuders wschreud...@gmail.com 
http://wschreud...@gmail.com  wrote:






spark DG

On 4 April 2012 17:28, Alex Harui aha...@adobe.com http://aha...@adobe.com  
wrote:





MX or Spark DG?





On 4/4/12 12:05 AM, Wouter Schreuders wschreud...@gmail.com 
http://wschreud...@gmail.com  http://wschreud...@gmail.com  wrote:






I thought that that may be the case, so I removed all my custom itemrenderers 
but the problem remains, I've also noticed that the problem only occurs after I 
have entered a date range, if I stick with the standard date range then problem 
doesn't occur.

On 3 April 2012 22:23, Alex Harui aha...@adobe.com http://aha...@adobe.com  
http://aha...@adobe.com  wrote:





That sounds more like an issue with custom renderers.




On 4/3/12 4:47 AM, Wouter Schreuders wschreud...@gmail.com 
http://wschreud...@gmail.com  http://wschreud...@gmail.com  
http://wschreud...@gmail.com  wrote:






Hi All

I've run into a rendering problem with the datagrid.

I have a datagrid that a user can search using a date range, furthermore the 
user can also search using keywords. I do this by first looking at the date 
range and applying a filter to the array of objects based on the dates. Then I 
make of a copy of that arraycollection and assign the arraycollection which 
binds to my datagrid to that collection.

The problem is that when the user selects a date range and I apply the filter, 
the datagrid content disappears. The scrollbar on the side updates though and 
if I scroll down then the content appears and renders correctly. I've tried the 
following post refresh commands but none of them solve the problem.

(datagrid.dataProvider as ArrayCollection).refresh();
datagrid .invalidateSkinState();
datagrid .invalidateDisplayList();
datagrid .validateNow();

Here's the code where I get the date range.

var dateFilteredArray:Array = _transactions.source.filter(
function (item:Transaction, index:int, array:Array):Boolean
{
if(Date.parse(item.displayDate)  dateRangeComponent.startDate.valueOf() || 
Date.parse(item.displayDate)  dateRangeComponent.endDate.valueOf())
return false
else
return true //item is inside date range
}
);
_dateFilteredCollection = new ArrayCollection(dateFilteredArray);

Anyone run into this before?





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-26 Thread Wouter Schreuders
Hi Alex

To replicate the problem.

- launch the app (it will populate the datagrid with values)

- choose a different date in the date picker on the top left

- the dataprovider will get updated but the datagrid doesn't update
properly, instead it just remains blank

- use the scroller on the right-hand side to scroll through the datagrid,
the datagrid will then render properly

Thanks

Wouter

On 26 April 2012 08:37, Alex Harui aha...@adobe.com wrote:

 **


 What are the steps to reproduce the problem?



 On 4/20/12 12:54 AM, Wouter Schreuders wschreud...@gmail.com wrote:






 I've made a simple test case in which I can replicate the problem. If
 anyone feels like having a look you can download it here:

 http://www.filefactory.com/file/6oz4m4wrkx31/n/DataGridRender_zip



 On 4 April 2012 23:12, Alex Harui aha...@adobe.com wrote:






 Do you have a simple test case?




 On 4/4/12 8:43 AM, Wouter Schreuders wschreud...@gmail.com 
 http://wschreud...@gmail.com  wrote:






 spark DG


 On 4 April 2012 17:28, Alex Harui aha...@adobe.com 
 http://aha...@adobe.com  wrote:






 MX or Spark DG?






 On 4/4/12 12:05 AM, Wouter Schreuders wschreud...@gmail.com 
 http://wschreud...@gmail.com  http://wschreud...@gmail.com  wrote:






 I thought that that may be the case, so I removed all my custom
 itemrenderers but the problem remains, I've also noticed that the problem
 only occurs after I have entered a date range, if I stick with the standard
 date range then problem doesn't occur.

 On 3 April 2012 22:23, Alex Harui aha...@adobe.com 
 http://aha...@adobe.com  http://aha...@adobe.com  wrote:






 That sounds more like an issue with custom renderers.




 On 4/3/12 4:47 AM, Wouter Schreuders wschreud...@gmail.com 
 http://wschreud...@gmail.com  http://wschreud...@gmail.com  
 http://wschreud...@gmail.com  wrote:






 Hi All

 I've run into a rendering problem with the datagrid.

 I have a datagrid that a user can search using a date range, furthermore
 the user can also search using keywords. I do this by first looking at the
 date range and applying a filter to the array of objects based on the
 dates. Then I make of a copy of that arraycollection and assign the
 arraycollection which binds to my datagrid to that collection.

 The problem is that when the user selects a date range and I apply the
 filter, the datagrid content disappears. The scrollbar on the side updates
 though and if I scroll down then the content appears and renders correctly.
 I've tried the following post refresh commands but none of them solve the
 problem.

 (datagrid.dataProvider as ArrayCollection).refresh();
 datagrid .invalidateSkinState();
 datagrid .invalidateDisplayList();
 datagrid .validateNow();

 Here's the code where I get the date range.

 var dateFilteredArray:Array = _transactions.source.filter(
 function (item:Transaction, index:int, array:Array):Boolean
 {
 if(Date.parse(item.displayDate)  dateRangeComponent.startDate.valueOf()
 || Date.parse(item.displayDate)  dateRangeComponent.endDate.valueOf())
 return false
 else
 return true //item is inside date range
 }
 );
 _dateFilteredCollection = new ArrayCollection(dateFilteredArray);

 Anyone run into this before?





 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui

  



Re: [flexcoders] Adding stroke to text or bitmap at runtime

2012-04-26 Thread dorkie dork from dorktown
I want to add a stroke (a border or outline) to the *edge* of the text or
image itself.

For example, the text and the image in this screenshot show what I'd like
to do,
http://blog.spoongraphics.co.uk/wp-content/uploads/2011/cafe-racer/retro-cafe-racer-ad.jpg.


There are filters that add drop shadow or a glow around the non-transparent
pixels (content) of a display object. But no one in the world has been able
to create a filter to add a stroke.

On Thu, Apr 26, 2012 at 1:05 AM, Alex Harui aha...@adobe.com wrote:

 **


 I’m still not sure I understand.  Why do you have to add Stroke
 components?  You can just call graphics APIs on them.

 If you must use components, can you overlay or underlay them in a Group
 parenting the Label?



 On 4/25/12 12:59 AM, dorkiedorkfromdorkt...@gmail.com 
 dorkiedorkfromdorkt...@gmail.com wrote:






 I'm looking for more of something like this:

 s:Label text=Hello Filters!
 s:stroke
 s:SolidColorStroke weight=4 color=#ABCDEF/
 /s:stroke
 /s:Label

 or this:

 s:Label text=Hello Filters!
 s:filters
 s:SolidColorStrokeFilter weight=4 color=#ABCDEF/
 /s:filters
 /s:Label

 On Fri, Apr 13, 2012 at 12:15 AM, Alex Harui aha...@adobe.com wrote:






 In Spark controls, you can add children to the TextLine like a sprite.




 On 4/12/12 5:43 PM, dorkiedorkfromdorkt...@gmail.com 
 http://dorkiedorkfromdorkt...@gmail.com  
 dorkiedorkfromdorkt...@gmail.com http://dorkiedorkfromdorkt...@gmail.com
  wrote:






 How would you add a stroke to dynamic text at runtime? If that's not
 possible how would you add a stroke to a bitmap (snapshot of text)?





 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui

  



Re: [flexcoders] Adding stroke to text or bitmap at runtime

2012-04-26 Thread dorkie dork from dorktown
The picture I linked is not that clear. Here is a clearer picture and the
article,
http://www.blog.spoongraphics.co.uk/wp-content/uploads/2011/cafe-racer/13.jpg
http://internetwebsitedesign.biz/design/how-to-create-a-retro-cafe-racer-motorcycle-ad-design

What he is doing at design time I want to do at runtime.

On Thu, Apr 26, 2012 at 8:41 PM, dorkie dork from dorktown 
dorkiedorkfromdorkt...@gmail.com wrote:

 I want to add a stroke (a border or outline) to the *edge* of the text or
 image itself.

 For example, the text and the image in this screenshot show what I'd like
 to do,
 http://blog.spoongraphics.co.uk/wp-content/uploads/2011/cafe-racer/retro-cafe-racer-ad.jpg.


 There are filters that add drop shadow or a glow around the
 non-transparent pixels (content) of a display object. But no one in the
 world has been able to create a filter to add a stroke.

 On Thu, Apr 26, 2012 at 1:05 AM, Alex Harui aha...@adobe.com wrote:

 **


 I’m still not sure I understand.  Why do you have to add Stroke
 components?  You can just call graphics APIs on them.

 If you must use components, can you overlay or underlay them in a Group
 parenting the Label?



 On 4/25/12 12:59 AM, dorkiedorkfromdorkt...@gmail.com 
 dorkiedorkfromdorkt...@gmail.com wrote:






 I'm looking for more of something like this:

 s:Label text=Hello Filters!
 s:stroke
 s:SolidColorStroke weight=4 color=#ABCDEF/
 /s:stroke
 /s:Label

 or this:

 s:Label text=Hello Filters!
 s:filters
 s:SolidColorStrokeFilter weight=4 color=#ABCDEF/
 /s:filters
 /s:Label

 On Fri, Apr 13, 2012 at 12:15 AM, Alex Harui aha...@adobe.com wrote:






 In Spark controls, you can add children to the TextLine like a sprite.




 On 4/12/12 5:43 PM, dorkiedorkfromdorkt...@gmail.com 
 http://dorkiedorkfromdorkt...@gmail.com  
 dorkiedorkfromdorkt...@gmail.com http://dorkiedorkfromdorkt...@gmail.com
  wrote:






 How would you add a stroke to dynamic text at runtime? If that's not
 possible how would you add a stroke to a bitmap (snapshot of text)?





 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui