Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/painting/qstroker_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    125125                                    void *data);
    126126
     127// qtransform.cpp
     128Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
     129
    127130class Q_GUI_EXPORT QStrokerOps
    128131{
     
    162165    void setClipRect(const QRectF &clip) { m_clip_rect = clip; }
    163166
     167    void setCurveThresholdFromTransform(const QTransform &transform)
     168    {
     169        qreal scale;
     170        qt_scaleForTransform(transform, &scale);
     171        m_dashThreshold = scale == 0 ? qreal(0.5) : (qreal(0.5) / scale);
     172    }
     173
     174    void setCurveThreshold(qfixed threshold) { m_curveThreshold = threshold; }
     175    qfixed curveThreshold() const { return m_curveThreshold; }
     176
    164177protected:
    165178    inline void emitMoveTo(qfixed x, qfixed y);
     
    171184
    172185    QRectF m_clip_rect;
     186    qfixed m_curveThreshold;
     187    qfixed m_dashThreshold;
    173188
    174189    void *m_customData;
     
    209224    qfixed miterLimit() const { return m_miterLimit; }
    210225
    211     void setCurveThreshold(qfixed threshold) { m_curveThreshold = threshold; }
    212     qfixed curveThreshold() const { return m_curveThreshold; }
    213 
    214226    void joinPoints(qfixed x, qfixed y, const QLineF &nextLine, LineJoinMode join);
    215227    inline void emitMoveTo(qfixed x, qfixed y);
     
    228240    qfixed m_strokeWidth;
    229241    qfixed m_miterLimit;
    230     qfixed m_curveThreshold;
    231242
    232243    LineJoinMode m_capStyle;
Note: See TracChangeset for help on using the changeset viewer.