#45 CZoomScrollImpl: zoom scale max limit

closed-fixed
None
5
2014-03-21
2005-09-29
Anonymous
No

CZoomScrollImpl: It's nice to have following methods
SetZoomScaleMax() and GetZoomScaleMax().

Discussion

  • Logged In: NO

    --- atlscrl.h 2006-09-21 11:23:13.200772300 +0300
    +++ atlscrl1.h 2006-09-21 10:53:53.021829200 +0300
    @@ -1236,6 +1236,7 @@
    SIZE m_sizeLogPage;
    float m_fZoomScale;
    float m_fZoomScaleMin;
    + float m_fZoomScaleMax;
    float m_fZoomDelta; // Used in ZOOMMODE_IN and
    ZOOMMODE_OUT on left-button click.
    int m_nZoomMode;
    RECT m_rcTrack;
    @@ -1245,6 +1246,7 @@
    CZoomScrollImpl():
    m_fZoomScale(1.0),
    m_fZoomScaleMin(0.5),
    + m_fZoomScaleMax(50.0),
    m_fZoomDelta(0.5),
    m_nZoomMode(ZOOMMODE_OFF),
    m_bTracking(false)
    @@ -1344,7 +1346,7 @@
    {
    ATLASSERT(fZoomScale > 0);

    - if(fZoomScale > 0 && fZoomScale >=
    m_fZoomScaleMin)
    + if(fZoomScale > 0 && fZoomScale >=
    m_fZoomScaleMin && fZoomScale <= m_fZoomScaleMax)
    m_fZoomScale = fZoomScale;
    }

    @@ -1358,11 +1360,21 @@
    m_fZoomScaleMin = fZoomScaleMin;
    }

    + void SetZoomScaleMax(float fZoomScaleMax)
    + {
    + m_fZoomScaleMax = fZoomScaleMax;
    + }
    +
    float GetZoomScaleMin() const
    {
    return m_fZoomScaleMin;
    }

    + float GetZoomScaleMax() const
    + {
    + return m_fZoomScaleMax;
    + }
    +
    void SetZoomDelta(float fZoomDelta)
    {
    ATLASSERT(fZoomDelta >= 0);
    @@ -1392,6 +1404,7 @@
    return;

    fZoomScale = max(fZoomScale, m_fZoomScaleMin);
    + fZoomScale = min(fZoomScale, m_fZoomScaleMax);

    POINT pt = { x, y };
    if(!PtInDevRect(pt))
    @@ -1432,7 +1445,7 @@
    return;

    fZoomScale = max(fZoomScale, m_fZoomScaleMin);
    -
    + fZoomScale = min(fZoomScale, m_fZoomScaleMax);

    POINT pt = { 0 };
    if(bCenter)

     
  • Yury Bura
    Yury Bura
    2006-11-10

    Logged In: YES
    user_id=1178943

    Somebody knows why this feature isn't applied?

    WBR,
    Yury

     


Anonymous


Cancel   Add attachments