Hi,

I'm observing some strange behavior regarding the clipContent of a
Canvas as applied to some lines that are programatically drawn via one
of its grandchildren's Sprite.graphics object.  What I am seeing is
that the clipContent property is not respected by its grandchildren
(kids these days have no respect) if the intermediate child is not
outside of the Canvas's boundaries.

A diagram might help me explain this better:

<Canvas id="workspace" width="200" height="200" clipContent="true">
  <UIComponent id="drawingLayer" width="200" height="200"/>
</Canvas>

If I programatically add children to "drawingLayer", and then use
those children's "graphics" property to draw lines programatically,
the lines will appear outside of "workspace".

What is interesting is that if I change the width and height of
"drawingLayer" to 201 (so that a part of "drawingLayer" appears
outside the boundaries of "workspace"), then the
"workspace.clipContent" is respected and the lines are clipped as
expected.  Unfortunately, I cannot use this as a workaround because
"workspace" needs its scroll policies set to "auto" for other reasons,
and having "drawingLayer" outside of "workspace" would cause
undesirable scroll bars.

Am I describing a known bug?  (Btw I can post a 20-line sample
application that demonstrates this.)

Thanks in advance!

Erik

Reply via email to