On Tue, Dec 25, 2012 at 8:48 PM, Brian Matherly <[email protected]> wrote:
>>It works based on number of characters in the text.
>
>>When I use geometry as 0/0:50%x100%:100,  it does not place text at 
>>0(zero'th) pixel if the
>>    * text has less number of characters (say 4 characters)
>>    * text alignment is right
>  What I need is, I need to place text at any position on the frame with  any 
> number of characters and with center, left and right alignments.
>>
>>I was trying to specify X position in geometry for center alignment as follows
>>    * X =   Xposition - ( frameWidth - textWidth ) / 2
>>    * Y = 0
>>    * W = 100%
>>    * H = 100%For example, if
>>Xposition = 0 ( text should be placed at 0 (zero'th) pixel)
>>frameWidth = 854
>>textWidth = 285
>>
>>Now, X will be -284 and geometry will be -284/0:100%x100%
>>
>>If I want place the same text with center alignment at 100 th pixel ( 
>>Xposition = 100 ) on the frame then geometry will be   -184/0:100%x100%
>>
>>
>>For right alignment, X =   Xposition - ( frameWidth - textWidth )
>>
>>
>>If I could get X value using these formulas, I think text is being placed 
>>close to required position.
>>For this the thing what I need is, textWidth and it varies from number of 
>>characters.
>>Is there any way to get value of text width ?
>
>
> I don't think there is any way for you to get the value of "textWidth". I can 
> think of two options:
>
> 1) Specify a fixed width font (courier) so that you can manually align the 
> text by adding spaces in front of words.
>
> 2) I suppose Dan was right about you wanting to specify separate text and 
> geometry alignment. In my opinion, this is an esoteric use case and not worth 
> adding to the dynamic text filter (especially if you aren't using the keyword 
> substitution feature). You should just build the producer/transition 
> combination yourself. Consider this melt command:
>
> ./melt colour:blue out=50 -track pango:"+lineone~line2.txt" out=50 
> align=right -transition composite in=0 out=50 halign=left valign=center 
> geometry="0/0:50%x100%:100"
>

Or, melt: ... -attach watermark:pango producer.markup="multiple
lines" ...

> You can change the pango align attribute to be anything you want, as long as 
> the composite halign attribute is always "left", the leftmost pixel will be 
> at "0".
>
> ~BM

There are definitely situations where a filter is much more suitable
to use than a multitrack and transition (at the authoring level). I am
not saying dynamictext needs to fit the bill, but if the watermark and
affine filters are not working as needed, then a patch (not
necessarily from you, Brian) is welcome.

-- 
+-DRD-+

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to