On 2/29/16, 6:37 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
<omup...@gmail.com on behalf of bigosma...@gmail.com> 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