WebCanvas with scroll bars?

Any sample classes on how to do a webCanvas that has horizontal and verital scroll bars and handles graphic drawings that might be ‘off screen’?

Why not place it onto a WebContainer that will do all that for you ?

So do I have to grow the dimensions of the canvas as my drawing grows past the canvas dimensions?
I’m not sure at the begging of my drawing how big a canvas I need.

[quote=185300:@Brian O’Brien]So do I have to grow the dimensions of the canvas as my drawing grows past the canvas dimensions?
I’m not sure at the begging of my drawing how big a canvas I need.[/quote]
Couldn’t you just resize your canvas if you need it to be bigger?

That is what I was thinking but was worried about repaints etc…

If you’re drawing then change what you’re drawing it actually does a “diff” to only send the new changes. Whether this works with resizes too I’m not sure. @Greg O’Lone Would be the person to ask.

I’m thinking that for what I want to do the web canvas is just not fast enough.
It seems to me it creates a bit map image and then transfers that to the browser…

I usually just embed containerControls within containerControls to do whatever I need. This tends to work better than canvas and is much faster.

You can draw lines with arrow heads with container controls?

You can do whatever you want on a container control just as any other view. Your Container Control itself could have canvases or webImageViews on it.

Perhaps a better question would be, what are you trying to create/do?

simple uml sequence diagrams.
boxes lines arrows text.
but due to the width and height of the canvas necessary the webCanvas object tends to be too slow…
I think because it tries to make a bitmap image of the rendered graphics then upload it to the browser.
This is why i was contemplating moving to javascript and html5 canvas stuff…
but then you said Container Controls and I though it might be a good idea…

[quote=185487:@Brian O’Brien]simple uml sequence diagrams.
boxes lines arrows text.
but due to the width and height of the canvas necessary the webCanvas object tends to be too slow…
I think because it tries to make a bitmap image of the rendered graphics then upload it to the browser.
This is why i was contemplating moving to javascript and html5 canvas stuff…
but then you said Container Controls and I though it might be a good idea…[/quote]

I recently compared drawing to a WebCanvas and to a picture. It appears that for some reason WebCanvas has a much higher resolution. That may explain why it is so slow. Because indeed it is much slower than displaying a picture in a WebImageViewer (Image Well).

As far as I can see in the pages code, the WebImageViewer is just HTML. So no need to look for HTML5.

<div id="JKyslhzl" style="opacity: 1; visibility: visible; height: 157px; min-height: 157px; max-height: 157px; left: 513px; top: 568px;" class=""><img src="http://127.0.0.1:8080/3630A996268FE4D0082E3122AB83023C/files/5319-6750-9554-8017-8017/picture.png" alt="" border="0" style="position: absolute; width: 97px; height: 116px; top: 50%; margin-top: -58px; left: 50%; margin-left: -48.5px;" id="JKyslhzl_image" class="" width="97" height="116"></div>

You may want to try drawing your diagram to a picture, and display it that way. It may be way faster.

Off screen rendering is another possible solution, but I’m also warming up to the idea of embedding container controls with various widths and heights containing different objects depending on what it is I’m trying to draw… rectangles or text or lines and arrows…
I’m just wondering what the ‘top’ (or bottom) object I should be embedding these objects into.