Beispiel #1
0
        public CanvasViewGroup(IEditorCanvasScrollbar scrollbar, int vpWidth, int vpHeight)
        {
            EditorCanvas               = new EditorCanvas();
            EditorCanvasRender         = new EditorCanvasRender();
            EditorCanvasScrollHandling = new EditorCanvasScrollHandling();
            CanvasViewport             = new CanvasViewport(0, 0, vpWidth, vpHeight, EditorCanvas);
            CanvasViewport.Scale       = 1.0f;

            EditorCanvas.Width          = 1000;
            EditorCanvas.Height         = 1000;
            EditorCanvasRender.Canvas   = EditorCanvas;
            EditorCanvasRender.Viewport = CanvasViewport;
            EditorCanvasScrollHandling.CanvasScrollbar = scrollbar;
            EditorCanvasScrollHandling.Canvas          = EditorCanvas;
            EditorCanvasScrollHandling.Viewport        = CanvasViewport;
        }
Beispiel #2
0
 public virtual void OnPaint(Graphics graphics, IConvertWorldView convertWorldView)
 {
     EditorCanvasRender.RenderViewport(graphics, convertWorldView);
 }