scoony Posted June 30, 2017 Share Posted June 30, 2017 Hi folks, I'm new to the forum and perhaps not searched in the right place but I'm trying to expand SVG icons from the centre as opposed to the top left. Also need to export the file for use in a database. thanks Quote Link to comment Share on other sites More sharing options...
VIPStephan Posted June 30, 2017 Share Posted June 30, 2017 Hold the Command key (that’s probably Control in Windows) and drag a handle to resize from the specified center point. Quote Link to comment Share on other sites More sharing options...
gdenby Posted June 30, 2017 Share Posted June 30, 2017 If you hold down the command/windows key while holding the shift, it will constrain the expansion from the bounding box center. What does the database need. Is it an image field, or the .svg data? Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
scoony Posted June 30, 2017 Author Share Posted June 30, 2017 @gdenby the problem is I've created an SVG icon to use in a button but if I want it to be larger it starts from the top left and grows. I was trying make it grow from the centre. It's like it's anchored to the top left and I can't change that. I think what I'm trying to do is technically called 'scaling around centre point' So when I export to SVG scaling occurs in the top left as default and I don't know how to change that. Quote Link to comment Share on other sites More sharing options...
scoony Posted June 30, 2017 Author Share Posted June 30, 2017 I think what I'm trying to do is technically called 'scaling around centre point' So when I export to SVG scaling occurs in the top left as default and I don't know how to change that. Quote Link to comment Share on other sites More sharing options...
gdenby Posted July 1, 2017 Share Posted July 1, 2017 Select the .svg shape. Look at the transform panel at the bottom of the right studio panels. There is a small icon representing the shapes bounding box. By default, the upper left corner has a larger dot, which shows where the scaling starts. Click on the center dot. Then it will show larger, and the tranform happens from the center. But, as described above, you should be able to just hold down the command/window button while dragging the corner of the svg shape. Holding the key down while dragging tells the program the shape should be scaled from its bounding box center. Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet Link to comment Share on other sites More sharing options...
VIPStephan Posted July 1, 2017 Share Posted July 1, 2017 @gdenby the problem is I've created an SVG icon to use in a button but if I want it to be larger it starts from the top left and grows. I was trying make it grow from the centre. It's like it's anchored to the top left and I can't change that. Ah, you mean after export, when you use the graphic as button you want it to scale from the center on mouseover? That would have to be done in the code of the SVG file; nothing you can do in Designer (I suppose). Quote Link to comment Share on other sites More sharing options...
scoony Posted July 1, 2017 Author Share Posted July 1, 2017 @gdenby I tried to anchor the attached file (Untitled2) but when I add the SVG to a button in the database it still comes up on the top left. I've another SVG 'a padlock' and that scales from the centre but I noticed when I opened it in BBEDIT is has a function that scales it from the centre. I'm not sure if I'm exporting the file to an SVG format correctly. I've attached files so you can see. Thanks Untitled2.svg Padlock 2.svg Quote Link to comment Share on other sites More sharing options...
VIPStephan Posted July 1, 2017 Share Posted July 1, 2017 I don’t think AD has this functionality implemented, so, as I said, you need to edit the code manually to achieve that. Quote Link to comment Share on other sites More sharing options...
gdenby Posted July 1, 2017 Share Posted July 1, 2017 Both files you posted have the same .svg code for scaling "preserveAspectRatio="xMidYMid meet"" which says the figure should scale from the center. There are some differences, and its beyond my experience to say which might be influencing the different behaviors. The padlock 2 is a vector file, untitled2 is a .png embedded in an .svg. I think the problems is that untitled2 is essentially a bitmap. From what I can see from experimentation, AD exports untitled 2 as a bitmap within an .svg geometry envelope. I'm going to guess that the database deals w. the .svg files differently based on if they are vector or bitmap. My suggestion is to re-create the untitled2 image as just a vector circle object. Not much to doing that. See what happens. Quote iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb, AMD Radeon R9 M290 2048 Mb iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil Huion WH1409 tablet 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.