Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

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 

Link to comment
Share on other sites

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?

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

@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.

Link to comment
Share on other sites

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. 

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

@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).

Link to comment
Share on other sites

@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

 

 

post-63933-0-45866000-1498930314_thumb.png

Untitled2.svg

Padlock 2.svg

Link to comment
Share on other sites

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. 

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.