Hmm, I'm not sure if there is a good solution for this.  Here are the
scenarios which could trigger this behavior:

<s:TextInput x="0" *y="10000"* width="100" height="100" text="Hello"/>
<s:TextInput *x="10000" *y="0" width="100" height="100" text="Hello"/>
<s:TextInput x="0" y="0"* width="10000" *height="100" text="Hello"/>
<s:TextInput x="0" y="0" width="100" *height="10000"* text="Hello"/>

The StageText.viewPort has a hard limit of -8192 to 8191 for its x and y
values.

Is there a good way to solve this for for all cases?

Thanks,
Om

On Tue, Mar 1, 2016 at 12:10 AM, OmPrakash Muppirala <[email protected]>
wrote:

> You are right.  There is more to this.  Let me take a look at the math
> again...
>
> Thanks,
> Om
>
> On Mon, Feb 29, 2016 at 9:07 PM, Alex Harui <[email protected]> wrote:
>
>>
>>
>> On 2/29/16, 6:37 PM, "[email protected] on behalf of OmPrakash Muppirala"
>> <[email protected] on behalf of [email protected]> wrote:
>>
>> >
>> >This piece of code is calculating the StageText object's global viewport
>> >rectangle wrt stage co-ordinates.  Viewport is defined as: 'The area on
>> >the
>> >stage in which the StageText object is displayed. The default is the zero
>> >rect.'
>> >
>> >This viewport is used to capture a bitmap of the stagetext and replace
>> the
>> >image the place of the stagetext object while scrolling.  So, any
>> viewport
>> >bounds that is outside the stage can be safely clipped to the bounds of
>> >the
>> >stage.
>>
>> I don't know this code at all, but isn't the goal to make sure no part of
>> the viewport extends out past 8192 pixels?
>> It seems to me that if the globalRect.x was -1000 and width was 500, this
>> change would set globalRect.x = 0 and thus set the viewport to 500 visible
>> pixels.
>>
>> IOW, by setting globalRect.x, you are moving the left edge of the viewport
>> to either the right edge of the stage or the left edge of the stage.
>> Moving it to the left edge of the viewport to the left edge of the stage
>> results in visible pixels.  Did you intend to move the right edge of the
>> viewport to the left edge of the stage when the StageText is off-screen to
>> the left?
>>
>> Of course, I could be wrong again...
>>
>> -Alex
>>
>>
>

Reply via email to