Changeset 101360 in webkit
- Timestamp:
- Nov 29, 2011 5:00:27 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101359 r101360 1 2011-11-29 Zoltan Herczeg <zherczeg@webkit.org> 2 3 [Qt] Couple of tests have different results on 64 bit and/or in debug mode compared to 32 bit and/or release mode 4 https://bugs.webkit.org/show_bug.cgi?id=52810 5 6 Reviewed by Nikolas Zimmermann. 7 8 Update baseline after switching getCTM() to use double-precision internally. 9 10 * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png: 11 * platform/mac/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt: 12 * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt: 13 * platform/mac/svg/W3C-SVG-1.1/struct-frag-03-t-expected.txt: 14 * platform/mac/svg/custom/non-circular-marker-reference-expected.txt: 15 * platform/mac/svg/custom/non-scaling-stroke-markers-expected.txt: 16 * platform/mac/svg/custom/object-sizing-explicit-width-height-expected.txt: 17 * platform/mac/svg/custom/use-detach-expected.txt: 18 * platform/mac/svg/hixie/links/001-expected.txt: 19 * platform/mac/svg/hixie/viewbox/preserveAspectRatio/001-expected.txt: 20 * platform/mac/svg/text/small-fonts-2-expected.txt: 21 * platform/mac/svg/transforms/text-with-pattern-inside-transformed-html-expected.png: 22 1 23 2011-11-25 Pavel Podivilov <podivilov@chromium.org> 2 24 -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt
r97873 r101360 7 7 RenderSVGPath {rect} at (0,0) size 5x5 [fill={[type=SOLID] [color=#4169E1]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 8 8 RenderSVGResourceMarker {marker} [id="marker2"] [markerUnits=strokeWidth] [ref at (100,100)] [angle=0.00] 9 RenderSVGPath {rect} at (0,0) size 1 6x16[fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]9 RenderSVGPath {rect} at (0,0) size 15x15 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00] 10 10 RenderSVGText {text} at (153,10) size 174x23 contains 1 chunk(s) 11 11 RenderSVGInlineText {#text} at (0,0) size 174x23 -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt
r97873 r101360 4 4 RenderSVGRoot {svg} at (0,0) size 480x360 5 5 RenderSVGContainer {g} at (0,0) size 480x360 6 RenderSVGPath {rect} at (0,0) size 24 1x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]6 RenderSVGPath {rect} at (0,0) size 240x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00] 7 7 RenderSVGPath {rect} at (240,180) size 240x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00] 8 RenderSVGPath {circle} at (0,180) size 24 1x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]8 RenderSVGPath {circle} at (0,180) size 240x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00] 9 9 RenderSVGPath {circle} at (240,0) size 240x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00] 10 10 RenderSVGText {text} at (105,186) size 66x12 contains 1 chunk(s) -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-03-t-expected.txt
r101342 r101360 3 3 layer at (0,0) size 480x360 4 4 RenderSVGRoot {svg} at (58,0) size 364x360 5 RenderSVGContainer {g} at ( 59,0) size 361x3606 RenderSVGPath {rect} at ( 59,0) size 181x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]7 RenderSVGPath {rect} at (2 39,180) size 181x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00]8 RenderSVGPath {circle} at ( 59,180) size 181x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]9 RenderSVGPath {circle} at (2 39,0) size 181x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00]5 RenderSVGContainer {g} at (60,0) size 360x360 6 RenderSVGPath {rect} at (60,0) size 180x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00] 7 RenderSVGPath {rect} at (240,180) size 180x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00] 8 RenderSVGPath {circle} at (60,180) size 180x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00] 9 RenderSVGPath {circle} at (240,0) size 180x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00] 10 10 RenderSVGText {text} at (105,186) size 66x12 contains 1 chunk(s) 11 11 RenderSVGInlineText {#text} at (0,0) size 66x12 -
trunk/LayoutTests/platform/mac/svg/custom/non-circular-marker-reference-expected.txt
r101342 r101360 6 6 RenderSVGResourceMarker {marker} [id="mark"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00] 7 7 RenderSVGPath {circle} at (405,305) size 80x80 [stroke={[type=SOLID] [color=#FF0000] [line cap=ROUND]}] [cx=4.00] [cy=4.00] [r=3.00] 8 RenderSVGPath {path} at (23 4,225) size 331x30 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data="M -5 -2 L 0 -2 L 5 -2"]8 RenderSVGPath {path} at (235,225) size 330x30 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data="M -5 -2 L 0 -2 L 5 -2"] 9 9 RenderSVGPath {path} at (210,320) size 380x80 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"] -
trunk/LayoutTests/platform/mac/svg/custom/non-scaling-stroke-markers-expected.txt
r78704 r101360 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (1 59,234) size 433x2584 RenderSVGRoot {svg} at (160,234) size 432x258 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 6 RenderSVGResourceMarker {marker} [id="arrow1"] [markerUnits=userSpaceOnUse] [ref at (5,5)] [angle=90.00] 7 RenderSVGPath {path} at ( 99,0) size 13x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]7 RenderSVGPath {path} at (100,0) size 12x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"] 8 8 RenderSVGResourceMarker {marker} [id="arrow2"] [markerUnits=strokeWidth] [ref at (5,5)] [angle=90.00] 9 RenderSVGPath {path} at ( 99,0) size 13x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]10 RenderSVGPath {line} at (1 59,234) size 427x12 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow1] [x1=10.00] [y1=40.00] [x2=80.00] [y2=40.00]11 RenderSVGPath {line} at (1 59,468) size 433x24 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow2] [x1=10.00] [y1=80.00] [x2=80.00] [y2=80.00]9 RenderSVGPath {path} at (100,0) size 12x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"] 10 RenderSVGPath {line} at (160,234) size 426x12 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow1] [x1=10.00] [y1=40.00] [x2=80.00] [y2=40.00] 11 RenderSVGPath {line} at (160,468) size 432x24 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow2] [x1=10.00] [y1=80.00] [x2=80.00] [y2=80.00] -
trunk/LayoutTests/platform/mac/svg/custom/object-sizing-explicit-width-height-expected.txt
r97873 r101360 8 8 RenderView at (0,0) size 175x275 9 9 layer at (0,0) size 175x275 10 RenderSVGRoot {svg} at (0, 49) size 175x17611 RenderSVGPath {rect} at (0, 49) size 175x176[fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]12 RenderSVGPath {circle} at (70,1 19) size 35x36[fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00]10 RenderSVGRoot {svg} at (0,50) size 175x175 11 RenderSVGPath {rect} at (0,50) size 175x175 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00] 12 RenderSVGPath {circle} at (70,120) size 35x35 [fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00] 13 13 RenderText {#text} at (175,261) size 4x18 14 14 text run at (175,261) width 4: " " … … 17 17 RenderView at (0,0) size 175x275 18 18 layer at (0,0) size 175x275 19 RenderSVGRoot {svg} at (0, 49) size 175x17620 RenderSVGPath {rect} at (0, 49) size 175x176[fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]21 RenderSVGPath {circle} at (70,1 19) size 35x36[fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00]19 RenderSVGRoot {svg} at (0,50) size 175x175 20 RenderSVGPath {rect} at (0,50) size 175x175 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00] 21 RenderSVGPath {circle} at (70,120) size 35x35 [fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00] 22 22 RenderText {#text} at (354,261) size 4x18 23 23 text run at (354,261) width 4: " " … … 26 26 RenderView at (0,0) size 175x275 27 27 layer at (0,0) size 175x275 28 RenderSVGRoot {svg} at (0, 49) size 175x17629 RenderSVGPath {rect} at (0, 49) size 175x176[fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]30 RenderSVGPath {circle} at (70,1 19) size 35x36[fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00]28 RenderSVGRoot {svg} at (0,50) size 175x175 29 RenderSVGPath {rect} at (0,50) size 175x175 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00] 30 RenderSVGPath {circle} at (70,120) size 35x35 [fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00] 31 31 RenderText {#text} at (533,261) size 4x18 32 32 text run at (533,261) width 4: " " … … 35 35 RenderView at (0,0) size 175x275 36 36 layer at (0,0) size 175x275 37 RenderSVGRoot {svg} at (0, 49) size 175x17638 RenderSVGPath {rect} at (0, 49) size 175x176[fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]39 RenderSVGPath {circle} at (70,1 19) size 35x36[fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00]37 RenderSVGRoot {svg} at (0,50) size 175x175 38 RenderSVGPath {rect} at (0,50) size 175x175 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00] 39 RenderSVGPath {circle} at (70,120) size 35x35 [fill={[type=SOLID] [color=#008000]}] [cx=150.00] [cy=150.00] [r=30.00] 40 40 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/svg/custom/use-detach-expected.txt
r101342 r101360 3 3 layer at (0,0) size 800x600 4 4 RenderSVGRoot {svg} at (112,12) size 688x236 5 RenderSVGContainer {g} at (112,12) size 24 1x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(5.00,5.00)}]5 RenderSVGContainer {g} at (112,12) size 240x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(5.00,5.00)}] 6 6 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 7 7 RenderSVGText {text} at (41,20) size 17x14 contains 1 chunk(s) 8 8 RenderSVGInlineText {#text} at (0,0) size 17x14 9 9 chunk 1 (middle anchor) text run 1 at (41.88,31.00) startOffset 0 endOffset 3 width 16.25: "use" 10 RenderSVGPath {circle} at (220,96) size 2 5x25[fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00]11 RenderSVGContainer {g} at (208,57) size 4 9x6512 RenderSVGContainer {use} at (208,57) size 4 9x4213 RenderSVGContainer {g} at (208,57) size 4 9x4210 RenderSVGPath {circle} at (220,96) size 24x24 [fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00] 11 RenderSVGContainer {g} at (208,57) size 48x65 12 RenderSVGContainer {use} at (208,57) size 48x42 13 RenderSVGContainer {g} at (208,57) size 48x42 14 14 RenderSVGText {text} at (41,20) size 17x14 contains 1 chunk(s) 15 15 RenderSVGInlineText {#text} at (0,0) size 17x14 … … 18 18 RenderSVGContainer {g} at (218,94) size 28x28 19 19 RenderSVGPath {circle} at (218,94) size 28x28 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00] 20 RenderSVGPath {rect} at (112,12) size 24 1x120 [opacity=0.20] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]20 RenderSVGPath {rect} at (112,12) size 240x120 [opacity=0.20] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00] 21 21 RenderSVGContainer {g} at (124,141) size 676x107 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,70.00)}] 22 22 RenderSVGText {text} at (0,-11) size 291x44 contains 1 chunk(s) -
trunk/LayoutTests/platform/mac/svg/hixie/links/001-expected.txt
r78704 r101360 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (2 49,90) size 301x4205 RenderSVGContainer {a} at (2 49,90) size 301x1806 RenderSVGPath {circle} at (2 49,90) size 181x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=30.00] [r=15.00]4 RenderSVGRoot {svg} at (250,90) size 300x420 5 RenderSVGContainer {a} at (250,90) size 300x180 6 RenderSVGPath {circle} at (250,90) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=30.00] [r=15.00] 7 7 RenderSVGPath {circle} at (370,90) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=60.00] [cy=30.00] [r=15.00] 8 RenderSVGContainer {a} at (2 49,330) size 301x1809 RenderSVGContainer {g} at (2 49,330) size 301x18010 RenderSVGPath {circle} at (2 49,330) size 181x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=70.00] [r=15.00]8 RenderSVGContainer {a} at (250,330) size 300x180 9 RenderSVGContainer {g} at (250,330) size 300x180 10 RenderSVGPath {circle} at (250,330) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=70.00] [r=15.00] 11 11 RenderSVGPath {circle} at (370,330) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=60.00] [cy=70.00] [r=15.00] -
trunk/LayoutTests/platform/mac/svg/hixie/viewbox/preserveAspectRatio/001-expected.txt
r101342 r101360 3 3 layer at (0,0) size 800x600 4 4 RenderSVGRoot {svg} at (97,0) size 606x600 5 RenderSVGPath {rect} at ( 99,0) size 601x600 [fill={[type=SOLID] [color=#000080]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]5 RenderSVGPath {rect} at (100,0) size 600x600 [fill={[type=SOLID] [color=#000080]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 6 6 RenderSVGPath {line} at (97,0) size 606x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=100.00] [y2=100.00] 7 7 RenderSVGPath {line} at (97,0) size 606x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=100.00] [y1=0.00] [x2=0.00] [y2=100.00] -
trunk/LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt
r101342 r101360 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (1 59,0) size 493x5315 RenderSVGContainer {g} at (1 59,0) size 282x76 [transform={m=((0.10,0.00)(0.00,0.10)) t=(10.00,10.00)}]4 RenderSVGRoot {svg} at (160,0) size 492x531 5 RenderSVGContainer {g} at (160,0) size 281x76 [transform={m=((0.10,0.00)(0.00,0.10)) t=(10.00,10.00)}] 6 6 RenderSVGText {text} at (0,-109) size 467x135 contains 1 chunk(s) 7 7 RenderSVGInlineText {#text} at (0,0) size 467x135 8 8 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 466.67: "0,1,2,3,4" 9 RenderSVGContainer {g} at (1 59,84) size 283x84 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,25.00)}]9 RenderSVGContainer {g} at (160,84) size 282x84 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,25.00)}] 10 10 RenderSVGText {text} at (0,-11) size 47x14 contains 1 chunk(s) 11 11 RenderSVGInlineText {#text} at (0,0) size 47x14 12 12 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 46.67: "0,1,2,3,4" 13 RenderSVGContainer {g} at (1 59,168) size 289x144 [transform={m=((12.00,0.00)(0.00,12.00)) t=(10.00,40.00)}]13 RenderSVGContainer {g} at (160,168) size 288x144 [transform={m=((12.00,0.00)(0.00,12.00)) t=(10.00,40.00)}] 14 14 RenderSVGText {text} at (0,-1) size 4x2 contains 1 chunk(s) 15 15 RenderSVGInlineText {#text} at (0,0) size 4x2 16 16 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 3.89: "0,1,2,3,4" 17 RenderSVGContainer {g} at (1 59,186) size 289x288 [transform={m=((24.00,0.00)(0.00,24.00)) t=(10.00,55.00)}]17 RenderSVGContainer {g} at (160,186) size 288x288 [transform={m=((24.00,0.00)(0.00,24.00)) t=(10.00,55.00)}] 18 18 RenderSVGText {text} at (0,-1) size 2x1 contains 1 chunk(s) 19 19 RenderSVGInlineText {#text} at (0,0) size 2x1 20 20 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 1.94: "0,1,2,3,4" 21 RenderSVGContainer {g} at (1 59,375) size 493x156 [transform={m=((0.30,0.00)(0.00,0.30)) t=(10.00,65.00)}]21 RenderSVGContainer {g} at (160,375) size 492x156 [transform={m=((0.30,0.00)(0.00,0.30)) t=(10.00,65.00)}] 22 22 RenderSVGText {text} at (0,-8) size 273x85 contains 1 chunk(s) 23 23 RenderSVGTSpan {tspan} at (0,0) size 223x10 -
trunk/Source/WebCore/ChangeLog
r101359 r101360 1 2011-11-29 Zoltan Herczeg <zherczeg@webkit.org> 2 3 [Qt] Couple of tests have different results on 64 bit and/or in debug mode compared to 32 bit and/or release mode 4 https://bugs.webkit.org/show_bug.cgi?id=52810 5 6 Reviewed by Nikolas Zimmermann. 7 8 This avoids precision loss in getCTM, which is used whenever mapping repaint rects to a parent coordinate system 9 - it affects several DRT results on Mac, all of them are progressions. 10 11 * svg/SVGPreserveAspectRatio.cpp: 12 (WebCore::SVGPreserveAspectRatio::getCTM): Use double-precision internally. 13 1 14 2011-11-25 Pavel Podivilov <podivilov@chromium.org> 2 15 -
trunk/Source/WebCore/svg/SVGPreserveAspectRatio.cpp
r99645 r101360 249 249 } 250 250 251 AffineTransform SVGPreserveAspectRatio::getCTM(float logic X, float logicY, float logicWidth, float logicHeight, float physWidth, float physHeight) const251 AffineTransform SVGPreserveAspectRatio::getCTM(float logicalX, float logicalY, float logicalWidth, float logicalHeight, float physicalWidth, float physicalHeight) const 252 252 { 253 253 AffineTransform transform; … … 255 255 return transform; 256 256 257 float logicalRatio = logicWidth / logicHeight; 258 float physRatio = physWidth / physHeight; 257 double extendedLogicalX = logicalX; 258 double extendedLogicalY = logicalY; 259 double extendedLogicalWidth = logicalWidth; 260 double extendedLogicalHeight = logicalHeight; 261 double extendedPhysicalWidth = physicalWidth; 262 double extendedPhysicalHeight = physicalHeight; 263 double logicalRatio = extendedLogicalWidth / extendedLogicalHeight; 264 double physicalRatio = extendedPhysicalWidth / extendedPhysicalHeight; 259 265 260 266 if (m_align == SVG_PRESERVEASPECTRATIO_NONE) { 261 transform.scaleNonUniform( physWidth / logicWidth, physHeight / logicHeight);262 transform.translate(- logicX, -logicY);267 transform.scaleNonUniform(extendedPhysicalWidth / extendedLogicalWidth, extendedPhysicalHeight / extendedLogicalHeight); 268 transform.translate(-extendedLogicalX, -extendedLogicalY); 263 269 return transform; 264 270 } 265 271 266 if ((logicalRatio < phys Ratio && (m_meetOrSlice == SVG_MEETORSLICE_MEET)) || (logicalRatio >= physRatio && (m_meetOrSlice == SVG_MEETORSLICE_SLICE))) {267 transform.scaleNonUniform( physHeight / logicHeight, physHeight / logicHeight);272 if ((logicalRatio < physicalRatio && (m_meetOrSlice == SVG_MEETORSLICE_MEET)) || (logicalRatio >= physicalRatio && (m_meetOrSlice == SVG_MEETORSLICE_SLICE))) { 273 transform.scaleNonUniform(extendedPhysicalHeight / extendedLogicalHeight, extendedPhysicalHeight / extendedLogicalHeight); 268 274 269 275 if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMINYMID || m_align == SVG_PRESERVEASPECTRATIO_XMINYMAX) 270 transform.translate(- logicX, -logicY);276 transform.translate(-extendedLogicalX, -extendedLogicalY); 271 277 else if (m_align == SVG_PRESERVEASPECTRATIO_XMIDYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMID || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMAX) 272 transform.translate(- logicX - (logicWidth - physWidth * logicHeight / physHeight) / 2, -logicY);278 transform.translate(-extendedLogicalX - (extendedLogicalWidth - extendedPhysicalWidth * extendedLogicalHeight / extendedPhysicalHeight) / 2, -extendedLogicalY); 273 279 else 274 transform.translate(- logicX - (logicWidth - physWidth * logicHeight / physHeight), -logicY);280 transform.translate(-extendedLogicalX - (extendedLogicalWidth - extendedPhysicalWidth * extendedLogicalHeight / extendedPhysicalHeight), -extendedLogicalY); 275 281 276 282 return transform; 277 283 } 278 284 279 transform.scaleNonUniform( physWidth / logicWidth, physWidth / logicWidth);285 transform.scaleNonUniform(extendedPhysicalWidth / extendedLogicalWidth, extendedPhysicalWidth / extendedLogicalWidth); 280 286 281 287 if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMAXYMIN) 282 transform.translate(- logicX, -logicY);288 transform.translate(-extendedLogicalX, -extendedLogicalY); 283 289 else if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMID || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMID || m_align == SVG_PRESERVEASPECTRATIO_XMAXYMID) 284 transform.translate(- logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth) / 2);290 transform.translate(-extendedLogicalX, -extendedLogicalY - (extendedLogicalHeight - extendedPhysicalHeight * extendedLogicalWidth / extendedPhysicalWidth) / 2); 285 291 else 286 transform.translate(- logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth));292 transform.translate(-extendedLogicalX, -extendedLogicalY - (extendedLogicalHeight - extendedPhysicalHeight * extendedLogicalWidth / extendedPhysicalWidth)); 287 293 288 294 return transform;
Note: See TracChangeset
for help on using the changeset viewer.