The DesktopControl is designed to provide a natural feel with scroll, zoom and rotate gestures (Cocoa only). Scrolling is handled by assigning a value to ScrollingLayerSize. You may then call RefreshRectScrollingLayer when a part of the layer has changed. The PaintScrollingLayer Event will then be fired, allowing the drawing code to proceed. The same is true for the DragLayer and OverlayLayer
One of the benefits of this system is that non-visible areas will not be drawn, but will remain "dirty" until they become visible reducing cpu usage. When dirty areas in the ScrollingLayer, DragLayer, and/or OverlayLayer overlap, then areas are combined to reduce rendering steps.
When scrolling with a Magic Trackpad, the trackpad's inertial scrolling superceeds the DesktopCanvas's inertial scrolling for a natural feel.
Zooming with a Magic Trackpad will focus the zoom area so as to keep the same point in the image under the mouse pointer through the zoom gesture.
The DesktopCanvas has several modes: Raster - The ScrollingLayer is rendered at 1:1 and scaled to zoom Vector - The PaintScrollingLayer event is given a zoom factor for rendering, so rendering always appears at screen resolution. Hybrid - Uses Raster mode when under 100% zoom and Vector otherwise ReverseHybrid - Uses Vector mode when under 100% zoom and Raster otherwise
ScrollingImage and OverlayImage are non-dynamic versions of the similarly named dynamic layers and can be assigned in the IDE or at runtime. To use piDogScrollingCanvas in your Xojo app, simply drag the DesktopCanvas to a window and add needed events. License piDogScrollingCanvas is a custom DesktopCanvas subclass by piDog Software and is a part of the piDog Bundle for Xojo.
As a licensed user you have the right to use this class in your Xojo projects. Reverse engineering or breaking the encryption is prohibited.