~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/svg/SVGPreserveAspectRatio.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
    double svgar = physWidth / physHeight;
179
179
 
180
180
    if (align() == SVG_PRESERVEASPECTRATIO_NONE) {
181
 
        temp.scale(physWidth / logicWidth, physHeight / logicHeight);
 
181
        temp.scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
182
182
        temp.translate(-logicX, -logicY);
183
183
    } else if (vpar < svgar && (meetOrSlice() == SVG_MEETORSLICE_MEET) || vpar >= svgar && (meetOrSlice() == SVG_MEETORSLICE_SLICE)) {
184
 
        temp.scale(physHeight / logicHeight, physHeight / logicHeight);
 
184
        temp.scaleNonUniform(physHeight / logicHeight, physHeight / logicHeight);
185
185
 
186
186
        if (align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMINYMID || align() == SVG_PRESERVEASPECTRATIO_XMINYMAX)
187
187
            temp.translate(-logicX, -logicY);
190
190
        else
191
191
            temp.translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight), -logicY);
192
192
    } else {
193
 
        temp.scale(physWidth / logicWidth, physWidth / logicWidth);
 
193
        temp.scaleNonUniform(physWidth / logicWidth, physWidth / logicWidth);
194
194
 
195
195
        if (align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMIDYMIN || align() == SVG_PRESERVEASPECTRATIO_XMAXYMIN)
196
196
            temp.translate(-logicX, -logicY);