sorry, first part of my message wasn't really applicable, since you were
trying to use the inner canvas for clipping, not the outer, but the code
should work OK.

On Fri, Sep 5, 2008 at 8:51 AM, Doug McCune <[EMAIL PROTECTED]> wrote:

> Guy, your inner cnavas takes up 100% width, so as far as yourouter canvas
> knows, it doesn't need to clip the children. clipContent doesn't force
> clipping, it simply turns it on if needed, and the Canvas determines if it
> needs clipping based on whether any of the children are placed outside of
> the visible bounds.
>
> I usually just add a dummy UIComponent object and place it at -1,-1 in the
> canvas. So try this:
>
> <mx:Canvas clipContent="true" id="containerLayer" bottom="0"
> left="350" top="0" right="0" horizontalScrollPolicy="off"
> verticalScrollPolicy="off" >
> <mx:Canvas id="dynamicLayer" clipContent="true" width="100%"
> height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
> <mx:UIComponent x="-'1" y="-1" />
> </mx:Canvas>
> </mx:Canvas>
>
>
> On Fri, Sep 5, 2008 at 7:40 AM, Danny Gold <[EMAIL PROTECTED]> wrote:
>
>>   Does clipContent clip the Graphics object or just DisplayObject
>> children?
>>
>>
>> On Fri, Sep 5, 2008 at 8:37 AM, Guy Morton <[EMAIL PROTECTED]> wrote:
>>
>>>   Hi Mike
>>>
>>> I know for sure that the graphics are being drawn outside the enclosing
>>> canvas, because the child canvas is drawing x values < 0 and these aren't
>>> being clipped but are visible outside the map area.
>>>
>>> Guy
>>>
>>> On 05/09/2008, at 9:51 PM, Michael Schmalle wrote:
>>>
>>>
>>> Hi Guy,
>>>
>>> Are you actually measuring the graphics that you draw (in a sub
>>> component, the child of the canvas)?
>>>
>>> Is there a possibility that canvas is not knowing if the graphics are
>>> extending passed what it THINKS is the measured width and height?
>>>
>>> Mike
>>>
>>> On Thu, Sep 4, 2008 at 7:43 PM, Guy Morton <[EMAIL PROTECTED]> wrote:
>>>
>>>> I have a problem in that clipContent seems to intermittently not clip
>>>> the content in a layer as I imagine it should.
>>>>
>>>> The graphics in the layer are drawn using the graphics class and the
>>>> layer is inside another Canvas, eg
>>>>
>>>> <mx:Canvas clipContent="true" id="containerLayer" bottom="0"
>>>> left="350" top="0" right="0" horizontalScrollPolicy="off"
>>>> verticalScrollPolicy="off" >
>>>> <mx:Canvas id="dynamicLayer" clipContent="true" width="100%"
>>>> height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" />
>>>> </mx:Canvas>
>>>>
>>>> MOST of the time the content drawn in the nested canvas is clipped
>>>> correctly, but sometimes it spills over the content to the left of the
>>>> containing canvas.
>>>>
>>>> Anyone got any ideas as to why this happens and how to prevent it?
>>>>
>>>> TIA
>>>>
>>>> Guy
>>>>
>>>>
>>>
>>>
>>> --
>>> Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>>
>>> Teoti Graphix Blog
>>> http://www.blog.teotigraphix.com
>>>
>>> You can find more by solving the problem then by 'asking the question'.
>>>
>>>
>>>
>>  
>>
>
>

Reply via email to