Created attachment 53482 [details] Re-size SVG Error Test-Kit When an SVG picture is re-sized within LibreOffice WRITER then the SVG image renders incorrectly. Please see the "Untitled 1.pdf" and "Untitled 2.pdf" files. Notice that the line width of the boxes becomes thicker when the SVG picture is re-sized. This should not happen with SVG pictures. As an example, we tested the desired functionality in the Master: LibO-dev 3.5.0 Build ID: a7553b2-533e3c6-ca7e6f5-9125509 On OSX 10.6.8 Located at: http://dev-builds.libreoffice.org/daily/MacOSX_10.6.7_Intel_no-moz/master/2011-11-13_01.04.10/ with master~2011-11-13_01.04.10_LibO-Dev_OOO350m1_MacOS_x86_install_en-US.dmg Steps to reproduce: 1. Use a Web browser or Graphic Editor to find and save an SVG picture. 2. Open a new WRITER Text Document 3. Select Insert -> Picture -> From File... (We inserted layer_1.svg, layer_2.svg, and layer_3.svg) 4. Click on an SVG picture (for example, layer_1.svg) and re-size the picture. 5. Select File -> Export as PDF.... 6. Keep the default settings then click Export (see the PDF files). Expected results: SVG image will retain its functionality and will re-size correctly, etc. Actual results: SVG image re-sizes incorrectly; the five pixel width line around the boxes become thicker. See attachment for sample documents. Please also note that the SVG images are not scalable within the generated PDF files; they become bit-mapped images.
Please note that this "bug" might be related to Bug 41995.
I have some difficulties to understand what problem we are talking about. Editing? Viewing? Export? I see no new problem with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) German UI [(Build ID: 6b0de40-0bc4ff4-ca7e6f5-9125509-ce71330)]" (111111). My steps how to reproduce: 1. open "Untitled 1.odt" 2. delete all pictures except the most top one 3. Click the remaining picture (control points appear) 4. <control+c> 5. click somewhere into the document 6. <control+v> (control points appear 7. Drag and drop new picture below old one (now you see twins pictures, control points still visible) 8. Move mouse pointer to middle bottom control point (mouse pointer view changes to "resize") 9. press Shift key and drag/drop middle bottom control point down until picture fills complete document width, then release shift and mouse button 10. Compare pictures I can't see anything unexpected, of course the rectangles border lines of the rectangles become thicker, the ratio of border line width to rectangle diameter remains, that's expected and something completely different from editing a rectangle (not a picture containing rectangles). @rk601@yahoo.com Please see "mysample.odt", the operation you did is the same as case 1 in that document, not case 2 What has the PDF export to do with the supposed resize problems? If there is a problem, do you really see it as a new problem in Master or is it already visible in earlier versions? Please: - Write a meaningful Summary - Attach screenshots with comments if you believe that that might explain the problem better than a text comment. Best way is to insert your screenshots into a DRAW document and to add comments that explain what you want to show - Contribute a step by step instruction containing every key press and every mouse click how to reproduce your problem (and if possible how to created a sample document from the scratch) - add information -- what EXACTLY is unexpected -- and WHY do you believe it's unexpected (cite Help or Documentation!) -- everything else crossing your mind after you read linked texts
Created attachment 53499 [details] Sample document See Comment 2
Created attachment 53516 [details] Default Example Re-size in Illustrator The above "Example Re-size in Illustrator.zip" shows the default behavior of resizing SVG pictures in Illustrator (the depicted examples is the same default behavior in most robust SVG-Editors). In Illustrator and most other SVG editors, a person can control wether or not the stroke size gets scaled or stays the same. An example of changing the default behavior within Illustrator is with the “Transform” palette (Window > Transform). This can be very useful for things like medical drawings, maps, logos, etc where control over the SVG pictures must be maintained and everything must look exactly the same at every size. @Rainer Bielefeld The example "mysample.odt" file that you created is an example of how LibreOffice does NOT, by default, provide the same behavior as other SVG-Editors and continues to demonstrate how LibreOffice is having problems with SVG. You wrote, "I can't see anything unexpected, of course the rectangles border lines of the rectangles become thicker, the ratio of border line width to rectangle diameter remains, that's expected and something completely different from editing a rectangle (not a picture containing rectangles)." According to tbehrens@novell.com in Bug 41995, he states, "...So what LibreOffice will do, starting with 3.5, is by default store true .svg files." A "true .svg" behaves differently from bit-mapped pictures (which is a main reason why SVG is greatly desired), and the ability to create, edit and use SVG pictures is a goal of the LibreOffice development team. A further example of how this "Bug" appears in LibreOffice is demonstrated within the generated PDF files. Even-though starting with version 3.5 SVG will be stored as "true .svg" the current LibreOffice continues to "apparently" change SVG into bit-mapped images and use these SVG pictures as bit-mapped images (as demonstrated in this "Bug" report and others).
Created attachment 53521 [details] Example Re-size in Draw Please note that on the same system with the above LibreOffice version, the same behavior appears within DRAW.
@rk601@yahoo.com I will try to condense the current behavior as I see with Master 0. Prepare ("somehow") a "cicle.svg" with a circle diameter=10mm, border width =1mm blue, area green 1. open new "WRITER.odt" 2. Menu 'Insert -> Picture from file - "cicle.svg"' We have a cicle in "WRITER.odt" 3. Resize from 10mm diameter to 100mm circle diameter expected: blue border width increases to 10 mm to keep ration diameter / border width = 10 actual: as expected Attached sample.doc shows that behaviour for inserted circle.svg If you see or need different results please describe in a similar simple way! If you need a different behavior (constant border width) please additionally contribute a "real life example" for what that behavior will be required.
Created attachment 53549 [details] Test Kit Please do not worry that circle.svg has a too thin border (it's not 1/10 of diameter), that's a different svg.export problem of draw. But you will see in the WRITER document that ration border width to circle diameter will be constant.
Created attachment 53561 [details] Feet Re-size Example Thank you for your comments. We obtain similar re-sizing behavior with SVG pictures. On 2011-11-14 11:25:10 PST Rainer Bielefeld asked, "If you need a different behavior (constant border width) please additionally contribute a 'real life example' for what that behavior will be required." There are various examples, here is a simple one. SVG pictures are numerous. Many of these SVG pictures are not the desired size. When a large SVG picture is reduced then the picture and/or elements of the picture seem to disappear. This occurs because of the reducing stroke width. Please follow these steps: 1. Locate an SVG picture (we used "feet_resize.svg"). 2. Insert the SVG into WRITER. Use Menu 'Insert -> Picture from file - "feet_resize.svg"' We have a simple picture of "feet" in "WRITER.odt" 3. Resize from a big picture to a small picture. Expected: If the [stroke-width="1px"] within the SVG remained constant then the feet would be easy to see and will print. Actual: the [stroke-width] becomes less then a pixel within the SVG so the feet are hard to see and will appear not to print. Attached Feet Resized.zip shows screenshots of the SVG "disappearing." The ability to maintain (constant border width) would resolve these types of problems. In addition, LibreOffice would have the default functionality of other SVG-Editors.
Currently all discussions have been concerning WRITER I decided to close this bug, because there has been no evidence that we have a bug - not even an unwanted behavior. We are talking about pictures, and of course there may be NO distortions when resizing. Reporters wish would mean: If you have a picture of a room with a flee and a cow in it and you resize it to 1/100 in WRITER, room size and cow size should be reduced, but not size of the flee, because it would become invisible? That's obviously nonsense. Of course I can imagine that there might be a particular class of designs for what a constant width of outline during resize might be important (may be particular sketches), but currently I can not find any "real life application" for that. Feet sketches are not. And how should that work? Having complex drawings with Elements drawn as lines should be resized, outlines not? For such complex needs WRITER is the wrong tool, you have to use a separate drawing Editor to prepare the picture so that it can be used as illustration in WRITER. Here for example you can open the SVG in DRAW, there a resize will not modify lines width, and then you insert the small feet with thick outlines into WRITER. WONTFIX, because DRAW offers the required function and WRITER is not a SVG editor.
Created attachment 53570 [details] SVG Pop-up Menu Point of clarification: Your interpretation of the desired functionality is incorrect. Resizing SVG will change the size of the selected SVG picture(s), and not selectively re-size pictures within the selected SVG. However, resizing would maintain the “stroke-width” similar to how other SVG-Editors function. Obviously, we suggested that this functionality would allow a person to control whether or not the “stroke-width” gets scaled or stays the same; for example right-clicking on the SVG picture from within LibreOffice would produce a pop-up menu that allows the user to choose either to re-size the “stroke-width” or not re-size the “stroke-width.” This would be similar to the current functionality where the pop-up menu contains the commands "Line... Area... Text..." etc. This functionality could be available within WRITER, DRAW, etc. Please see the attached “SVG Pop-up Menu.png” file. Perhaps this should be relabeled as a desired Enhancement and not dismissed outright? Out of curiosity, are you a paid contributor to the LibreOffice project? Are there paid positions?
Created attachment 53597 [details] Resize in DRAW Example Resizes "stroke-width" Thank you for your continued testing of "stroke-width" in SVG. We attempted to resize an SVG picture in DRAW as suggested in the above comment, and here are some of our results: On 2011-11-14 22:58:41 PST Rainer Bielefeld wrote, "...For such complex needs WRITER is the wrong tool, you have to use a separate drawing Editor to prepare the picture so that it can be used as illustration in WRITER. Here for example you can open the SVG in DRAW, there a resize will not modify lines width, and then you insert the small feet with thick outlines into WRITER." Perhaps we are missing something. When we open an SVG picture in DRAW and resize it then the "stroke-width" appears to also be resized. Please see the 'stroke-width:1.0000000px;' from within the original "lizard.svg" file and then see the 'stroke-width="28.222"' from within the resized "lizard_resized.svg" file. Of course, the generated SVG from DRAW in OSX incorrectly modifies the SVG code into PNG, but that is a different BUG (please see BUG 41995, Bug 42092, and others). How does a person open the SVG in DRAW and resize the SVG so as not to modify line width? To conduct our test, please follow these steps: 1. Locate an SVG picture (we used "lizard.svg"). 2. Insert the SVG into DRAW. Use Menu 'Insert -> Picture from file - "lizard.svg"' We have a simple picture of a "lizard" in DRAW. 3. Resize from a small picture to a big picture. Expected: The [stroke-width:1.0000000px;] within the SVG should, reportedly, remain constant. Actual: The [stroke-width] becomes more then a pixel within the SVG and other errors occur. Please note: To view the "SVG code" within an SVG file use any "robust" text editor. Look for the "stroke-width" tag. Perhaps we are missing a step? Perhaps additional Error Reports should be generated? Attached Resize in DRAW.zip shows screenshots of the SVG stroke-width and the SVG source code that demonstrates some of the problems. Thank you for your help.