class CCL::ScaleZoomer

Overview

Calculates zooming and scrolling with a zoomLock position. More…

#include <scale.h>

class ScaleZoomer
{
public:
    // construction

    ScaleZoomer (Scale* scale);

    // methods

    PROPERTY_VARIABLE (Coord, zoomLock, ZoomLock);
    bool setZoomLock (Coord start, Coord end);
    bool setZoomLock (RectRef rect);
    void zoom (float deltaZoom, Coord deltaScroll = 0);
    void setZoomFactor (float zoom, Coord deltaScroll = 0);
    void setUnitsPerPixel (double newUnitsPerPixel);
};

Detailed Documentation

Calculates zooming and scrolling with a zoomLock position.

Methods

PROPERTY_VARIABLE (Coord, zoomLock, ZoomLock)

selects coord based on scale orientation

bool setZoomLock (Coord start, Coord end)

the pixel range that should stay visible

bool setZoomLock (RectRef rect)

selects range based on scale orientation

void setZoomFactor (float zoom, Coord deltaScroll = 0)

deltaZoom, deltaScroll are base on the initial state