incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Federico Jakimowicz <polacof...@outlook.com>
Subject RE: TLF2 Background manager
Date Tue, 20 Nov 2012 18:50:20 GMT
Well, I have managed to make my custom background to be invoked by the framework,However I'm
having a tough time calculating the height of the background to cover all the space between
two lines.Specially when lines have different sizes and using lineHeight in the style.
How can I get the space between two textlines? I mean the line totalHeight + any other space
TLF or Flex adds between the lines.Background alignment starts geting uggly when I add styles
like:{lineHeight:"120%";leadingModel:box;dominantBaseline:auto;baselineShift:-4;alignmentBaseline:useDominantBaseline;}maybe
my styles are wrong

> From: polacofede@outlook.com
> To: flex-dev@incubator.apache.org
> Subject: RE: TLF2 Background manager
> Date: Thu, 15 Nov 2012 10:39:51 -0300
> 
> I will take a look at it and let you know.
> thanks Alex!
> 
> > From: aharui@adobe.com
> > To: flex-dev@incubator.apache.org
> > Date: Wed, 14 Nov 2012 07:57:00 -0800
> > Subject: Re: TLF2 Background manager
> > 
> > Well, once you see "tlf_internal" (or mx_internal, for that matter), that
> > implies that there isn't official support.
> > 
> > I'm not the expert in this code, but in a quick grep of it, it looks like
> > you can assign a backgroundManager to the textFlow.  IIRC, there is logic
> > that chooses which Factory to use for textlines and maybe you want to figure
> > out how to control that so it doesn't use TextFlowTextLineFactory and one of
> > the other ones that might honor the textFlow's backgroundManager, or maybe
> > it is just a bug and the factory should be checking for and using the
> > textflow's backgroundManager.
> > 
> > 
> > On 11/14/12 6:40 AM, "Federico Jakimowicz" <polacofede@outlook.com> wrote:
> > 
> > > Hi,
> > > I have been trying for quite a while to setup a custom BackgroundManager by
> > > specifiying a customFlowComposerClass that extends StandardFlowComposer and
> > > provides me with a custom BackgroundManager.I expected that when the textflow
> > > invokes :
> > > TextFlow#tlf_internal function getBackgroundManager():BackgroundManager{ if
> > > (!_backgroundManager && (flowComposer is
> > > StandardFlowComposer))  _backgroundManager = (flowComposer as
> > > StandardFlowComposer).createBackgroundManager() return _backgroundManager;}
> > > it retrieves my custom backgroundmanager from my custom flowcomposer.
> > > However when rendering the text the TextFlowTextLineFactory seems to get it's
> > > own FlowComposer which in turn has it's own configuration and
> > > backgroundmanager. ( Check TextFlowTextLineFactory#createTextLinesInternal
)
> > > I'm really having a nightmare with this. I know I can draw in the background
> > > directly and without using the BackgroundManager however since the framework
> > > seems to allow the developer to customize it's configuration I really believe
> > > that using the configuration is the real way to go. I think TLF should be easy
> > > to customize and that it was done with that in mind.Does someone has a way
to
> > > go through this?
> > > Another alternative could be downloading the source of TLF and creating my
own
> > > version of the library in one hand that would be an overkill and in the other
> > > hand I don't know how to build the TLF library project (if someone could
> > > provide some tutorial on how to do it would be cool too).
> > > thanks in advance,
> > > Polaco.
> > > 
> > > 
> > > 
> > > 
> > >  
> > 
> > -- 
> > Alex Harui
> > Flex SDK Team
> > Adobe Systems, Inc.
> > http://blogs.adobe.com/aharui
> > 
>  		 	   		  
 		 	   		  
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message