Lukas. Posted November 30, 2018 Share Posted November 30, 2018 Hi everyone, while working on some simple design with rectangles I noticed this small line in between the rectangles. Why are the rectangles not rendered as one big rectangle? Further details: - Stroke is set to "None" - The rectangles are pixel perfect aligned on top of each other - The fact that they are visually but not technically separated also appears when exporting to a SVG and making a PNG out of it Greetings, Lukas Quote Link to comment Share on other sites More sharing options...
v_kyr Posted November 30, 2018 Share Posted November 30, 2018 Hi, see the related: Remove thin line when snaping Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
Lukas. Posted November 30, 2018 Author Share Posted November 30, 2018 I am using integer values for the positions but when I export to SVG and then import the SVG into a normal document (so it will be rendered) there is still said gap between them. rectangles.svg rectangles.afdesign Quote Link to comment Share on other sites More sharing options...
Staff Dan C Posted November 30, 2018 Staff Share Posted November 30, 2018 Hi Lukas, Welcome to the forums 25 minutes ago, Lukas. said: and then import the SVG into a normal document (so it will be rendered) there is still said gap between them. Are you referring to placing the file in another Affinity Designer document? I've opened both your .afdesign and svg file and at 100% zoom level there's no white line shown so I'm a little unsure what you mean by this! Quote Link to comment Share on other sites More sharing options...
Lukas. Posted November 30, 2018 Author Share Posted November 30, 2018 Hi Dan, thanks for helping out! I opened Affinity Photo, created a new document and then dragged the SVG inside. That will result in the PNG from my last post. Quote Link to comment Share on other sites More sharing options...
Staff Dan C Posted November 30, 2018 Staff Share Posted November 30, 2018 No problem at all, I've tried following this workflow using your provided file and at 100% zoom level in Affinity Photo I can see a very faint white line, however I exported the file as a JPEG and the line is not visible. I believe this is a rendering choice with embedded documents, but this shouldn't show on export Quote Link to comment Share on other sites More sharing options...
Lukas. Posted November 30, 2018 Author Share Posted November 30, 2018 Those are my results (attachments). I mean it's not a big problem, I can always make it overlap on purpose to ensure correct representation in the final rendering but I'm still wondering about this anyway. I looked into the encoding of the SVG: <g transform="matrix(0.98824,0,0,1.24687,-326.325,-512.304)"> <rect x="330.208" y="410.872" width="303.57" height="80.201"/> </g> <g transform="matrix(0.98824,0,0,1.24687,-326.325,-412.304)"> <rect x="330.208" y="410.872" width="303.57" height="80.201"/> </g> So I'm guessing the Matrix-Transform is not accurate enough on the floating points given in the <rect>. Could that be it? rectangles.afphoto Quote Link to comment Share on other sites More sharing options...
Staff MEB Posted November 30, 2018 Staff Share Posted November 30, 2018 The placed/embedded SVG is scaled (up) on your document so it's not aligned with the pixel grid anymore (thus the background bleeding through the common edge of the rectangles). If you resize/place it with the original document dimensions (which were 300x200 or multiples of that value) and with integer X,Y coordinates it should display/render without that gap at 100% view and when exporting. For some weird reason when we edit the embedded document sometimes it still displays the line at 100% zoom. It's probably due to the reason you pointed above on SVG export. Quote A Guide to Learning Affinity Software Link to comment Share on other sites More sharing options...
walt.farrell Posted November 30, 2018 Share Posted November 30, 2018 Not sure it's significant, but I opened the .svg file in Firefox, and at 170% or higher zoom there's a white line between the two rectangles. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1 Link to comment Share on other sites More sharing options...
v_kyr Posted November 30, 2018 Share Posted November 30, 2018 21 minutes ago, walt.farrell said: Not sure it's significant, but I opened the .svg file in Firefox, and at 170% or higher zoom there's a white line between the two rectangles. No need to zoom in, just inspect and run the SVG code in some online tool ... https://www.w3schools.com/code/tryit.asp?filename=FXQLKR2BFI8D Lukas. 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
v_kyr Posted November 30, 2018 Share Posted November 30, 2018 1 hour ago, Lukas. said: So I'm guessing the Matrix-Transform is not accurate enough on the floating points given in the <rect>. Could that be it? Yes, if you add/remove (in this case -413.304) just one pixel value for the second rect in it's transform matrix it should look Ok, aka alter the sixth value of the transformation matrix there ... <g transform="matrix(0.98824,0,0,1.24687,-326.325,-413.304)"> <rect x="330.208" y="410.872" width="303.57" height="80.201"/> </g> Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
Lukas. Posted November 30, 2018 Author Share Posted November 30, 2018 Thanks for everyone's contribution. So what's the solution now? I guess I'm not gonna manually manipulate the svg-file after I made an export from Affinity Designer? Is there maybe an option for something like "raw export" or do I just make them overlap now as a hacky workaround? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.