see inline.
> Hi everyone!
>
[quoted text clipped - 34 lines]
> {
> e.Graphics.TranslateTransform(0, deltaY);
[ you probably need to the transfer on the BufferedGraphics
buff.Graphics.TranslateTransform(0, deltaY);
> buff.Render(e.Graphics);
> }
[quoted text clipped - 5 lines]
> Is there a way to render the BufferedGraphics object over the OnPaint's
> Graphics object, but translated?
ZQ - 24 Mar 2006 20:21 GMT
Thanks for your response!
I considered that, and buff.Graphics.TranslateTransform(0, deltaY) has no
effect whatsoever.
TranslateTransform does it's transformations only on things that are drawn
AFTER it is called.
In this case:
1. a lot of things are drawn to buff.Graphics at time X
2. inside OnPaint(), buff.Graphics is rendered to the e.Graphics (everything
shows up on screen ok)
3. when user clicks a button only deltaY changes, nothing new is drawn on
buff.Graphics -- therefore, if I call the
buff.Graphics.TranslateTransform(0, deltaY) now, it won't apply to anything
because nothing is drawn after that
4. i call this.Invlidate() to refresh the control and display the translated
drawings
5. inside OnPaint(), buff.Graphics is rendered to the e.Graphics (it is
supposed to be on a new location, but it seems impossible)
I expected it to be normal that e.Graphics.translateTransform (...) would
affect everything that is rendered to e.Graphics from bufferedGraphics, but
that doesn't seem to be right.
It seems to me all I can do is optimize the GenerateGraphics method.
> see inline.
>
[quoted text clipped - 48 lines]
>> Is there a way to render the BufferedGraphics object over the OnPaint's
>> Graphics object, but translated?